NEURON
gui-redirect.h File Reference
#include "hocdec.h"
#include "nrnpy.h"

Go to the source code of this file.

Macros

#define TRY_GUI_REDIRECT_OBJ(name, obj)
 
#define TRY_GUI_REDIRECT_METHOD_ACTUAL_DOUBLE(name, sym, v)
 
#define TRY_GUI_REDIRECT_METHOD_ACTUAL_OBJ(name, sym, v)
 
#define TRY_GUI_REDIRECT_NO_RETURN(name, obj)
 
#define TRY_GUI_REDIRECT_DOUBLE(name, obj)
 
#define TRY_GUI_REDIRECT_ACTUAL_DOUBLE(name, obj)
 
#define TRY_GUI_REDIRECT_ACTUAL_STR(name, obj)
 
#define TRY_GUI_REDIRECT_ACTUAL_OBJ(name, obj)
 
#define TRY_GUI_REDIRECT_DOUBLE_SEND_STRREF(name, obj)
 

Functions

Objectnrn_get_gui_redirect_obj ()
 

Macro Definition Documentation

◆ TRY_GUI_REDIRECT_ACTUAL_DOUBLE

#define TRY_GUI_REDIRECT_ACTUAL_DOUBLE (   name,
  obj 
)
Value:
if (auto* const ngh_result = \
neuron::python::methods.try_gui_helper(name, static_cast<Object*>(obj))) { \
}
const char * name
Definition: init.cpp:16
impl_ptrs methods
Collection of pointers to functions with python-version-specific implementations.
Definition: nrnpy.cpp:21
Definition: hocdec.h:173
double(* object_to_double)(Object *)
Definition: nrnpy.h:45

Definition at line 55 of file gui-redirect.h.

◆ TRY_GUI_REDIRECT_ACTUAL_OBJ

#define TRY_GUI_REDIRECT_ACTUAL_OBJ (   name,
  obj 
)
Value:
if (auto* const ngh_result = \
neuron::python::methods.try_gui_helper(name, static_cast<Object*>(obj))) { \
return ngh_result; \
}

Definition at line 73 of file gui-redirect.h.

◆ TRY_GUI_REDIRECT_ACTUAL_STR

#define TRY_GUI_REDIRECT_ACTUAL_STR (   name,
  obj 
)
Value:
{ \
char** ngh_result; \
if (neuron::python::methods.gui_helper3_str) { \
ngh_result = \
neuron::python::methods.gui_helper3_str(name, static_cast<Object*>(obj), 0); \
if (ngh_result) { \
return ((const char**) ngh_result); \
} \
} \
}
static struct @27 methods[]

Definition at line 61 of file gui-redirect.h.

◆ TRY_GUI_REDIRECT_DOUBLE

#define TRY_GUI_REDIRECT_DOUBLE (   name,
  obj 
)
Value:
if (auto* const ngh_result = \
neuron::python::methods.try_gui_helper(name, static_cast<Object*>(obj))) { \
hoc_ret(); \
hoc_pushx(neuron::python::methods.object_to_double(*ngh_result)); \
return; \
}

Definition at line 47 of file gui-redirect.h.

◆ TRY_GUI_REDIRECT_DOUBLE_SEND_STRREF

#define TRY_GUI_REDIRECT_DOUBLE_SEND_STRREF (   name,
  obj 
)
Value:
{ \
Object** ngh_result; \
if (neuron::python::methods.gui_helper3) { \
ngh_result = neuron::python::methods.gui_helper3(name, static_cast<Object*>(obj), 1); \
if (ngh_result) { \
hoc_ret(); \
hoc_pushx(neuron::python::methods.object_to_double(*ngh_result)); \
return; \
} \
} \
}
Object **(* gui_helper3)(const char *name, Object *obj, int handle_strptr)
Definition: nrnpy.h:34

Definition at line 79 of file gui-redirect.h.

◆ TRY_GUI_REDIRECT_METHOD_ACTUAL_DOUBLE

#define TRY_GUI_REDIRECT_METHOD_ACTUAL_DOUBLE (   name,
  sym,
  v 
)
Value:
{ \
Object** guiredirect_result = NULL; \
if (neuron::python::methods.gui_helper) { \
Object* obj = nrn_get_gui_redirect_obj(); \
guiredirect_result = neuron::python::methods.gui_helper(name, obj); \
if (guiredirect_result) { \
return neuron::python::methods.object_to_double(*guiredirect_result); \
} \
} \
}
Object * nrn_get_gui_redirect_obj()
Definition: hoc_oop.cpp:644
#define NULL
Definition: spdefs.h:105
Object **(* gui_helper)(const char *name, Object *obj)
Definition: nrnpy.h:33

Definition at line 16 of file gui-redirect.h.

◆ TRY_GUI_REDIRECT_METHOD_ACTUAL_OBJ

#define TRY_GUI_REDIRECT_METHOD_ACTUAL_OBJ (   name,
  sym,
  v 
)
Value:
{ \
Object** guiredirect_result = NULL; \
if (neuron::python::methods.gui_helper) { \
Object* obj = nrn_get_gui_redirect_obj(); \
guiredirect_result = neuron::python::methods.gui_helper(name, obj); \
if (guiredirect_result) { \
return (guiredirect_result); \
} \
} \
}

Definition at line 28 of file gui-redirect.h.

◆ TRY_GUI_REDIRECT_NO_RETURN

#define TRY_GUI_REDIRECT_NO_RETURN (   name,
  obj 
)
Value:
if (auto* const ngh_result = \
neuron::python::methods.try_gui_helper(name, static_cast<Object*>(obj)); \
ngh_result) { \
return; \
}

Definition at line 40 of file gui-redirect.h.

◆ TRY_GUI_REDIRECT_OBJ

#define TRY_GUI_REDIRECT_OBJ (   name,
  obj 
)
Value:
if (auto* const ngh_result = \
neuron::python::methods.try_gui_helper(name, static_cast<Object*>(obj))) { \
return static_cast<void*>(*ngh_result); \
}

Definition at line 10 of file gui-redirect.h.

Function Documentation

◆ nrn_get_gui_redirect_obj()

Object* nrn_get_gui_redirect_obj ( )

Definition at line 644 of file hoc_oop.cpp.