Functions | |
int | mdlSystem_getCfgVar (WStringP value, WCharCP cfgVar) |
The mdlSystem_getCfgVar function retrieves the expanded value of the configuration variable cfgVar. More... | |
int | mdlSystem_getCfgVarAtLevel (WStringP value, WCharCP cfgVar, DgnPlatform::ConfigurationVariableLevel level) |
The mdlSystem_getCfgVarAtLevel function retrieves the expanded value of the configuration variable cfgVarNameP at a particular level. More... | |
int | mdlSystem_getCfgVarLevel (DgnPlatform::ConfigurationVariableLevel &level, WCharCP cfgVar) |
The mdlSystem_getCfgVarLevel function gets the level at which the passed in configuration variable is defined. More... | |
int | mdlSystem_defineCfgVar (WCharCP cfgVar, WCharCP value, DgnPlatform::ConfigurationVariableLevel level) |
Description Define a configuration variable. More... | |
int | mdlSystem_deleteCfgVar (WCharCP cfgVar) |
Remove the variable cfgVar from the configuration variable table. More... | |
int | mdlSystem_deleteCfgVarAtLevel (WCharCP cfgVar, DgnPlatform::ConfigurationVariableLevel level) |
Remove the variable cfgVar from the configuration variable table at the specified level. More... | |
int | mdlSystem_lockCfgVar (WCharCP cfgVar) |
Lock the variable cfgVar in the configuration variable table. More... | |
bool | mdlSystem_isCfgVarLocked (WCharCP cfgVar) |
Query the state of the lock for a given configuration variable. More... | |
int | mdlSystem_processCfgVarFile (WCharCP fileName, DgnPlatform::ConfigurationVariableLevel startingProcessLevel) |
Normally, configuration variable files are only processed during MicroStation's startup procedure. More... | |
int | mdlSystem_rewriteCfgVarFile (WCharCP cfgVarFileNameP, WCharCP cfgVarNameP, WCharCP cfgVarValueP) |
Rewrite the cfgVarFileNameP file so that cfgVarNameP will get defined to cfgVarValueP. More... | |
int | mdlSystem_createListFromCfgVarValue (StringListP *valueStrListPP, WCharCP cfgVarValueP) |
Parse a configuration variable's value into a StringList. More... | |
int mdlSystem_createListFromCfgVarValue | ( | StringListP * | valueStrListPP, |
WCharCP | cfgVarValueP | ||
) |
Parse a configuration variable's value into a StringList.
For example, the value of MS_DEF, which is a list of directories to search for design files, would have individual directories separated by the PATH_SEPARATOR_CHAR so it can be stored as a single buffer. mdlSystem_createListFromCfgVarValue breaks up the value at the PATH_SEPARATOR_CHAR and makes each item an entry in the StringList. This function would be called after mdlSystem_getCfgVar or mdlSystem_getExpandedCfgVar.
[out] | valueStrListPP | is the address of a StringList pointer. A StringList will be created to hold the individual entries of a configuration variable's value. The calling application must free this StringList by calling mdlStringList_destroy. valueStrListPP can be NULL if the number of entries is the only item of interest. |
[in] | cfgVarValueP | points to a buffer containing a configuration variable's value. |
int mdlSystem_defineCfgVar | ( | WCharCP | cfgVar, |
WCharCP | value, | ||
DgnPlatform::ConfigurationVariableLevel | level | ||
) |
Description Define a configuration variable.
If the variable already exists, its value is redefined.
[in] | cfgVar | The name of the configuration variable. Configuration variable names are not case sensitive. |
[in] | value | The new value. There is no limit on the length of a variable value. mdlSystem_defineCfgVar makes a copy of this value. |
[in] | level | The definition level of configuration variable. |
int mdlSystem_deleteCfgVar | ( | WCharCP | cfgVar | ) |
Remove the variable cfgVar from the configuration variable table.
[in] | cfgVar | The name of the variable to delete |
int mdlSystem_deleteCfgVarAtLevel | ( | WCharCP | cfgVar, |
DgnPlatform::ConfigurationVariableLevel | level | ||
) |
Remove the variable cfgVar from the configuration variable table at the specified level.
[in] | cfgVar | The name of the variable to delete |
[in] | level | level to remove |
int mdlSystem_getCfgVar | ( | WStringP | value, |
WCharCP | cfgVar | ||
) |
The mdlSystem_getCfgVar function retrieves the expanded value of the configuration variable cfgVar.
If the configuration variable does not exists, MicroStation attempts to find a system level environment variable with that name.
[out] | value | Points to a WString that receives the value of the configuration variable. valuep can be NULL if mdlSystem_getCfgVar is used to check for the existence of the configuration variable. |
[in] | cfgVar | The name of the configuration variable. |
int mdlSystem_getCfgVarAtLevel | ( | WStringP | value, |
WCharCP | cfgVar, | ||
DgnPlatform::ConfigurationVariableLevel | level | ||
) |
The mdlSystem_getCfgVarAtLevel function retrieves the expanded value of the configuration variable cfgVarNameP at a particular level.
This is different from mdlSystem_getCfgVar which checks all levels.
[out] | value | Points to a WString that receives the value of the configuration variable. valuep can be NULL if mdlSystem_getCfgVarAtLevel is used to check for the existence of the configuration variable at a particular level. |
[in] | cfgVar | The name of the configuration variable. |
[in] | level | Specifies the level to look for a value for cfgVarNameP. |
int mdlSystem_getCfgVarLevel | ( | DgnPlatform::ConfigurationVariableLevel & | level, |
WCharCP | cfgVar | ||
) |
The mdlSystem_getCfgVarLevel function gets the level at which the passed in configuration variable is defined.
[out] | level | The definition level. |
[in] | cfgVar | The name of the configuration variable. |
bool mdlSystem_isCfgVarLocked | ( | WCharCP | cfgVar | ) |
Query the state of the lock for a given configuration variable.
If it is of concern to the application, a call to mdlSystem_getCfgVar can be used to determine the configuration variable's existence.
[in] | cfgVar | The name of the variable to check. |
int mdlSystem_lockCfgVar | ( | WCharCP | cfgVar | ) |
Lock the variable cfgVar in the configuration variable table.
Once a configuration variable is locked the configuration variable cannot be deleted and its value cannot be changed.
[in] | cfgVar | The name of variable to lock |
int mdlSystem_processCfgVarFile | ( | WCharCP | fileName, |
DgnPlatform::ConfigurationVariableLevel | startingProcessLevel | ||
) |
Normally, configuration variable files are only processed during MicroStation's
startup procedure.
The mdlSystem_processCfgVarFile function can be used to initialize additional configuration variables inside of MicroStation.
[in] | fileName | is the name of the configuration variable file to process. |
[in] | startingProcessLevel | is the level at which to start processing the file. Valid values are the CFGVAR_LEVEL_xxx constants defined in msdefs.h and correspond to the configuration file processing levels. Most applications will want to use ConfigurationVariableLevel::User. |
int mdlSystem_rewriteCfgVarFile | ( | WCharCP | cfgVarFileNameP, |
WCharCP | cfgVarNameP, | ||
WCharCP | cfgVarValueP | ||
) |
Rewrite the cfgVarFileNameP file so that cfgVarNameP will get defined to cfgVarValueP.
It does so without disturbing comments, etc. elsewhere in the file. mdlSystem_rewriteCfgVarFile does not affect the current session's environment. Use mdlSystem_defineCfgVar to change the current session.
[in] | cfgVarFileNameP | is the name of the configuration variable file to rewrite. If NULL is passed, the current user configuration file is assumed. |
[in] | cfgVarNameP | is the name of the configuration variable. |
[in] | cfgVarValueP | is the value of cfgVarNameP that should be written to cfgVarFileNameP. |