Functions
Miscellaneous

Functions

void mdlUtil_beep (int count)
 Beeps the speaker. More...
 
void mdlUtil_quickSort (void *pFirst, int numEntries, int elementSize, PFToolsSortCompare compareFunc)
 Implementation of the standard quick-sort algorithm. More...
 
void mdlDisplaySet_addSelectionSet (bool clearExisting)
 Adds elements from the selection set to the display set. More...
 
void mdlDisplaySet_removeSelectionSet ()
 Removes elements from the selection set to the display set. More...
 
void mdlDisplaySet_clear (bool showEverything)
 Removes all elements from the display set. More...
 
UInt32 mdlSymbChangeAsynch_getOldColor (SymbChangeAsynchP asynchData)
 Get the color before a change from the active symbology asynch message. More...
 
UInt32 mdlSymbChangeAsynch_getNewColor (SymbChangeAsynchP asynchData)
 Get the color after a change from the active symbology asynch message. More...
 
UInt32 mdlSymbChangeAsynch_getOldWeight (SymbChangeAsynchP asynchData)
 Get the weight before a change from the active symbology asynch message. More...
 
UInt32 mdlSymbChangeAsynch_getNewWeight (SymbChangeAsynchP asynchData)
 Get the weight after a change from the active symbology asynch message. More...
 
long mdlSymbChangeAsynch_getOldLineStyle (SymbChangeAsynchP asynchData)
 Get the line style before a change from the active symbology asynch message. More...
 
long mdlSymbChangeAsynch_getNewLineStyle (SymbChangeAsynchP asynchData)
 Get the line style after a change from the active symbology asynch message. More...
 
void mdlVersion_getVersionNumbers (VersionNumber *versionNumber, int *development)
 Gets the version number for the MicroStation host. More...
 
void mdlVersion_getPlatform (int *platformID, WString *platformName)
 Gets operatin system platform information for the MicroStation host. More...
 
MSTNTOOLS_EXPORT void mdlAvlTree_free (AvlTree **avlTree, PFAvlNodeFree userFunc, void *userArg)
 Frees all memory allocated for an AVL tree. More...
 
MSTNTOOLS_EXPORT int mdlAvlTree_traverse (AvlTree *avlTree, int option, PFAvlTraverse userFunc, void *userArg)
 Traverses the specified AVL tree in key-sorted order. More...
 

Detailed Description

Function Documentation

MSTNTOOLS_EXPORT void mdlAvlTree_free ( AvlTree **  avlTree,
PFAvlNodeFree  userFunc,
void *  userArg 
)

Frees all memory allocated for an AVL tree.

If a function is passed in "userFunc" it will be called once for each node with a pointer to the node data and userArg. This gives an opportunity to free any memory you may have allocated for your node data.

Parameters
avlTreeIN the AVL tree to be freed
userFuncIN user call-back function
userArgIN argument passed to userFunc ""
MSTNTOOLS_EXPORT int mdlAvlTree_traverse ( AvlTree avlTree,
int  option,
PFAvlTraverse  userFunc,
void *  userArg 
)

Traverses the specified AVL tree in key-sorted order.

The function "userFunc" is called once for each node in the tree. The first argument passed to userFunc is a pointer to the node data. The second argument passed to it is "userArg".

Parameters
avlTreeIN the AVL tree to traverse
optionIN traverse mode / options
userFuncIN user call-back function
userArgIN arguments to user function
Returns
The last value returned by "userFunc".
Remarks
"userFunc" must return SUCCESS for the traverse operation to continue. Any other return value will cause the traverse operation to stop. ""
void mdlDisplaySet_addSelectionSet ( bool  clearExisting)

Adds elements from the selection set to the display set.

Parameters
[in]clearExistingif true, clears existing display set before creating new display set.
void mdlDisplaySet_clear ( bool  showEverything)

Removes all elements from the display set.

Parameters
[in]showEverythingIf true, the effect is to negate the display set and show all elements. If false, the effect is to remove every element from the display set and show nothing.
void mdlDisplaySet_removeSelectionSet ( )

Removes elements from the selection set to the display set.

UInt32 mdlSymbChangeAsynch_getNewColor ( SymbChangeAsynchP  asynchData)

Get the color after a change from the active symbology asynch message.

Remarks
The asynch is set up by calling mdlSystem_setFunction with the parameter SYSTEM_SYMBOLOGY_CHANGE and the SystemFunc_SymbologyChanged callback.
Note that it is possible for applications to change the values in the TCB directly and circumvent these messages. However, most applications will use a call to mdlParams_setActive or the ACTIVE COLOR keyin.
All active symbology parameters are available in any asynch call.
Parameters
[in]asynchDataThe data pointer passed to the asynch function.
Returns
The active color after the change.
See also
mdlSymbChangeAsynch_getOldColor
long mdlSymbChangeAsynch_getNewLineStyle ( SymbChangeAsynchP  asynchData)

Get the line style after a change from the active symbology asynch message.

Remarks
The asynch is set up by calling mdlSystem_setFunction with the parameter SYSTEM_SYMBOLOGY_CHANGE and the SystemFunc_SymbologyChanged callback.
Note that it is possible for applications to change the values in the TCB directly and circumvent these messages. However, most applications will use a call to mdlParams_setActive or the ACTIVE STYLE keyin.
All active symbology parameters are available in any asynch call.
Parameters
[in]asynchDataThe data pointer passed to the asynch function.
Returns
The active line style before the change.
See also
mdlSymbChangeAsynch_getOldLineStyle
UInt32 mdlSymbChangeAsynch_getNewWeight ( SymbChangeAsynchP  asynchData)

Get the weight after a change from the active symbology asynch message.

Remarks
The asynch is set up by calling mdlSystem_setFunction with the parameter SYSTEM_SYMBOLOGY_CHANGE and the SystemFunc_SymbologyChanged callback.
Note that it is possible for applications to change the values in the TCB directly and circumvent these messages. However, most applications will use a call to mdlParams_setActive or the ACTIVE WEIGHT keyin.
All active symbology parameters are available in any asynch call.
Parameters
[in]asynchDataThe data pointer passed to the asynch function.
Returns
The active weight after the change.
See also
mdlSymbChangeAsynch_getOldWeight
UInt32 mdlSymbChangeAsynch_getOldColor ( SymbChangeAsynchP  asynchData)

Get the color before a change from the active symbology asynch message.

Remarks
The asynch is set up by calling mdlSystem_setFunction with the parameter SYSTEM_SYMBOLOGY_CHANGE and the SystemFunc_SymbologyChanged callback.
Note that it is possible for applications to change the values in the TCB directly and circumvent these messages. However, most applications will use a call to mdlParams_setActive or the ACTIVE COLOR keyin.
All active symbology parameters are available in any asynch call.
Parameters
[in]asynchDataThe data pointer passed to the asynch function.
Returns
The active color before the change.
See also
mdlSymbChangeAsynch_getNewColor
long mdlSymbChangeAsynch_getOldLineStyle ( SymbChangeAsynchP  asynchData)

Get the line style before a change from the active symbology asynch message.

Remarks
The asynch is set up by calling mdlSystem_setFunction with the parameter SYSTEM_SYMBOLOGY_CHANGE and the SystemFunc_SymbologyChanged callback.
Note that it is possible for applications to change the values in the TCB directly and circumvent these messages. However, most applications will use a call to mdlParams_setActive or the ACTIVE STYLE keyin.
All active symbology parameters are available in any asynch call.
Parameters
[in]asynchDataThe data pointer passed to the asynch function.
Returns
The active line style before the change.
See also
mdlSymbChangeAsynch_getNewLineStyle
UInt32 mdlSymbChangeAsynch_getOldWeight ( SymbChangeAsynchP  asynchData)

Get the weight before a change from the active symbology asynch message.

Remarks
The asynch is set up by calling mdlSystem_setFunction with the parameter SYSTEM_SYMBOLOGY_CHANGE and the SystemFunc_SymbologyChanged callback.
Note that it is possible for applications to change the values in the TCB directly and circumvent these messages. However, most applications will use a call to mdlParams_setActive or the ACTIVE WEIGHT keyin.
All active symbology parameters are available in any asynch call.
Parameters
[in]asynchDataThe data pointer passed to the asynch function.
Returns
The active weight before the change.
See also
mdlSymbChangeAsynch_getNewWeight
void mdlUtil_beep ( int  count)

Beeps the speaker.

Returns
mdlUtil_beep is of type void; it returns no value.
Parameters
[in]countthe number times to beep.
void mdlUtil_quickSort ( void *  pFirst,
int  numEntries,
int  elementSize,
PFToolsSortCompare  compareFunc 
)

Implementation of the standard quick-sort algorithm.

Parameters
[in]pFirstthe address of the beginning of the array
[in]numEntriesthe number of entries in the array
[in]elementSizethe size of each entry in the array
[in]compareFunca function that mdlUtil_quickSort calls one or more times to compare two array elements and return a value specifying their relationship. compareFunc is called with pointers to the two array entries as its arguments.
Remarks
The function pointed to by compareFunc should return the following:
Return value Meaning
-1 entry1 less than entry2.
0 entry1 equal to entry2.
1 entry1 greater than entry2.
The array is sorted in place.
To reverse the sense of the sort (ascending or descending), reverse the sense of compareFunc's return value.
void mdlVersion_getPlatform ( int *  platformID,
WString *  platformName 
)

Gets operatin system platform information for the MicroStation host.

Parameters
[out]platformIDinteger identifying platform. For V8, this will always be PLATFORM_PC_WINNT as defined in basedefs.h
[out]platformNamepointer to a WString to fill with the platform name. For V8, the platform name is always "Windows X86".
Remarks
Required Library: mdlbltin.lib
void mdlVersion_getVersionNumbers ( VersionNumber versionNumber,
int *  development 
)

Gets the version number for the MicroStation host.

Parameters
[out]versionNumberthe 4-digit version number represented as a VersionNumber structure.
[out]developmentan internal build number useful only to the core MicroStation developers. Pass NULL.
Remarks
Required Library: mdlbltin.lib

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.