![]() |
VR-Link API Documentation for HLA 1516
|
command line support More...
Collaboration diagram for DtMtlEnvironment:Public Member Functions | |
| DtMtlEnvironment () | |
| default constructor | |
| virtual | ~DtMtlEnvironment () |
| destructor | |
| virtual DtlObjPtr | lookup (const DtString &name) |
| Lookup the value of a symbol by name. | |
| virtual int | registerVar (const char *name, float *addr) |
| Register a C variable with the MTL system. | |
| virtual int | registerVar (const char *name, double *addr) |
| virtual int | registerVar (const char *name, int *addr) |
| virtual int | registerVar (const char *name, unsigned long *addr) |
| virtual int | registerVar (const char *name, char **addr) |
| virtual int | registerVar (const char *name, DtString *addr) |
| virtual int | registerVar (const char *name, long *addr) |
| virtual int | registerVar (const char *name, short *addr) |
| virtual int | registerVar (const char *name, unsigned short *addr) |
| template<class T > | |
| int | registerCmdLineVar (DtCmdLine::ValueArg< T > &arg) |
| Registers command line arguments. | |
| template<class T > | |
| int | registerConfigVar (DtConfigVariable< T > &arg) |
| virtual DtlObjPtr | loadLispFile (char *filename, int complain=1) |
| Read mtl files or expressions. | |
| virtual DtlObjPtr | loadLispFile (const DtlObjPtr &pathlist, char *filename, int complain=1) |
| virtual DtlObjPtr | loadLispFileOrExpr (char *arg, int complain=1) |
| virtual DtlObjPtr | loadLispExpr (char *lispLine, int complain=1) |
| virtual DtlObjPtr | setParameter (const DtString &name, const DtlObjPtr &value) |
| Set the value of a (lisp) symbol by name. | |
| virtual DtlObjPtr | setFunction (const DtString &name, DtlFcn func) |
| virtual DtlObjPtr & | env () |
| Used to get the actual lisp environment object. | |
Protected Member Functions | |
| DtMtlEnvironment (const DtMtlEnvironment &orig) | |
| copy constructor | |
| DtMtlEnvironment & | operator= (const DtMtlEnvironment &orig) |
| assignment operator | |
| virtual DtlObjPtr | setSpecialForm (const DtString &name, DtlFcn func) |
| Used to register special symbols with MTL. | |
| void | initEnv () |
| Called by constructor. | |
Protected Attributes | |
| DtlObjPtr | myEnv |
| DtList * | myParams |
| List of DtcParam*'s representing C variables that have been registered with us. | |
command line support
Since Microsoft VC6 does not support template member functions, if MSVC6 is used, define this as a macro An instance of DtMtlEnvironment is an MTL environment. You can register C variables with a DtMtlEnvironment, and load mtl files and expressions - causing which causes the values registered C variables to be updated.
| DtMtlEnvironment::DtMtlEnvironment | ( | ) |
default constructor
|
virtual |
destructor
|
protected |
copy constructor
|
inlinevirtual |
Used to get the actual lisp environment object.
Should typically not be used, but would be necessary if you want to directly use some of the low level mtl functions from C++ code. Use caution.
|
protected |
Called by constructor.
Registers standard lisp symbols, functions, etc, with the environment.
|
virtual |
|
virtual |
Read mtl files or expressions.
If the expression or file being read contains setq or setqb statements to set the values of mtl variables with the same names as C variables that have been registered with this environment, the values of the C variables will be updated accordingly.
|
virtual |
|
virtual |
Lookup the value of a symbol by name.
|
protected |
assignment operator
| int DtMtlEnvironment::registerCmdLineVar | ( | DtCmdLine::ValueArg< T > & | arg | ) |
Registers command line arguments.
Since Microsoft Visual C++ 6.0 does not support template member functions define a global function for VC6.
References DtCmdLine::ValueArg< T >::getInternalPtrValue(), and DtCmdLine::Arg::getName().
| int DtMtlEnvironment::registerConfigVar | ( | DtConfigVariable< T > & | arg | ) |
|
virtual |
Register a C variable with the MTL system.
Registering a variable with MTL allows you to set that variable through a setq or setqb command in an mtl file or mtl expression processed by the MTL system. Rather than using these overloaded functions directly, it is easier to use the macro DtREGISTER, which passes the name and address of a variable to registerVar. For example: DtMtlEnvironment env; env.DtREGISTER(x);
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Set the value of a (lisp) symbol by name.
setParameter can be used to set the value of a lisp variable whose value you want to check within a lisp file. setFunction lets you create your own lisp commands. When loading an mtl file, if a command with name name is read, we will call the function func that you have associated with the name.
|
protectedvirtual |
Used to register special symbols with MTL.
|
protected |
|
protected |
List of DtcParam*'s representing C variables that have been registered with us.
This is just a pointer to the list stored within myEnv.