Resource
OCCT package Resource: Resource_FormatType, Resource_LexicalCompare, Resource_Manager, Resource_NoSuchResource, and 1 more bound classes.
Resource_FormatType
Properties(32)
Resource_LexicalCompare
Constructors(1)
Instance methods(1)
- IsLower(Left: TCollection_AsciiString, Right: TCollection_AsciiString): boolean
Returns True if <Left> is lower than <Right>.
Parameters (2)LeftRight
Resource_Manager
Defines a resource structure and its management methods.
Constructors(3)
Create an empty Resource manager.
- constructor(aName: string, Verbose?: boolean): Resource_Manager
Create a Resource manager. Attempts to find the two following files: $CSF_
aNameDefaults/aName $CSF_aNameUserDefaults/aName and load them respectively into a reference and a user resource structure.
If CSF_ResourceVerbose defined, seeked files will be printed.
FILE SYNTAX The syntax of a resource file is a sequence of resource lines terminated by newline characters or end of file. The syntax of an individual resource line is:Parameters (2)aNameVerbose
- constructor(theName: TCollection_AsciiString, theDefaultsDirectory: TCollection_AsciiString, theUserDefaultsDirectory: TCollection_AsciiString, theIsVerbose?: boolean): Resource_Manager
Create a Resource manager.
Parameters (4)theName—description file nametheDefaultsDirectory—default folder for looking description filetheUserDefaultsDirectory—user folder for looking description filetheIsVerbose—print verbose messages
Static methods(3)
- get_type_name(): string
- GetResourcePath(aPath: TCollection_AsciiString, aName: string, isUserDefaults: boolean): void
Gets the resource file full path by its name. If corresponding environment variable is not set or file doesn't exist returns empty string.
Parameters (3)aPath—Mutated in place; read the updated value from this argument after the call.aNameisUserDefaults
Instance methods(13)
- Save(): boolean
Save the user resource structure in the specified file. Creates the file if it does not exist.
- Find(aResource: string): boolean
returns True if the Resource does exist.
Parameters (1)aResource
- Find(theResource: TCollection_AsciiString, theValue: TCollection_AsciiString): boolean
returns True if the Resource does exist.
Parameters (2)theResourcetheValue—Mutated in place; read the updated value from this argument after the call.
- Integer(aResourceName: string): number
Gets the value of an integer resource according to its instance and its type.
Parameters (1)aResourceName
- Real(aResourceName: string): number
Gets the value of a real resource according to its instance and its type.
Parameters (1)aResourceName
- Value(aResourceName: string): string
Gets the value of a CString resource according to its instance and its type.
Parameters (1)aResourceName
- ExtValue(aResourceName: string): string
Gets the value of an ExtString resource according to its instance and its type.
Parameters (1)aResourceName
- SetResource(aResourceName: string, aValue: number): void
Sets the new value of an integer resource. If the resource does not exist, it is created.
Parameters (2)aResourceNameaValue
- SetResource(aResourceName: string, aValue: number): void
Sets the new value of a real resource. If the resource does not exist, it is created.
Parameters (2)aResourceNameaValue
- SetResource(aResourceName: string, aValue: string): void
Sets the new value of an CString resource. If the resource does not exist, it is created.
Parameters (2)aResourceNameaValue
- GetMap(theRefMap?: boolean): NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString
Returns internal Ref or User map with parameters.
Parameters (1)theRefMap
- IsInitialized(): boolean
Returns true if Resource have been found.
Resource_NoSuchResource
Constructors(2)
- constructor(theMessage: string): Resource_NoSuchResourceParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Resource_NoSuchResourceParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Resource_Unicode
This class provides functions used to convert a non-ASCII C string given in ANSI, EUC, GB or SJIS format, to a Unicode string of extended characters, and vice versa.