MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
module-switch_drive.cc File Reference
#include <vector>
#include <drive.h>
#include <myassert.h>
#include <except.h>
#include <mynewmem.h>
#include <dataman.h>
#include "module-switch_drive.h"
Include dependency graph for module-switch_drive.cc:

Go to the source code of this file.

Classes

class  SwitchDriveCaller
 
struct  SwitchDriveDCR
 

Functions

bool switch_drive_set ()
 
int module_init (const char *module_name, void *pdm, void *php)
 This function registers our user defined element for the math parser. More...
 

Function Documentation

int module_init ( const char *  module_name,
void *  pdm,
void *  php 
)

This function registers our user defined element for the math parser.

It is called when the "module load" statement appears in the input file.

Definition at line 273 of file module-switch_drive.cc.

References switch_drive_set().

274 {
275  if (!switch_drive_set()) {
276  silent_cerr("switch_drive: "
277  "module_init(" << module_name << ") "
278  "failed" << std::endl);
279  return -1;
280  }
281 
282  return 0;
283 }
bool switch_drive_set()

Here is the call graph for this function:

bool switch_drive_set ( )

Definition at line 258 of file module-switch_drive.cc.

References SetDriveCallerData().

Referenced by module_init().

259 {
261 
262  if (!SetDriveCallerData("switch", rf)) {
263  delete rf;
264  return false;
265  }
266 
267  return true;
268 }
bool SetDriveCallerData(const char *name, DriveCallerRead *rf)
Definition: drive_.cc:1324

Here is the call graph for this function: