OCC.Resource module¶
A RESOURCE is a parameter saved on a file and used toinitialize a variable.
-
class
Handle_Resource_DataMapNodeOfDataMapOfAsciiStringAsciiString
(*args)¶ Bases:
OCC.TCollection.Handle_TCollection_MapNode
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Resource_DataMapNodeOfDataMapOfAsciiStringExtendedString
(*args)¶ Bases:
OCC.TCollection.Handle_TCollection_MapNode
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Resource_Manager
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString
(*args)¶ Bases:
OCC.TCollection.TCollection_BasicMapIterator
Return type: None Parameters: aMap (Resource_DataMapOfAsciiStringAsciiString &) – Return type: None -
Key
()¶ Return type: TCollection_AsciiString
-
Value
()¶ Return type: TCollection_AsciiString
-
thisown
¶ The membership flag
-
-
class
Resource_DataMapIteratorOfDataMapOfAsciiStringExtendedString
(*args)¶ Bases:
OCC.TCollection.TCollection_BasicMapIterator
Return type: None Parameters: aMap (Resource_DataMapOfAsciiStringExtendedString &) – Return type: None -
Key
()¶ Return type: TCollection_AsciiString
-
Value
()¶ Return type: TCollection_ExtendedString
-
thisown
¶ The membership flag
-
-
class
Resource_DataMapNodeOfDataMapOfAsciiStringAsciiString
(*args)¶ Bases:
OCC.TCollection.TCollection_MapNode
Parameters: - K (TCollection_AsciiString &) –
- I (TCollection_AsciiString &) –
- n (TCollection_MapNodePtr &) –
Return type: -
GetHandle
()¶
-
Key
()¶ Return type: TCollection_AsciiString
-
Value
()¶ Return type: TCollection_AsciiString
-
thisown
¶ The membership flag
-
class
Resource_DataMapNodeOfDataMapOfAsciiStringExtendedString
(*args)¶ Bases:
OCC.TCollection.TCollection_MapNode
Parameters: - K (TCollection_AsciiString &) –
- I (TCollection_ExtendedString &) –
- n (TCollection_MapNodePtr &) –
Return type: -
GetHandle
()¶
-
Key
()¶ Return type: TCollection_AsciiString
-
Value
()¶ Return type: TCollection_ExtendedString
-
thisown
¶ The membership flag
-
class
Resource_DataMapOfAsciiStringAsciiString
(*args)¶ Bases:
OCC.TCollection.TCollection_BasicMap
Parameters: NbBuckets (int) – default value is 1 Return type: None -
Assign
()¶ Parameters: Other (Resource_DataMapOfAsciiStringAsciiString &) – Return type: Resource_DataMapOfAsciiStringAsciiString
-
Bind
()¶ Parameters: - K (TCollection_AsciiString &) –
- I (TCollection_AsciiString &) –
Return type:
-
ChangeFind
()¶ Parameters: K (TCollection_AsciiString &) – Return type: TCollection_AsciiString
-
ChangeFind1
()¶ Parameters: K (TCollection_AsciiString &) – Return type: Standard_Address
-
Find
()¶ Parameters: K (TCollection_AsciiString &) – Return type: TCollection_AsciiString
-
Find1
()¶ Parameters: K (TCollection_AsciiString &) – Return type: Standard_Address
-
Set
()¶ Parameters: Other (Resource_DataMapOfAsciiStringAsciiString &) – Return type: Resource_DataMapOfAsciiStringAsciiString
-
thisown
¶ The membership flag
-
-
class
Resource_DataMapOfAsciiStringExtendedString
(*args)¶ Bases:
OCC.TCollection.TCollection_BasicMap
Parameters: NbBuckets (int) – default value is 1 Return type: None -
Assign
()¶ Parameters: Other (Resource_DataMapOfAsciiStringExtendedString &) – Return type: Resource_DataMapOfAsciiStringExtendedString
-
Bind
()¶ Parameters: - K (TCollection_AsciiString &) –
- I (TCollection_ExtendedString &) –
Return type:
-
ChangeFind
()¶ Parameters: K (TCollection_AsciiString &) – Return type: TCollection_ExtendedString
-
ChangeFind1
()¶ Parameters: K (TCollection_AsciiString &) – Return type: Standard_Address
-
Find
()¶ Parameters: K (TCollection_AsciiString &) – Return type: TCollection_ExtendedString
-
Find1
()¶ Parameters: K (TCollection_AsciiString &) – Return type: Standard_Address
-
Set
()¶ Parameters: Other (Resource_DataMapOfAsciiStringExtendedString &) – Return type: Resource_DataMapOfAsciiStringExtendedString
-
thisown
¶ The membership flag
-
-
class
Resource_LexicalCompare
(*args)¶ Bases:
object
Return type: None -
IsLower
()¶ - Returns True if <Left> is lower than <Right>.
Parameters: - Left (TCollection_AsciiString &) –
- Right (TCollection_AsciiString &) –
Return type:
-
thisown
¶ The membership flag
-
-
class
Resource_Manager
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- Create a Resource manager. Attempts to find the two following files: $CSF_`aName`Defaults/aName $CSF_`aName`UserDefaults/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: - aName (char *) –
- Verbose (bool) – default value is Standard_False
- aName –
- aDefaultsDirectory (TCollection_AsciiString &) –
- anUserDefaultsDirectory (TCollection_AsciiString &) –
- Verbose – default value is Standard_False
Return type: Return type: -
ExtValue
()¶ - Gets the value of an ExtString resource according to its instance and its type.
Parameters: aResourceName (char *) – Return type: Standard_ExtString
-
GetHandle
()¶
-
static
GetResourcePath
()¶ - 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: - aPath (TCollection_AsciiString &) –
- aName (char *) –
- isUserDefaults (bool) –
Return type: void
-
Integer
()¶ - Gets the value of an integer resource according to its instance and its type.
Parameters: aResourceName (char *) – Return type: int
-
Real
()¶ - Gets the value of a real resource according to its instance and its type.
Parameters: aResourceName (char *) – Return type: float
-
Save
()¶ - Save the user resource structure in the specified file. Creates the file if it does not exist.
Return type: bool
-
SetResource
()¶ - Sets the new value of an integer resource. If the resource does not exist, it is created.
Parameters: - aResourceName (char *) –
- aValue (int) –
Return type: void
- Sets the new value of a real resource. If the resource does not exist, it is created.
Parameters: - aResourceName (char *) –
- aValue (float) –
Return type: void
- Sets the new value of an CString resource. If the resource does not exist, it is created.
Parameters: - aResourceName (char *) –
- aValue (char *) –
Return type: void
- Sets the new value of an ExtString resource. If the resource does not exist, it is created.
Parameters: - aResourceName (char *) –
- aValue (Standard_ExtString) –
Return type: void
-
Value
()¶ - Gets the value of a CString resource according to its instance and its type.
Parameters: aResourceName (char *) – Return type: char *
-
thisown
¶ The membership flag
-
Resource_Manager_GetResourcePath
()¶ - 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: - aPath (TCollection_AsciiString &) –
- aName (char *) –
- isUserDefaults (bool) –
Return type: void
-
class
Resource_QuickSortOfArray1
¶ Bases:
object
-
static
Sort
()¶ Parameters: - TheArray (TColStd_Array1OfAsciiString &) –
- Comp (Resource_LexicalCompare &) –
Return type: void
-
thisown
¶ The membership flag
-
static
-
Resource_QuickSortOfArray1_Sort
()¶ Parameters: - TheArray (TColStd_Array1OfAsciiString &) –
- Comp (Resource_LexicalCompare &) –
Return type: void
-
class
Resource_Unicode
¶ Bases:
object
-
static
ConvertANSIToUnicode
()¶ - Converts non-ASCII CString <fromstr> in ANSI format to Unicode ExtendedString <tostr>.
Parameters: - fromstr (char *) –
- tostr (TCollection_ExtendedString &) –
Return type: void
-
static
ConvertEUCToUnicode
()¶ - Converts non-ASCII CString <fromstr> in EUC format to Unicode ExtendedString <tostr>.
Parameters: - fromstr (char *) –
- tostr (TCollection_ExtendedString &) –
Return type: void
-
static
ConvertFormatToUnicode
()¶ - Converts the non-ASCII C string fromstr to the Unicode string of extended characters tostr. fromstr is translated according to the format (either ANSI, EUC, GB or SJIS) returned by the function GetFormat.
Parameters: - fromstr (char *) –
- tostr (TCollection_ExtendedString &) –
Return type: void
-
static
ConvertGBToUnicode
()¶ - Converts non-ASCII CString <fromstr> in GB format to Unicode ExtendedString <tostr>.
Parameters: - fromstr (char *) –
- tostr (TCollection_ExtendedString &) –
Return type: void
-
static
ConvertSJISToUnicode
()¶ - Converts non-ASCII CString <fromstr> in SJIS format to Unicode ExtendedString <tostr>.
Parameters: - fromstr (char *) –
- tostr (TCollection_ExtendedString &) –
Return type: void
-
static
ConvertUnicodeToANSI
()¶ - Converts Unicode ExtendedString <fromstr> to non-ASCII CString <tostr> in ANSI format, limited to <maxsize> characters. To translate the whole <fromstr>, use more than twice the length of <fromstr>. Returns true if <maxsize> has not been reached before end of conversion.
Parameters: - fromstr (TCollection_ExtendedString &) –
- tostr (Standard_PCharacter &) –
- maxsize (int) –
Return type:
-
static
ConvertUnicodeToEUC
()¶ - Converts Unicode ExtendedString <fromstr> to non-ASCII CString <tostr> in EUC format, limited to <maxsize> characters. To translate the whole <fromstr>, use more than twice the length of <fromstr>. Returns true if <maxsize> has not been reached before end of conversion.
Parameters: - fromstr (TCollection_ExtendedString &) –
- tostr (Standard_PCharacter &) –
- maxsize (int) –
Return type:
-
static
ConvertUnicodeToFormat
()¶ - Converts the Unicode string of extended characters fromstr to the non-ASCII C string tostr according to the format (either ANSI, EUC, GB or SJIS) returned by the function GetFormat. maxsize limits the size of the string tostr to a maximum number of characters. You need more than twice the length of the string fromstr to complete the conversion. The function returns true if conversion is complete, i.e. the maximum number of characters maxsize is not reached by tostr before the end of conversion of fromstr.
Parameters: - fromstr (TCollection_ExtendedString &) –
- tostr (Standard_PCharacter &) –
- maxsize (int) –
Return type:
-
static
ConvertUnicodeToGB
()¶ - Converts Unicode ExtendedString <fromstr> to non-ASCII CString <tostr> in GB format, limited to <maxsize> characters. To translate the whole <fromstr>, use more than twice the length of <fromstr>. Returns true if <maxsize> has not been reached before end of conversion.
Parameters: - fromstr (TCollection_ExtendedString &) –
- tostr (Standard_PCharacter &) –
- maxsize (int) –
Return type:
-
static
ConvertUnicodeToSJIS
()¶ - Converts Unicode ExtendedString <fromstr> to non-ASCII CString <tostr> in SJIS format, limited to <maxsize> characters. To translate the whole <fromstr>, use more than twice the length of <fromstr>. Returns true if <maxsize> has not been reached before end of conversion.
Parameters: - fromstr (TCollection_ExtendedString &) –
- tostr (Standard_PCharacter &) –
- maxsize (int) –
Return type:
-
static
GetFormat
()¶ - Returns the current conversion format (either ANSI, EUC, GB or SJIS). The current converting format must be defined in advance with the SetFormat function.
Return type: Resource_FormatType
-
static
ReadFormat
()¶ - Reads converting format from resource ‘FormatType’ in Resource Manager ‘CharSet’
Return type: void
-
static
SetFormat
()¶ - Defines the current conversion format as typecode. This conversion format will then be used by the functions ConvertFormatToUnicode and ConvertUnicodeToFormat to convert the strings.
Parameters: typecode (Resource_FormatType) – Return type: void
-
thisown
¶ The membership flag
-
static
-
Resource_Unicode_ConvertANSIToUnicode
()¶ - Converts non-ASCII CString <fromstr> in ANSI format to Unicode ExtendedString <tostr>.
Parameters: - fromstr (char *) –
- tostr (TCollection_ExtendedString &) –
Return type: void
-
Resource_Unicode_ConvertEUCToUnicode
()¶ - Converts non-ASCII CString <fromstr> in EUC format to Unicode ExtendedString <tostr>.
Parameters: - fromstr (char *) –
- tostr (TCollection_ExtendedString &) –
Return type: void
-
Resource_Unicode_ConvertFormatToUnicode
()¶ - Converts the non-ASCII C string fromstr to the Unicode string of extended characters tostr. fromstr is translated according to the format (either ANSI, EUC, GB or SJIS) returned by the function GetFormat.
Parameters: - fromstr (char *) –
- tostr (TCollection_ExtendedString &) –
Return type: void
-
Resource_Unicode_ConvertGBToUnicode
()¶ - Converts non-ASCII CString <fromstr> in GB format to Unicode ExtendedString <tostr>.
Parameters: - fromstr (char *) –
- tostr (TCollection_ExtendedString &) –
Return type: void
-
Resource_Unicode_ConvertSJISToUnicode
()¶ - Converts non-ASCII CString <fromstr> in SJIS format to Unicode ExtendedString <tostr>.
Parameters: - fromstr (char *) –
- tostr (TCollection_ExtendedString &) –
Return type: void
-
Resource_Unicode_ConvertUnicodeToANSI
()¶ - Converts Unicode ExtendedString <fromstr> to non-ASCII CString <tostr> in ANSI format, limited to <maxsize> characters. To translate the whole <fromstr>, use more than twice the length of <fromstr>. Returns true if <maxsize> has not been reached before end of conversion.
Parameters: - fromstr (TCollection_ExtendedString &) –
- tostr (Standard_PCharacter &) –
- maxsize (int) –
Return type:
-
Resource_Unicode_ConvertUnicodeToEUC
()¶ - Converts Unicode ExtendedString <fromstr> to non-ASCII CString <tostr> in EUC format, limited to <maxsize> characters. To translate the whole <fromstr>, use more than twice the length of <fromstr>. Returns true if <maxsize> has not been reached before end of conversion.
Parameters: - fromstr (TCollection_ExtendedString &) –
- tostr (Standard_PCharacter &) –
- maxsize (int) –
Return type:
-
Resource_Unicode_ConvertUnicodeToFormat
()¶ - Converts the Unicode string of extended characters fromstr to the non-ASCII C string tostr according to the format (either ANSI, EUC, GB or SJIS) returned by the function GetFormat. maxsize limits the size of the string tostr to a maximum number of characters. You need more than twice the length of the string fromstr to complete the conversion. The function returns true if conversion is complete, i.e. the maximum number of characters maxsize is not reached by tostr before the end of conversion of fromstr.
Parameters: - fromstr (TCollection_ExtendedString &) –
- tostr (Standard_PCharacter &) –
- maxsize (int) –
Return type:
-
Resource_Unicode_ConvertUnicodeToGB
()¶ - Converts Unicode ExtendedString <fromstr> to non-ASCII CString <tostr> in GB format, limited to <maxsize> characters. To translate the whole <fromstr>, use more than twice the length of <fromstr>. Returns true if <maxsize> has not been reached before end of conversion.
Parameters: - fromstr (TCollection_ExtendedString &) –
- tostr (Standard_PCharacter &) –
- maxsize (int) –
Return type:
-
Resource_Unicode_ConvertUnicodeToSJIS
()¶ - Converts Unicode ExtendedString <fromstr> to non-ASCII CString <tostr> in SJIS format, limited to <maxsize> characters. To translate the whole <fromstr>, use more than twice the length of <fromstr>. Returns true if <maxsize> has not been reached before end of conversion.
Parameters: - fromstr (TCollection_ExtendedString &) –
- tostr (Standard_PCharacter &) –
- maxsize (int) –
Return type:
-
Resource_Unicode_GetFormat
()¶ - Returns the current conversion format (either ANSI, EUC, GB or SJIS). The current converting format must be defined in advance with the SetFormat function.
Return type: Resource_FormatType
-
Resource_Unicode_ReadFormat
()¶ - Reads converting format from resource ‘FormatType’ in Resource Manager ‘CharSet’
Return type: void
-
Resource_Unicode_SetFormat
()¶ - Defines the current conversion format as typecode. This conversion format will then be used by the functions ConvertFormatToUnicode and ConvertUnicodeToFormat to convert the strings.
Parameters: typecode (Resource_FormatType) – Return type: void
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases