Standard
OCCT package Standard: Handle_Standard_Type, Standard, Standard_ArrayStreamBuffer, Standard_CLocaleSentry, and 36 more bound classes.
Handle_Standard_Type
Constructors(3)
- constructor(thePtr: Standard_Type): Handle_Standard_TypeParameters (1)
thePtr
- constructor(theHandle: opencascade_handle): Handle_Standard_TypeParameters (1)
theHandle
Instance methods(4)
- Nullify(): void
- IsNull(): boolean
- reset(thePtr: Standard_Type): voidParameters (1)
thePtr
- get(): Standard_Type
Standard
The package Standard provides global memory allocator and other basic services used by other OCCT components.
Constructors(1)
Static methods(2)
- GetAllocatorType(): Standard_AllocatorType
Returns default allocator type.
- Purge(): number
Deallocates the storage retained on the free list and clears the list. Returns non-zero if some memory has been actually freed.
Standard_ArrayStreamBuffer
Custom buffer object implementing STL interface std::streambuf for streamed reading from allocated memory block. Implements minimal sub-set of methods for passing buffer to std::istream, including seek support.
This class can be used for creating a seekable input stream in cases, when the source data does not satisfies Reader requirements (non-seekable stream, compressed data) or represents an in-memory resource.
The memory itself is NOT managed by this class - it is up to the caller to ensure that passed memory pointer is not released during Standard_ArrayStreamBuffer lifetime.
Usage example:
Constructors(1)
- constructor(theBegin: string, theSize: number): Standard_ArrayStreamBuffer
Main constructor. Passed pointer is stored as is (memory is NOT copied nor released with destructor).
Parameters (2)theBegin—pointer to the beginning of pre-allocated buffertheSize—length of pre-allocated buffer
Instance methods(2)
- Init(theBegin: string, theSize: number): void
(Re)-initialize the stream. Passed pointer is stored as is (memory is NOT copied nor released with destructor).
Parameters (2)theBegin—pointer to the beginning of pre-allocated buffertheSize—length of pre-allocated buffer
- xsgetn(thePtr: string, theCount: number): number
Read a bunch of bytes at once.
Parameters (2)thePtrtheCount
Standard_CLocaleSentry
We check _GNU_SOURCE for glibc extensions here and it is always defined by g++ compiler.
This class intended to temporary switch C locale and logically equivalent to setlocale(LC_ALL, "C"). It is intended to format text regardless of user locale settings (for import/export functionality). Thus following calls to Sprintf, atoi and other functions will use "C" locale. Destructor of this class will return original locale.
Notice that this functionality is platform dependent and intended only to workaround alien code that doesn't setup locale correctly.
Internally you should prefer more portable C++ locale interfaces or OCCT wrappers to some C functions like Sprintf, Atof, Strtod.
Constructors(1)
Setup current C locale to "C".
Static methods(1)
- GetCLocale(): unknownReturns
locale "C" instance (locale_t within xlocale or _locale_t within Windows) to be used for _l functions with locale argument.
Standard_Condition
This is boolean flag intended for communication between threads. One thread sets this flag to TRUE to indicate some event happened and another thread either waits this event or checks periodically its state to perform job.
This class provides interface similar to WinAPI Event objects.
Constructors(1)
- constructor(theIsSet?: boolean): Standard_Condition
Default constructor.
Parameters (1)theIsSet—Initial flag state
Instance methods(6)
- Set(): void
Set event into signaling state.
- Reset(): void
Reset event (unset signaling state).
- Wait(): void
Wait for Event (infinity).
- Wait(theTimeMilliseconds: number): boolean
Wait for signal requested time.
Parameters (1)theTimeMilliseconds—wait limit in milliseconds
Returnstrue if get event
- Check(): boolean
Do not wait for signal - just test it state.
Returnstrue if get event
- CheckReset(): boolean
Method perform two steps at-once - reset the event object and returns true if it was in signaling state.
Returnstrue if event object was in signaling state.
Standard_ConstructionError
Constructors(2)
- constructor(theMessage: string): Standard_ConstructionErrorParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_ConstructionErrorParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_CStringHasher
Constructors(1)
Standard_DimensionError
Constructors(2)
- constructor(theMessage: string): Standard_DimensionErrorParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_DimensionErrorParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_DimensionMismatch
Constructors(2)
- constructor(theMessage: string): Standard_DimensionMismatchParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_DimensionMismatchParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_DivideByZero
Constructors(2)
- constructor(theMessage: string): Standard_DivideByZeroParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_DivideByZeroParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_DomainError
Constructors(2)
- constructor(theMessage: string): Standard_DomainErrorParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_DomainErrorParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_DumpValue
Type for storing a dump value with the stream position.
Constructors(2)
- constructor(theValue: TCollection_AsciiString, theStartPos: number): Standard_DumpValueParameters (2)
theValuetheStartPos
Properties(2)
Standard_ErrorHandler_Callback
Instance methods(3)
- RegisterCallback(): void
- UnregisterCallback(): void
- DestroyCallback(): void
Standard_Failure
Forms the root of the entire exception hierarchy. Inherits from std::exception and implements what() interface.
Constructors(4)
Creates a status object of type "Failure".
- constructor(theOther: Standard_Failure): Standard_Failure
Copy constructor.
Parameters (1)theOther
- constructor(theMessage: string): Standard_Failure
Creates a status object of type "Failure" with message.
Parameters (1)theMessage—exception description
- constructor(theMessage: string, theStackTrace: string): Standard_Failure
Creates a status object of type "Failure" with message and stack trace.
Parameters (2)theMessage—exception descriptiontheStackTrace—stack trace string
Static methods(2)
- DefaultStackTraceLength(): number
Returns the default length of stack trace to be captured by
Standard_Failureconstructor; 0 by default meaning no stack trace. - SetDefaultStackTraceLength(theNbStackTraces: number): void
Sets default length of stack trace to be captured by
Standard_Failureconstructor.Parameters (1)theNbStackTraces
Instance methods(4)
- what(): string
Returns error message (implements std::exception interface). Returns empty string "" if no message was set.
- GetMessageString(): string
Returns error message.
Deprecated - ExceptionType(): string
Returns the exception type name. Default implementation returns "Standard_Failure". Derived classes override this to return their own type name.
- GetStackString(): string
Returns the stack trace string (empty string if not available).
Standard_GUID
Constructors(4)
Creates a GUID with all zeros.
- constructor(aGuid: string): Standard_GUID
build a GUID from an ascii string with the following format: Length : 36 char "00000000-0000-0000-0000-000000000000"
Parameters (1)aGuid
- constructor(theUUID: Standard_UUID): Standard_GUID
build a GUID from an unicode string with the following format:
"00000000-0000-0000-0000-000000000000"Parameters (1)theUUID
- constructor(theGuid: Standard_GUID): Standard_GUID
Creates a GUID from a
Standard_UUID.Parameters (1)theGuid
Static methods(1)
- CheckGUIDFormat(aGuid: string): boolean
Check the format of a GUID string. It checks the size, the position of the '-' and the correct size of fields.
Parameters (1)aGuid
Instance methods(7)
- ToCString(aStrGuid: string): void
translate the GUID into ascii string the aStrGuid is allocated by user. the guid have the following format:
"00000000-0000-0000-0000-000000000000"Parameters (1)aStrGuid
- ToExtString(aStrGuid: string): void
translate the GUID into unicode string the aStrGuid is allocated by user. the guid have the following format:
"00000000-0000-0000-0000-000000000000"Parameters (1)aStrGuid
Converts to
Standard_UUID.- IsSame(uid: Standard_GUID): boolean
Returns true if this GUID is equal to uid.
Parameters (1)uid
- IsNotSame(uid: Standard_GUID): boolean
Returns true if this GUID is not equal to uid.
Parameters (1)uid
- Assign(uid: Standard_GUID): void
Assigns uid to this GUID.
Parameters (1)uid
- Assign(uid: Standard_UUID): void
Assigns uid to this GUID.
Parameters (1)uid
Standard_HMutex
Template defining a class derived from the specified base class and Standard_Transient, and supporting OCCT RTTI.
This provides possibility to use Handes for types not initially intended to be dynamically allocated.
Current limitation is that only copy and constructors with 1-3 arguments are defined, calling those of the argument class (default constructor must be available). It can be improved when perfect forwarding of template arguments is supported by all compilers used for OCCT.
The intent is similar to std::make_shared<> in STL, except that this implementation defines a separate type.
Constructors(1)
Default constructor.
Standard_JsonKey
Properties(8)
Standard_MultiplyDefined
Constructors(2)
- constructor(theMessage: string): Standard_MultiplyDefinedParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_MultiplyDefinedParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_Mutex
Constructors(1)
Instance methods(3)
Standard_Mutex_Sentry
Standard_NegativeValue
Constructors(2)
- constructor(theMessage: string): Standard_NegativeValueParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_NegativeValueParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_NoMoreObject
Constructors(2)
- constructor(theMessage: string): Standard_NoMoreObjectParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_NoMoreObjectParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_NoSuchObject
Constructors(2)
- constructor(theMessage: string): Standard_NoSuchObjectParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_NoSuchObjectParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_NotImplemented
Constructors(2)
- constructor(theMessage: string): Standard_NotImplementedParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_NotImplementedParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_NullObject
Constructors(2)
- constructor(theMessage: string): Standard_NullObjectParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_NullObjectParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_NullValue
Constructors(2)
- constructor(theMessage: string): Standard_NullValueParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_NullValueParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_NumericError
Constructors(2)
- constructor(theMessage: string): Standard_NumericErrorParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_NumericErrorParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_OutOfMemory
Standard_OutOfMemory exception is defined explicitly and not by macro DEFINE_STANDARD_EXCEPTION, to avoid necessity of dynamic memory allocations during throwing and stack unwinding:
- message string is stored as field, not allocated dynamically (storable message length is limited by buffer size)
The reason is that in out-of-memory condition any memory allocation can fail, thus use of operator new for allocation of new exception instance is dangerous (can cause recursion until stack overflow, see #24836).
Constructors(1)
- constructor(theMessage?: string): Standard_OutOfMemory
Constructor is kept public for backward compatibility.
Parameters (1)theMessage—optional error message
Instance methods(3)
- what(): string
Returns error message (implements std::exception interface).
- ExceptionType(): string
Returns the exception type name.
- SetMessageString(theMessage: string): void
Sets error message.
Parameters (1)theMessage—error message (can be nullptr)
Standard_OutOfRange
Constructors(2)
- constructor(theMessage: string): Standard_OutOfRangeParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_OutOfRangeParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_Overflow
Constructors(2)
- constructor(theMessage: string): Standard_OverflowParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_OverflowParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_Persistent
Root of "persistent" classes, a legacy support of object oriented databases, now outdated.
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(2)
- TypeNum(): number
Standard_ProgramError
Constructors(2)
- constructor(theMessage: string): Standard_ProgramErrorParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_ProgramErrorParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_RangeError
Constructors(2)
- constructor(theMessage: string): Standard_RangeErrorParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_RangeErrorParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_ReadBuffer
Auxiliary tool for buffered reading from input stream within chunks of constant size.
Constructors(1)
- constructor(theDataLen: number, theChunkLen: number, theIsPartialPayload?: boolean): Standard_ReadBuffer
Constructor with initialization.
Parameters (3)theDataLentheChunkLentheIsPartialPayload
Instance methods(2)
- Init(theDataLen: number, theChunkLen: number, theIsPartialPayload?: boolean): void
Initialize the buffer.
Parameters (3)theDataLen—the full length of input data to read from stream.theChunkLen—the length of single chunk to readtheIsPartialPayload—when FALSE, theDataLen will be automatically aligned to the multiple of theChunkLen; when TRUE, last chunk will be read from stream exactly till theDataLen allowing portion of chunk to be uninitialized (useful for interleaved data)
- IsDone(): boolean
Return TRUE if amount of read bytes is equal to requested length of entire data.
Standard_ReadLineBuffer
Auxiliary tool for buffered reading of lines from input stream.
Constructors(1)
- constructor(theMaxBufferSizeBytes: number): Standard_ReadLineBuffer
Constructor with initialization.
Parameters (1)theMaxBufferSizeBytes—the length of buffer to read (in bytes)
Instance methods(4)
- Clear(): void
Clear buffer and cached values.
- IsMultilineMode(): boolean
Returns TRUE when the Multiline Mode is on; FALSE by default. Multiline modes joins several lines in file having \ at the end of line:
- ToPutGapInMultiline(): boolean
Put gap space while merging lines within multiline syntax, so that the following sample:
Will become "1/2/3 4/5/6" when flag is TRUE, and "1/2/35/5/6" otherwise.
- SetMultilineMode(theMultilineMode: boolean, theToPutGap?: boolean): void
Sets or unsets the multi-line mode.
Parameters (2)theMultilineMode—multiline mode flagtheToPutGap—put gap space while connecting lines (no gap otherwise)
Standard_Transient
Abstract class which forms the root of the entire Transient class hierarchy.
Constructors(2)
Empty constructor.
Copy constructor - does nothing.
Parameters (1)a0
Static methods(2)
- get_type_name(): string
Instance methods(12)
- isNull(): boolean
Returns true if the underlying handle is null.
- nullify(): void
Releases the handle, setting it to null.
- IsInstance(theType: Standard_Type): booleanParameters (1)
theType
- IsInstance(theTypeName: string): booleanParameters (1)
theTypeName
- IsKind(theType: Standard_Type): booleanParameters (1)
theType
- IsKind(theTypeName: string): booleanParameters (1)
theTypeName
- GetRefCount(): number
- IncrementRefCounter(): void
- DecrementRefCounter(): number
- Delete(): void
Standard_Type
This class provides legacy interface (type descriptor) to run-time type information (RTTI) for OCCT classes inheriting from Standard_Transient.
In addition to features provided by standard C++ RTTI (type_info), Standard_Type allows passing descriptor as an object and using it for analysis of the type:
- get descriptor of a parent class
- get user-defined name of the class
- get size of the object
Use static template methodInstance()to get descriptor for a given type. Objects supporting OCCT RTTI return their type descriptor by methodDynamicType().
To be usable with OCCT type system, the class should provide: - typedef
base_typeto its base class in the hierarchy - method
get_type_name()returning programmer-defined name of the class (as a statically allocated constant C string or string literal)
Note that user-defined name is used since typeid.name() is usually mangled in compiler-dependent way.
Only single chain of inheritance is supported, with a root base classStandard_Transient.
Static methods(3)
- Register(theInfo: unknown, theName: string, theSize: number, theParent: Standard_Type): Standard_Type
Register a type; returns either new or existing descriptor.
Note that this function is intended for use by STANDARD_RTTIEXT macros only.Parameters (4)theInfo—object stores system name of the classtheName—name of the class to be stored in Name fieldtheSize—size of the class instancetheParent—base class in the Transient hierarchy
- get_type_name(): string
Instance methods(7)
- SystemName(): string
Returns the system type name of the class (typeinfo.name).
- Name(): string
Returns the given name of the class type (get_type_name).
- Size(): number
Returns the size of the class instance in bytes.
Returns descriptor of the base class in the hierarchy.
- SubType(theOther: Standard_Type): boolean
Returns True if this type is the same as theOther, or inherits from theOther. Note that multiple inheritance is not supported.
Parameters (1)theOther
- SubType(theOther: string): boolean
Returns True if this type is the same as theOther, or inherits from theOther. Note that multiple inheritance is not supported.
Parameters (1)theOther
Standard_TypeMismatch
Constructors(2)
- constructor(theMessage: string): Standard_TypeMismatchParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_TypeMismatchParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Standard_Underflow
Constructors(2)
- constructor(theMessage: string): Standard_UnderflowParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Standard_UnderflowParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string