# OCC.Standard module

class `Handle_Standard_Failure`(*args)

  Bases: `OCC.Standard.Handle_Standard_Transient`

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

    The membership flag

class `Handle_Standard_Transient`(*args)

  Bases: `object`

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

    The membership flag

class `Handle_Standard_Type`(*args)

  Bases: `OCC.Standard.Handle_Standard_Transient`

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

    The membership flag

class `Standard_ErrorHandler`(*args)

  Bases: `object`

  - Create a ErrorHandler (to be used with try{}catch(){}). It uses the ‘setjmp’ and ‘longjmp’ routines.

  Return type: | None

  `Catches`()
    - Returns ‘True’ if the caught exception has the same type or inherits from ‘aType’

    Parameters: | aType (Handle_Standard_Type &) –
    Return type: | bool

  `Destroy`()
    - Unlinks and checks if there is a raised exception.

    Return type: | None

  `Error`()
    - Returns the current Error.

    Return type: | Handle_Standard_Failure

  static `IsInTryBlock`(*args)
    - Test if the code is currently running in a try block

    Return type: | bool

  `Label`()
    - Returns label for jump

    Return type: | Standard_JmpBuf

  static `LastCaughtError`(*args)
    - Returns the caught exception.

    Return type: | Handle_Standard_Failure

  `Unlink`()
    - Removes handler from the handlers list

    Return type: | None

  `thisown`

    The membership flag

class `Standard_ErrorHandlerCallback`(*args, **kwargs)

  Bases: `object`

  `DestroyCallback`()
    - The callback function to perform necessary callback action. Called by the exception handler when it is being destroyed but still has this callback registered.

    Return type: | void

  `thisown`

    The membership flag

`Standard_ErrorHandler_IsInTryBlock`(*args)
  - Test if the code is currently running in a try block

  Return type: | bool

`Standard_ErrorHandler_LastCaughtError`(*args)
  - Returns the caught exception.

  Return type: | Handle_Standard_Failure

class `Standard_Failure`(*args)

  Bases: `OCC.Standard.Standard_Transient`

  - Creates a status object of type ‘Failure’.

  Return type: | None
  Parameters: | f (Standard_Failure &) –
  Return type: | None

  - Creates a status object of type ‘Failure’.

  Parameters: | aString (char *) –
  Return type: | None

  static `Caught`(*args)
    - Returns the last caught exception. Needed when exceptions are emulated by C longjumps, in other cases is also provided for compatibility.

    Return type: | Handle_Standard_Failure

  `Destroy`()

    Return type: | None

  `GetHandle`()
  `GetMessageString`()
    - Returns error message

    Return type: | char *

  `Jump`()
    - Used to throw CASCADE exception from C signal handler. On platforms that do not allow throwing C++ exceptions from this handler (e.g. Linux), uses longjump to get to the current active signal handler, and only then is converted to C++ exception.

    Return type: | None

  static `NewInstance`(*args)
    - Used to construct an instance of the exception object as a handle. Shall be used to protect against possible construction of exception object in C stack – that is dangerous since some of methods require that object was allocated dynamically.

    Parameters: | aMessage (char *) –
    Return type: | Handle_Standard_Failure

  `PrintToString`()

    Standard_Failure_PrintToString(Standard_Failure self) -> std::string

  `SetMessageString`()
    - Sets error message

    Parameters: | aMessage (char *) –
    Return type: | None

  `thisown`

    The membership flag

`Standard_Failure_Caught`(*args)
  - Returns the last caught exception. Needed when exceptions are emulated by C longjumps, in other cases is also provided for compatibility.

  Return type: | Handle_Standard_Failure

`Standard_Failure_NewInstance`(*args)
  - Used to construct an instance of the exception object as a handle. Shall be used to protect against possible construction of exception object in C stack – that is dangerous since some of methods require that object was allocated dynamically.

  Parameters: | aMessage (char *) –
  Return type: | Handle_Standard_Failure

class `Standard_GUID`(*args)

  Bases: `object`

  Return type: | None

  - build a GUID from an ascii string with the following format: Length : 36 char ‘00000000-0000-0000-0000-000000000000’

  Parameters: | aGuid (char *) –
  Return type: | None

  - build a GUID from an unicode string with the following format: //! ‘00000000-0000-0000-0000-000000000000’

  Parameters: | aGuid (Standard_GUID &) – a32b (int) – a16b1 (Standard_ExtCharacter) – a16b2 (Standard_ExtCharacter) – a16b3 (Standard_ExtCharacter) – a8b1 (Standard_Byte) – a8b2 (Standard_Byte) – a8b3 (Standard_Byte) – a8b4 (Standard_Byte) – a8b5 (Standard_Byte) – a8b6 (Standard_Byte) – aGuid – aGuid –
  Return type: | None
  Return type: | None
  Return type: | None
  Return type: | None

  `Assign`()

    Parameters: | uid (Standard_UUID &) – uid –
    Return type: | None
    Return type: | None

  static `CheckGUIDFormat`(*args)
    - Check the format of a GUID string. It checks the size, the position of the ‘-‘ and the correct size of fields.

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

  `Hash`()
    - Hash function for GUID.

    Parameters: | Upper (int) –
    Return type: | int

  static `HashCode`(*args)
    - H method used by collections.

    Parameters: | aguid (Standard_GUID &) – Upper (int) –
    Return type: | int

  static `IsEqual`(*args)
    - Returns True when the two GUID are the same.

    Parameters: | string1 (Standard_GUID &) – string2 (Standard_GUID &) –
    Return type: | bool

  `IsNotSame`()

    Parameters: | uid (Standard_GUID &) –
    Return type: | bool

  `IsSame`()

    Parameters: | uid (Standard_GUID &) –
    Return type: | bool

  `Set`()

    Parameters: | uid (Standard_UUID &) – uid –
    Return type: | None
    Return type: | None

  `ShallowDumpToString`()

    Standard_GUID_ShallowDumpToString(Standard_GUID self) -> std::string

  `ToCString`()
    - translate the GUID into ascii string the aStrGuid is allocated by user. the guid have the following format: //! ‘00000000-0000-0000-0000-000000000000’

    Parameters: | aStrGuid (Standard_PCharacter) –
    Return type: | None

  `ToExtString`()
    - translate the GUID into unicode string the aStrGuid is allocated by user. the guid have the following format: //! ‘00000000-0000-0000-0000-000000000000’

    Parameters: | aStrGuid (Standard_PExtCharacter) –
    Return type: | None

  `ToUUID`()

    Return type: | Standard_UUID

  `thisown`

    The membership flag

`Standard_GUID_CheckGUIDFormat`(*args)
  - Check the format of a GUID string. It checks the size, the position of the ‘-‘ and the correct size of fields.

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

`Standard_GUID_HashCode`(*args)
  - H method used by collections.

  Parameters: | aguid (Standard_GUID &) – Upper (int) –
  Return type: | int

`Standard_GUID_IsEqual`(*args)
  - Returns True when the two GUID are the same.

  Parameters: | string1 (Standard_GUID &) – string2 (Standard_GUID &) –
  Return type: | bool

class `Standard_MMgrOpt`(*args)

  Bases: `OCC.Standard.Standard_MMgrRoot`

  - Constructor. If aClear is True, the allocated emmory will be nullified. For description of other parameters, see description of the class above.

  Parameters: | aClear (bool) – default value is Standard_True aMMap (bool) – default value is Standard_True aCellSize (Standard_Size) – default value is 200 aNbPages (int) – default value is 10000 aThreshold (Standard_Size) – default value is 40000
  Return type: | None

  `thisown`

    The membership flag

class `Standard_MMgrRaw`(*args)

  Bases: `OCC.Standard.Standard_MMgrRoot`

  - Constructor; if aClear is True, the memory will be nullified upon allocation.

  Parameters: | aClear (bool) – default value is Standard_False
  Return type: | None

  `thisown`

    The membership flag

class `Standard_MMgrRoot`(*args, **kwargs)

  Bases: `object`

  `Allocate`()
    - Allocate specified number of bytes. The actually allocated space should be rounded up to double word size (4 bytes), as this is expected by implementation of some classes in OCC (e.g. TCollection_AsciiString)

    Parameters: | theSize (Standard_Size) –
    Return type: | Standard_Address

  `Free`()
    - Frees previously allocated memory at specified address.

    Parameters: | thePtr (Standard_Address) –
    Return type: | void

  `Purge`()
    - Purge internally cached unused memory blocks (if any) by releasing them to the operating system. Must return non-zero if some memory has been actually released, or zero otherwise. If option isDestroyed is True, this means that memory manager is not expected to be used any more; note however that in general case it is still possible to have calls to that instance of memory manager after this (e.g. to free memory of static objects in OCC). Thus this option should command the memory manager to release any cached memory to the system and not cache any more, but still remain operable... //! Default implementation does nothing and returns 0.

    Parameters: | isDestroyed (bool) – default value is Standard_False
    Return type: | int

  `Reallocate`()
    - Reallocate previously allocated memory to contain at least theSize bytes. In case of success, new pointer is returned.

    Parameters: | thePtr (Standard_Address) – theSize (Standard_Size) –
    Return type: | Standard_Address

  `thisown`

    The membership flag

class `Standard_MMgrTBBalloc`(*args)

  Bases: `OCC.Standard.Standard_MMgrRoot`

  - Constructor; if aClear is True, the memory will be nullified upon allocation.

  Parameters: | aClear (bool) – default value is Standard_False
  Return type: | None

  `thisown`

    The membership flag

class `Standard_Mutex`(*args)

  Bases: `OCC.Standard.Standard_ErrorHandlerCallback`

  - Constructor: creates a mutex object and initializes it. It is strongly recommended that mutexes were created as static objects whenever possible.

  Return type: | None

  `Lock`()
    - Method to lock the mutex; waits until the mutex is released by other threads, locks it and then returns

    Return type: | None

  `TryLock`()
    - Method to test the mutex; if the mutex is not hold by other thread, locks it and returns True; otherwise returns False without waiting mutex to be released.

    Return type: | bool

  `Unlock`()
    - Method to unlock the mutex; releases it to other users

    Return type: | None

  `thisown`

    The membership flag

class `Standard_Storable`

  Bases: `object`

  `Delete`()

    Return type: | void

  `HashCode`()
    - Returns a hashed value denoting <self>. This value is in the range 1..<Upper>.

    Parameters: | Upper (int) –
    Return type: | int

  `IsEqual`()
    - Returns true if the direct contents of <self> and <Other> are memberwise equal.

    Parameters: | Other (Standard_Storable &) –
    Return type: | bool

  `IsSimilar`()
    - Returns true if the Deep contents of <self> and <Other> are memberwise equal.

    Parameters: | Other (Standard_Storable &) –
    Return type: | bool

  `thisown`

    The membership flag

class `Standard_Transient`(*args)

  Bases: `object`

  - Empty constructor

  Return type: | None

  - Copy constructor – does nothing

  Parameters: | & (Standard_Transient) –
  Return type: | None

  `Delete`()
    - Memory deallocator for transient classes

    Return type: | void

  `DynamicType`()
    - Returns a type information object about this object.

    Return type: | Handle_Standard_Type

  `GetHandle`()
  `GetRefCount`()
    - Get the reference counter of this object.

    Return type: | int

  `IsInstance`()
    - Returns a true value if this is an instance of Type.

    Parameters: | theType (Handle_Standard_Type &) –
    Return type: | bool

    - Returns a true value if this is an instance of TypeName.

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

  `IsKind`()
    - Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.

    Parameters: | theType (Handle_Standard_Type &) –
    Return type: | bool

    - Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.

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

  `Set`()
    - Assignment operator, needed to avoid copying reference counter

    Parameters: | & (Standard_Transient) –
    Return type: | Standard_Transient

  `This`()
    - Returns a Handle which references this object. Must never be called to objects created in stack.

    Return type: | Handle_Standard_Transient

  `thisown`

    The membership flag

class `Standard_Type`(*args)

  Bases: `OCC.Standard.Standard_Transient`

  - The constructor for a imported type.

  Parameters: | aName (char *) – aSize (int) –
  Return type: | None

  - The constructor for a primitive.

  Parameters: | aName (char *) – aSize (int) – aNumberOfParent (int) – aAncestors (Standard_Address) –
  Return type: | None

  - The constructor for an enumeration.

  Parameters: | aName (char *) – aSize (int) – aNumberOfElement (int) – aNumberOfParent (int) – anAncestors (Standard_Address) – aElements (Standard_Address) –
  Return type: | None

  - The constructor for a class.

  Parameters: | aName (char *) – aSize (int) – aNumberOfParent (int) – anAncestors (Standard_Address) – aFields (Standard_Address) –
  Return type: | None

  `GetHandle`()
  `IsClass`()
    - Returns ‘True’, if the type is a ‘Class’.

    Return type: | bool

  `IsEnumeration`()
    - Returns ‘True’, if the type is an ‘Enumeration’.

    Return type: | bool

  `IsImported`()
    - Returns ‘True’, if the type is imported.

    Return type: | bool

  `IsPrimitive`()
    - Returns ‘True’, if the type is a primitive.

    Return type: | bool

  `Name`()
    - Returns the type name of <self>.

    Return type: | char *

  `NumberOfAncestor`()
    - Returns the number of ancestors of the class.

    Return type: | int

  `NumberOfParent`()
    - Returns the number of direct parents of the class.

    Return type: | int

  `PrintToString`()

    Standard_Type_PrintToString(Standard_Type self) -> std::string

  `Size`()
    - Returns the size of <self> in bytes.

    Return type: | int

  `SubType`()
    - Returns ‘True’, if <self> is the same as <aOther>, or inherits from <aOther>. Note that multiple inheritance is not supported.

    Parameters: | aOther (Handle_Standard_Type &) –
    Return type: | bool

    - Returns ‘True’, if <self> or one of its ancestors has the name equal to theName. Note that multiple inheritance is not supported.

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

  `thisown`

    The membership flag

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

class `standard`

  Bases: `object`

  static `Allocate`(*args)
    - Allocates memory blocks aSize - bytes to allocate

    Parameters: | aSize (Standard_Size) –
    Return type: | Standard_Address

  static `AllocateAligned`(*args)
    - Allocates aligned memory blocks. Should be used with CPU instructions which require specific alignment. For example: SSE requires 16 bytes, AVX requires 32 bytes. @param theSize bytes to allocate @param theAlign alignment in bytes

    Parameters: | theSize (Standard_Size) – theAlign (Standard_Size) –
    Return type: | Standard_Address

  static `Purge`(*args)
    - Deallocates the storage retained on the free list and clears the list. Returns non-zero if some memory has been actually freed.

    Return type: | int

  static `Reallocate`(*args)
    - Reallocates memory blocks aStorage - previously allocated memory block aNewSize - new size in bytes

    Parameters: | aStorage (Standard_Address) – aNewSize (Standard_Size) –
    Return type: | Standard_Address

  `thisown`

    The membership flag

`standard_Allocate`(*args)
  - Allocates memory blocks aSize - bytes to allocate

  Parameters: | aSize (Standard_Size) –
  Return type: | Standard_Address

`standard_AllocateAligned`(*args)
  - Allocates aligned memory blocks. Should be used with CPU instructions which require specific alignment. For example: SSE requires 16 bytes, AVX requires 32 bytes. @param theSize bytes to allocate @param theAlign alignment in bytes

  Parameters: | theSize (Standard_Size) – theAlign (Standard_Size) –
  Return type: | Standard_Address

`standard_Purge`(*args)
  - Deallocates the storage retained on the free list and clears the list. Returns non-zero if some memory has been actually freed.

  Return type: | int

`standard_Reallocate`(*args)
  - Reallocates memory blocks aStorage - previously allocated memory block aNewSize - new size in bytes

  Parameters: | aStorage (Standard_Address) – aNewSize (Standard_Size) –
  Return type: | Standard_Address