OpenCascade.js
API ReferenceFoundationClassesTKernel

Resource

OCCT package Resource: Resource_FormatType, Resource_LexicalCompare, Resource_Manager, Resource_NoSuchResource, and 1 more bound classes.

Resource_FormatType

Properties(32)

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)
    • aName
    • Verbose
  • constructor(theName: TCollection_AsciiString, theDefaultsDirectory: TCollection_AsciiString, theUserDefaultsDirectory: TCollection_AsciiString, theIsVerbose?: boolean): Resource_Manager

    Create a Resource manager.

    Parameters (4)
    • theName
      description file name
    • theDefaultsDirectory
      default folder for looking description file
    • theUserDefaultsDirectory
      user folder for looking description file
    • theIsVerbose
      print verbose messages

Static methods(3)

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)
    • theResource
    • theValue
      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)
    • aResourceName
    • aValue
  • 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)
    • aResourceName
    • aValue
  • 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)
    • aResourceName
    • aValue
  • Returns internal Ref or User map with parameters.

    Parameters (1)
    • theRefMap
  • IsInitialized(): boolean

    Returns true if Resource have been found.

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.

Constructors(1)