MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
modules.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void module_initialize (void)
 
void module_finalize (void)
 

Function Documentation

void module_finalize ( void  )

Definition at line 67 of file modules.cc.

Referenced by DataManager::~DataManager(), and MBDynParser::~MBDynParser().

68 {
69  if (::count == 0) {
70  silent_cerr("module_finalize: called too many times" << std::endl);
71  return;
72  }
73 
74  if (::count-- > 0) {
75  return;
76  }
77 
78 #ifdef USE_RUNTIME_LOADING
79  lt_dlexit();
80 #endif // USE_RUNTIME_LOADING
81 }
static int count
Definition: modules.cc:41
void module_initialize ( void  )

Definition at line 44 of file modules.cc.

References MBDYN_EXCEPT_ARGS.

Referenced by MBDynParser::ModuleLoad_int(), DataManager::ReadControl(), and DataManager::ReadElems().

45 {
46  if (::count++ > 0) {
47  return;
48  }
49 
50 #ifdef USE_RUNTIME_LOADING
51  if (lt_dlinit()) {
52  silent_cerr("module_initialize: unable to initialize run-time loading" << std::endl);
54  }
55 
56  /*
57  * NOTE: this macro is defined in mbdefs.h
58  */
59  if (lt_dlsetsearchpath(MODULE_LOADPATH) != 0) {
60  silent_cerr("module_initialize: unable to initialize load path" << std::endl);
62  }
63 #endif // USE_RUNTIME_LOADING
64 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
static int count
Definition: modules.cc:41