# OCC.Resource module

class `Handle_Resource_DataMapNodeOfDataMapOfAsciiStringAsciiString`(*args)

  Bases: `OCC.TCollection.Handle_TCollection_MapNode`

  static `DownCast`()
  `GetObject`()
  `IsNull`()
  `Nullify`()
  `thisown`

    The membership flag

class `Handle_Resource_DataMapNodeOfDataMapOfAsciiStringExtendedString`(*args)

  Bases: `OCC.TCollection.Handle_TCollection_MapNode`

  static `DownCast`()
  `GetObject`()
  `IsNull`()
  `Nullify`()
  `thisown`

    The membership flag

class `Handle_Resource_Manager`(*args)

  Bases: `OCC.MMgt.Handle_MMgt_TShared`

  static `DownCast`()
  `GetObject`()
  `IsNull`()
  `Nullify`()
  `thisown`

    The membership flag

class `Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString`(*args)

  Bases: `OCC.TCollection.TCollection_BasicMapIterator`

  Return type: | None
  Parameters: | aMap (Resource_DataMapOfAsciiStringAsciiString &) –
  Return type: | None

  `Initialize`()

    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

  `Initialize`()

    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: | None

  `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: | None

  `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: | bool

  `ChangeFind`()

    Parameters: | K (TCollection_AsciiString &) –
    Return type: | TCollection_AsciiString

  `ChangeFind1`()

    Parameters: | K (TCollection_AsciiString &) –
    Return type: | Standard_Address

  `Clear`()

    Return type: | None

  `Find`()

    Parameters: | K (TCollection_AsciiString &) –
    Return type: | TCollection_AsciiString

  `Find1`()

    Parameters: | K (TCollection_AsciiString &) –
    Return type: | Standard_Address

  `IsBound`()

    Parameters: | K (TCollection_AsciiString &) –
    Return type: | bool

  `ReSize`()

    Parameters: | NbBuckets (int) –
    Return type: | None

  `Set`()

    Parameters: | Other (Resource_DataMapOfAsciiStringAsciiString &) –
    Return type: | Resource_DataMapOfAsciiStringAsciiString

  `UnBind`()

    Parameters: | K (TCollection_AsciiString &) –
    Return type: | bool

  `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: | bool

  `ChangeFind`()

    Parameters: | K (TCollection_AsciiString &) –
    Return type: | TCollection_ExtendedString

  `ChangeFind1`()

    Parameters: | K (TCollection_AsciiString &) –
    Return type: | Standard_Address

  `Clear`()

    Return type: | None

  `Find`()

    Parameters: | K (TCollection_AsciiString &) –
    Return type: | TCollection_ExtendedString

  `Find1`()

    Parameters: | K (TCollection_AsciiString &) –
    Return type: | Standard_Address

  `IsBound`()

    Parameters: | K (TCollection_AsciiString &) –
    Return type: | bool

  `ReSize`()

    Parameters: | NbBuckets (int) –
    Return type: | None

  `Set`()

    Parameters: | Other (Resource_DataMapOfAsciiStringExtendedString &) –
    Return type: | Resource_DataMapOfAsciiStringExtendedString

  `UnBind`()

    Parameters: | K (TCollection_AsciiString &) –
    Return type: | bool

  `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: | bool

  `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: | None
  Return type: | None

  `ExtValue`()
    - Gets the value of an ExtString resource according to its instance and its type.

    Parameters: | aResourceName (char *) –
    Return type: | Standard_ExtString

  `Find`()
    - returns True if the Resource does exist.

    Parameters: | aResource (char *) –
    Return type: | bool

  `GetHandle`()
  static `GetResourcePath`(*args)
    - 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`(*args)
  - 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`(*args)

    Parameters: | TheArray (TColStd_Array1OfAsciiString &) – Comp (Resource_LexicalCompare &) –
    Return type: | void

  `thisown`

    The membership flag

`Resource_QuickSortOfArray1_Sort`(*args)

  Parameters: | TheArray (TColStd_Array1OfAsciiString &) – Comp (Resource_LexicalCompare &) –
  Return type: | void

class `Resource_Unicode`

  Bases: `object`

  static `ConvertANSIToUnicode`(*args)
    - Converts non-ASCII CString <fromstr> in ANSI format to Unicode ExtendedString <tostr>.

    Parameters: | fromstr (char *) – tostr (TCollection_ExtendedString &) –
    Return type: | void

  static `ConvertEUCToUnicode`(*args)
    - Converts non-ASCII CString <fromstr> in EUC format to Unicode ExtendedString <tostr>.

    Parameters: | fromstr (char *) – tostr (TCollection_ExtendedString &) –
    Return type: | void

  static `ConvertFormatToUnicode`(*args)
    - 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`(*args)
    - Converts non-ASCII CString <fromstr> in GB format to Unicode ExtendedString <tostr>.

    Parameters: | fromstr (char *) – tostr (TCollection_ExtendedString &) –
    Return type: | void

  static `ConvertSJISToUnicode`(*args)
    - Converts non-ASCII CString <fromstr> in SJIS format to Unicode ExtendedString <tostr>.

    Parameters: | fromstr (char *) – tostr (TCollection_ExtendedString &) –
    Return type: | void

  static `ConvertUnicodeToANSI`(*args)
    - 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: | bool

  static `ConvertUnicodeToEUC`(*args)
    - 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: | bool

  static `ConvertUnicodeToFormat`(*args)
    - 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: | bool

  static `ConvertUnicodeToGB`(*args)
    - 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: | bool

  static `ConvertUnicodeToSJIS`(*args)
    - 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: | bool

  static `GetFormat`(*args)
    - 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`(*args)
    - Reads converting format from resource ‘FormatType’ in Resource Manager ‘CharSet’

    Return type: | void

  static `SetFormat`(*args)
    - 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

`Resource_Unicode_ConvertANSIToUnicode`(*args)
  - Converts non-ASCII CString <fromstr> in ANSI format to Unicode ExtendedString <tostr>.

  Parameters: | fromstr (char *) – tostr (TCollection_ExtendedString &) –
  Return type: | void

`Resource_Unicode_ConvertEUCToUnicode`(*args)
  - Converts non-ASCII CString <fromstr> in EUC format to Unicode ExtendedString <tostr>.

  Parameters: | fromstr (char *) – tostr (TCollection_ExtendedString &) –
  Return type: | void

`Resource_Unicode_ConvertFormatToUnicode`(*args)
  - 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`(*args)
  - Converts non-ASCII CString <fromstr> in GB format to Unicode ExtendedString <tostr>.

  Parameters: | fromstr (char *) – tostr (TCollection_ExtendedString &) –
  Return type: | void

`Resource_Unicode_ConvertSJISToUnicode`(*args)
  - Converts non-ASCII CString <fromstr> in SJIS format to Unicode ExtendedString <tostr>.

  Parameters: | fromstr (char *) – tostr (TCollection_ExtendedString &) –
  Return type: | void

`Resource_Unicode_ConvertUnicodeToANSI`(*args)
  - 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: | bool

`Resource_Unicode_ConvertUnicodeToEUC`(*args)
  - 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: | bool

`Resource_Unicode_ConvertUnicodeToFormat`(*args)
  - 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: | bool

`Resource_Unicode_ConvertUnicodeToGB`(*args)
  - 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: | bool

`Resource_Unicode_ConvertUnicodeToSJIS`(*args)
  - 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: | bool

`Resource_Unicode_GetFormat`(*args)
  - 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`(*args)
  - Reads converting format from resource ‘FormatType’ in Resource Manager ‘CharSet’

  Return type: | void

`Resource_Unicode_SetFormat`(*args)
  - 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`()

`register_handle`(handle, base_object)

  Inserts the handle into the base object to prevent memory corruption in certain cases