OCC.Core.Resource module¶
Resource module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_resource.html
-
class
Resource_DataMapOfAsciiStringAsciiString
(*args)¶ Bases:
object
-
Assign
()¶
-
Bind
()¶
-
Bound
()¶
-
ChangeFind
()¶
-
ChangeSeek
()¶
-
Clear
()¶
-
Exchange
()¶
-
Find
()¶
-
IsBound
()¶
-
ReSize
()¶
-
Seek
()¶
-
Set
()¶
-
Size
()¶
-
UnBind
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
Resource_DataMapOfAsciiStringExtendedString
(*args)¶ Bases:
object
-
Assign
()¶
-
Bind
()¶
-
Bound
()¶
-
ChangeFind
()¶
-
ChangeSeek
()¶
-
Clear
()¶
-
Exchange
()¶
-
Find
()¶
-
IsBound
()¶
-
ReSize
()¶
-
Seek
()¶
-
Set
()¶
-
Size
()¶
-
UnBind
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
Resource_LexicalCompare
(*args)¶ Bases:
object
- Return type
-
IsLower
()¶ - Returns True if <Left> is lower than <Right>.
- param Left
- type Left
TCollection_AsciiString
- param Right
- type Right
TCollection_AsciiString
- rtype
bool
-
property
thisown
¶ The membership flag
-
class
Resource_Manager
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- 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:
- param aName
- type aName
char *
- param Verbose
default value is Standard_False
- type Verbose
bool
- rtype
None:param aName:
- type aName
char *
- param aDefaultsDirectory
- type aDefaultsDirectory
TCollection_AsciiString
- param anUserDefaultsDirectory
- type anUserDefaultsDirectory
TCollection_AsciiString
- param Verbose
default value is Standard_False
- type Verbose
bool
- rtype
None
-
static
DownCast
(t)¶
-
ExtValue
()¶ - Gets the value of an ExtString resource according to its instance and its type.
- param aResourceName
- type aResourceName
char *
- rtype
Standard_ExtString
-
Find
()¶ - returns True if the Resource does exist.
- param aResource
- type aResource
char *
- rtype
bool
-
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.
- param aPath
- type aPath
TCollection_AsciiString
- param aName
- type aName
char *
- param isUserDefaults
- type isUserDefaults
bool
- rtype
void
-
Integer
()¶ - Gets the value of an integer resource according to its instance and its type.
- param aResourceName
- type aResourceName
char *
- rtype
int
-
Real
()¶ - Gets the value of a real resource according to its instance and its type.
- param aResourceName
- type aResourceName
char *
- rtype
float
-
Save
()¶ - Save the user resource structure in the specified file. Creates the file if it does not exist.
- rtype
bool
-
SetResource
()¶ - Sets the new value of an integer resource. If the resource does not exist, it is created.
- param aResourceName
- type aResourceName
char *
- param aValue
- type aValue
int
- rtype
void* Sets the new value of a real resource. If the resource does not exist, it is created.
- param aResourceName
- type aResourceName
char *
- param aValue
- type aValue
float
- rtype
void* Sets the new value of an CString resource. If the resource does not exist, it is created.
- param aResourceName
- type aResourceName
char *
- param aValue
- type aValue
char *
- rtype
void* Sets the new value of an ExtString resource. If the resource does not exist, it is created.
- param aResourceName
- type aResourceName
char *
- param aValue
- type aValue
Standard_ExtString
- rtype
void
-
Value
()¶ - Gets the value of a CString resource according to its instance and its type.
- param aResourceName
- type aResourceName
char *
- rtype
char *
-
property
thisown
¶ The membership flag
-
class
Resource_Unicode
¶ Bases:
object
-
static
ConvertANSIToUnicode
()¶ - Converts non-ASCII CString <fromstr> in ANSI format to Unicode ExtendedString <tostr>.
- param fromstr
- type fromstr
char *
- param tostr
- type tostr
TCollection_ExtendedString
- rtype
void
-
static
ConvertBig5ToUnicode
()¶ - Converts non-ASCII CString <fromstr> in Big5 format to Unicode ExtendedString <tostr>.
- param fromstr
- type fromstr
char *
- param tostr
- type tostr
TCollection_ExtendedString
- rtype
bool
-
static
ConvertEUCToUnicode
()¶ - Converts non-ASCII CString <fromstr> in EUC format to Unicode ExtendedString <tostr>.
- param fromstr
- type fromstr
char *
- param tostr
- type tostr
TCollection_ExtendedString
- rtype
void
-
static
ConvertFormatToUnicode
()¶ - Converts the non-ASCII C string (as specified by GetFormat()) to the Unicode string of extended characters.
- param theFromStr
- type theFromStr
char *
- param theToStr
- type theToStr
TCollection_ExtendedString
- rtype
None* Converts the non-ASCII C string in specified format to the Unicode string of extended characters. @param theFormat [in] source encoding @param theFromStr [in] text to convert @param theToStr [out] destination string
- param theFormat
- type theFormat
Resource_FormatType
- param theFromStr
- type theFromStr
char *
- param theToStr
- type theToStr
TCollection_ExtendedString
- rtype
void
-
static
ConvertGBKToUnicode
()¶ - Converts non-ASCII CString <fromstr> in GBK format to Unicode ExtendedString <tostr>.
- param fromstr
- type fromstr
char *
- param tostr
- type tostr
TCollection_ExtendedString
- rtype
bool
-
static
ConvertGBToUnicode
()¶ - Converts non-ASCII CString <fromstr> in GB format to Unicode ExtendedString <tostr>.
- param fromstr
- type fromstr
char *
- param tostr
- type tostr
TCollection_ExtendedString
- rtype
void
-
static
ConvertSJISToUnicode
()¶ - Converts non-ASCII CString <fromstr> in SJIS format to Unicode ExtendedString <tostr>.
- param fromstr
- type fromstr
char *
- param tostr
- type tostr
TCollection_ExtendedString
- rtype
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.
- param fromstr
- type fromstr
TCollection_ExtendedString
- param tostr
- type tostr
Standard_PCharacter
- param maxsize
- type maxsize
int
- rtype
bool
-
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.
- param fromstr
- type fromstr
TCollection_ExtendedString
- param tostr
- type tostr
Standard_PCharacter
- param maxsize
- type maxsize
int
- rtype
bool
-
static
ConvertUnicodeToFormat
()¶ - Converts the Unicode string of extended characters to the non-ASCII string according to specified format. You need more than twice the length of the source string to complete the conversion. The function returns true if conversion is complete, i.e. the maximum number of characters is not reached before the end of conversion. @param theFormat [in] destination encoding @param theFromStr [in] text to convert @param theToStr [out] destination buffer @param theMaxSize [in] destination buffer length
- param theFormat
- type theFormat
Resource_FormatType
- param theFromStr
- type theFromStr
TCollection_ExtendedString
- param theToStr
- type theToStr
Standard_PCharacter
- param theMaxSize
- type theMaxSize
int
- rtype
bool* Converts the Unicode string of extended characters to the non-ASCII string according to the format returned by the function GetFormat. @param theFromStr [in] text to convert @param theToStr [out] destination buffer @param theMaxSize [in] destination buffer length
- param theFromStr
- type theFromStr
TCollection_ExtendedString
- param theToStr
- type theToStr
Standard_PCharacter
- param theMaxSize
- type theMaxSize
int
- rtype
bool
-
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.
- param fromstr
- type fromstr
TCollection_ExtendedString
- param tostr
- type tostr
Standard_PCharacter
- param maxsize
- type maxsize
int
- rtype
bool
-
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.
- param fromstr
- type fromstr
TCollection_ExtendedString
- param tostr
- type tostr
Standard_PCharacter
- param maxsize
- type maxsize
int
- rtype
bool
-
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.
- rtype
Resource_FormatType
-
static
ReadFormat
()¶ - Reads converting format from resource ‘FormatType’ in Resource Manager ‘CharSet’
- rtype
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.
- param typecode
- type typecode
Resource_FormatType
- rtype
void
-
property
thisown
¶ The membership flag
-
static