#include <../../nrnconf.h>
#include <../nrnpython/nrnpython_config.h>
#include <stdio.h>
#include <stdlib.h>
#include <OS/string.h>
#include "oc2iv.h"
#include "nrnmpi.h"
#include <nrnisaac.h>
Go to the source code of this file.
|
| int | hoc_main1 (int, const char **, const char **) |
| |
| void | hoc_main1_init (const char *, const char **) |
| |
| void | pr_profile () |
| |
| int | hoc_obj_run (const char *, Object *) |
| |
| char * | nrn_version (int) |
| |
| void | hoc_final_exit () |
| |
| void | ivoc_final_exit () |
| |
| void | ivoc_cleanup () |
| |
| void | setneuronhome (const char *) |
| |
| int | hoc_xopen1 (const char *filename, const char *rcs) |
| |
| int | ivocmain (int argc, const char **argv, const char **env) |
| | Main entrypoint function into the HOC interpeter. More...
|
| |
| int | ivocmain_session (int argc, const char **argv, const char **env, int start_session) |
| | This used to be ivocmain, the main entrypoint to the HOC interpreter. More...
|
| |
| void | hoc_nrnmpi_init () |
| |
| static void | force_load () |
| |
| static bool | nrn_optarg_on (const char *opt, int *argc, char **argv) |
| |
| static char * | nrn_optarg (const char *opt, int *argc, char **argv) |
| |
| static int | nrn_optargint (const char *opt, int *argc, char **argv, int dflt) |
| |
| static bool | nrn_optarg_on (const char *opt, int *pargc, const char **argv) |
| |
| static const char * | nrn_optarg (const char *opt, int *pargc, const char **argv) |
| |
| static int | nrn_optargint (const char *opt, int *pargc, const char **argv, int dflt) |
| |
| double * | getarg (int i) |
| |
| int | ifarg (int) |
| |
| void | hoc_ret () |
| |
| void | hoc_pushx (double) |
| |
| void | hoc_single_event_run () |
| |
| int | run_til_stdin () |
| |
| void | hoc_notify_value () |
| |
◆ PR_PROFILE
◆ Session
◆ force_load()
| static void force_load |
( |
| ) |
|
|
static |
◆ getarg()
◆ hoc_final_exit()
◆ hoc_main1()
| int hoc_main1 |
( |
int |
argc, |
|
|
const char ** |
argv, |
|
|
const char ** |
envp |
|
) |
| |
◆ hoc_main1_init()
| void hoc_main1_init |
( |
const char * |
pname, |
|
|
const char ** |
envp |
|
) |
| |
◆ hoc_notify_value()
| void hoc_notify_value |
( |
| ) |
|
◆ hoc_nrnmpi_init()
◆ hoc_obj_run()
| int hoc_obj_run |
( |
const char * |
cmd, |
|
|
Object * |
ob |
|
) |
| |
◆ hoc_pushx()
| void hoc_pushx |
( |
double |
| ) |
|
◆ hoc_single_event_run()
◆ hoc_xopen1()
| int hoc_xopen1 |
( |
const char * |
filename, |
|
|
const char * |
rcs |
|
) |
| |
◆ ifarg()
◆ ivoc_cleanup()
◆ ivocmain()
| int ivocmain |
( |
int |
argc, |
|
|
const char ** |
argv, |
|
|
const char ** |
env |
|
) |
| |
Main entrypoint function into the HOC interpeter.
This function simply calls ivocmain_session with the start_session = 1.
- Note
- This is part of NEURON's public interface
-
env argument should not be used as it might become invalid
- Parameters
-
| argc | argument count as found in C/C++ main functions |
| argv | argument vector as found in C/C++ main functions |
| env | environment variable array as optionally found in main functions. |
- Returns
- 0 on success, otherwise error code.
Definition at line 407 of file ivocmain.cpp.
◆ ivocmain_session()
| int ivocmain_session |
( |
int |
argc, |
|
|
const char ** |
argv, |
|
|
const char ** |
env, |
|
|
int |
start_session |
|
) |
| |
This used to be ivocmain, the main entrypoint to the HOC interpreter.
ivocmain_session parses command line argument, calls of initialization functions and drops into an interactive HOC session. This function is called for example by the "real main" in nrnmain.cpp , but can be also called from other external user applications that use NEURON. Additionally to the original implemenation a new parameter start_session was introduced to control whether an interactive HOC session shoudl be started or simply NEURON and all data structures be initialized and control returned to the caller.
- Note
env argument should not be used as it might become invalid
- Parameters
-
| argc | argument count as found in C/C++ main functions |
| argv | argument vector as found in C/C++ main functions |
| env | environment variable array as optionally found in main functions. |
| start_session | set to 1 for default behavior (drop into interactive HOC session otherwise set to 0. If set to 1, but compiled with python support this function will still directly return (since in that mode we don't need an interactive HOC session either. |
- Returns
- 0 on success, otherwise error code.
Definition at line 434 of file ivocmain.cpp.
◆ nrn_optarg() [1/2]
| static char* nrn_optarg |
( |
const char * |
opt, |
|
|
int * |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
◆ nrn_optarg() [2/2]
| static const char* nrn_optarg |
( |
const char * |
opt, |
|
|
int * |
pargc, |
|
|
const char ** |
argv |
|
) |
| |
|
static |
◆ nrn_optarg_on() [1/2]
| static bool nrn_optarg_on |
( |
const char * |
opt, |
|
|
int * |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
◆ nrn_optarg_on() [2/2]
| static bool nrn_optarg_on |
( |
const char * |
opt, |
|
|
int * |
pargc, |
|
|
const char ** |
argv |
|
) |
| |
|
static |
◆ nrn_optargint() [1/2]
| static int nrn_optargint |
( |
const char * |
opt, |
|
|
int * |
argc, |
|
|
char ** |
argv, |
|
|
int |
dflt |
|
) |
| |
|
static |
◆ nrn_optargint() [2/2]
| static int nrn_optargint |
( |
const char * |
opt, |
|
|
int * |
pargc, |
|
|
const char ** |
argv, |
|
|
int |
dflt |
|
) |
| |
|
static |
◆ nrn_version()
| char* nrn_version |
( |
int |
i | ) |
|
◆ pr_profile()
◆ run_til_stdin()
◆ setneuronhome()
| void setneuronhome |
( |
const char * |
| ) |
|
◆ always_false
◆ hoc_default_dll_loaded_
| double hoc_default_dll_loaded_ |
|
extern |
◆ hoc_nframe
◆ hoc_nstack
◆ hoc_print_first_instance
| int hoc_print_first_instance |
|
extern |
◆ neuron_home
◆ nrn_global_argc
◆ nrn_global_argv
◆ nrn_is_python_extension
| int nrn_is_python_extension |
|
extern |
◆ nrn_istty_
◆ nrn_nobanner_
◆ nrnpy_nositeflag
◆ p_neosim_main
| int(* p_neosim_main) (int, const char **, const char **) |
( |
int |
, |
|
|
const char ** |
, |
|
|
const char ** |
|
|
) |
| |
◆ units_on_flag_