MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
module-tclpgin.cc File Reference
#include "mbconfig.h"
#include <cmath>
#include <cfloat>
#include "dataman.h"
#include "constltp.h"
#include <tcl.h>
Include dependency graph for module-tclpgin.cc:

Go to the source code of this file.

Classes

class  TclPlugIn
 

Functions

static MathParser::PlugIntcl_plugin (MathParser &mp, void *arg)
 
int module_init (const char *module_name, void *pdm, void *php)
 This function registers our user defined element for the math parser. More...
 

Variables

static Tcl_Interp * interp
 
static int interp_cnt
 

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 219 of file module-tclpgin.cc.

References HighParser::GetMathParser(), pHP, MathParser::RegisterPlugIn(), and tcl_plugin().

220 {
221 #if 0
222  DataManager *pDM = (DataManager *)pdm;
223 #endif
224  MBDynParser *pHP = (MBDynParser *)php;
225 
226  pHP->GetMathParser().RegisterPlugIn("tcl", tcl_plugin, 0);
227 
228  return 0;
229 }
virtual MathParser & GetMathParser(void)
Definition: parser.cc:668
static MathParser::PlugIn * tcl_plugin(MathParser &mp, void *arg)
int RegisterPlugIn(const char *name, MathParser::PlugIn *(*)(MathParser &, void *), void *arg)
Definition: mathp.cc:4584
static std::stack< const HighParser * > pHP
Definition: parser.cc:598

Here is the call graph for this function:

static MathParser::PlugIn* tcl_plugin ( MathParser mp,
void *  arg 
)
static

Definition at line 209 of file module-tclpgin.cc.

References SAFENEWWITHCONSTRUCTOR.

Referenced by module_init().

210 {
211  MathParser::PlugIn *p = 0;
212 
214 
215  return p;
216 }
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698

Variable Documentation

Tcl_Interp* interp
static
int interp_cnt
static

Definition at line 44 of file module-tclpgin.cc.