Functions
Line Style Cache

Functions

int mdlLineStyle_cacheInsert (uintptr_t fileKey, long rscType, DgnPlatform::ElementId rscID, void *pRsc, long option)
 Insert a line style component resource into the line style component cache. More...
 
int mdlLineStyle_cacheDelete (uintptr_t rscFile, UInt32 rscType, DgnPlatform::ElementId rscID, int option)
 Remove a line style component resource from the line style component cache. More...
 
void mdlLineStyle_cacheFree (DgnModelRefP modelRef)
 Remove all components from the line style component cache and free all associated memory. More...
 

Detailed Description

Function Documentation

int mdlLineStyle_cacheDelete ( uintptr_t  rscFile,
UInt32  rscType,
DgnPlatform::ElementId  rscID,
int  option 
)

Remove a line style component resource from the line style component cache.

If any other resources in the cache reference the resource being removed, they too will be removed. The rscFile, rscType, and rscID parameters uniquely identify the resource to be removed.

Parameters
[in]rscFilecomponent resource file
[in]rscTypecomponent resource type
[in]rscIDcomponent resource ID
[in]optionCurrently unused; pass 0 to guarantee compatibility with future versions.
Returns
SUCCESS if the component was successfully removed from the line style component cache or a non-zero error status.
See also
mdlLineStyle_cacheInsert mdlLineStyle_cacheFree
void mdlLineStyle_cacheFree ( DgnModelRefP  modelRef)

Remove all components from the line style component cache and free all associated memory.

The cache is automatically reallocated and reloaded with MicroStation's next request for a line style component.

Parameters
[in]modelRefmodel reference to clear cache; usually VALID_MODEL_REF to clear all caches.
Remarks
It is rarely necessary for an application to use this function but it can be helpful when the application has made numerous changes to the line style library. Calling this function will force MicroStation to reread the line style components from the library rather than relying on any copies that might be in the component cache.
See also
mdlLineStyle_cacheInsert mdlLineStyle_cacheDelete
int mdlLineStyle_cacheInsert ( uintptr_t  fileKey,
long  rscType,
DgnPlatform::ElementId  rscID,
void *  pRsc,
long  option 
)

Insert a line style component resource into the line style component cache.

MicroStation always attempts to load a line style resource from the cache before attempting to read it from the resource file. By using this function an application can override a line style resource from a style file or cause MicroStation to use a line style resource that does not exist in any resource file. When a line style resource is inserted into the cache it automatically loads any dependent resources. So if you are trying to override all resources in a line style, make sure the dependent resources are inserted into the cache first.

Remarks
The first three parameters rscFile, rscType and rscID identify the file, type and ID respectively, of the resource that will be loaded into the component cache.
Parameters
[in]fileKeyline style resource file
[in]rscTypeLine style resource type
[in]rscIDline style resource ID
[in]pRscIf the fourth parameter pRsc is not NULL it must be the address of a valid line style resource that will be copied into the cache directly. If pRsc is NULL, the resource will be read from the line style resource file indicated by rscFile.
[in]optionCurrently unused; always pass 0 to ensure compatibility with future versions.
Returns
SUCCESS if the resource was inserted into the component cache successfully or a non-zero error status.
See also
mdlLineStyle_cacheDelete mdlLineStyle_cacheFree

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