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

Go to the source code of this file.

Classes

class  DummySF
 
struct  DummySFR
 

Functions

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 61 of file module-scalarfunc.cc.

References SetSF().

62 {
63  ScalarFunctionRead *rf = new DummySFR;
64 
65  if (!SetSF("dummy", rf)) {
66  delete rf;
67 
68  silent_cerr("DummyScalarFunction: "
69  "module_init(" << module_name << ") "
70  "failed" << std::endl);
71 
72  return -1;
73  }
74 
75  return 0;
76 }
bool SetSF(const std::string &s, const ScalarFunctionRead *rf)

Here is the call graph for this function: