This class provides various useful utility routines, to facilitate handling of most common data structures : transients (type, type name ...), strings (ascii or extended, pointed or handled or ...), shapes (reading, writing, testing ...), sequences & arrays (of strings, of transients, of shapes ...), ...
More...
|
| | XSControl_Utils () |
| | the only use of this, is to allow a frontal to get one distinct "Utils" set per separate engine
|
| |
| void | TraceLine (const char *const line) const |
| | Just prints a line into the current Trace File. This allows to better characterise the various trace outputs, as desired.
|
| |
| void | TraceLines (const occ::handle< Standard_Transient > &lines) const |
| | Just prints a line or a set of lines into the current Trace File. <lines> can be a HAscii/ExtendedString (produces a print without ending line) or a HSequence or HArray1 Of .. (one new line per item)
|
| |
| bool | IsKind (const occ::handle< Standard_Transient > &item, const occ::handle< Standard_Type > &what) const |
| |
| const char * | TypeName (const occ::handle< Standard_Transient > &item, const bool nopk=false) const |
| | Returns the name of the dynamic type of an object, i.e. : If it is a Type, its Name If it is a object not a type, the Name of its DynamicType If it is Null, an empty string If <nopk> is False (D), gives complete name If <nopk> is True, returns class name without package.
|
| |
| occ::handle< Standard_Transient > | TraValue (const occ::handle< Standard_Transient > &list, const int num) const |
| |
| occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > | NewSeqTra () const |
| |
| void | AppendTra (const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > &seqval, const occ::handle< Standard_Transient > &traval) const |
| |
| const char * | DateString (const int yy, const int mm, const int dd, const int hh, const int mn, const int ss) const |
| |
| void | DateValues (const char *const text, int &yy, int &mm, int &dd, int &hh, int &mn, int &ss) const |
| |
| const char * | ToCString (const occ::handle< TCollection_HAsciiString > &strval) const |
| |
| const char * | ToCString (const TCollection_AsciiString &strval) const |
| |
| occ::handle< TCollection_HAsciiString > | ToHString (const char *const strcon) const |
| |
| TCollection_AsciiString | ToAString (const char *const strcon) const |
| |
| const char16_t * | ToEString (const occ::handle< TCollection_HExtendedString > &strval) const |
| |
| const char16_t * | ToEString (const TCollection_ExtendedString &strval) const |
| |
| occ::handle< TCollection_HExtendedString > | ToHString (const char16_t *const strcon) const |
| |
| TCollection_ExtendedString | ToXString (const char16_t *const strcon) const |
| |
| const char16_t * | AsciiToExtended (const char *const str) const |
| |
| bool | IsAscii (const char16_t *const str) const |
| |
| const char * | ExtendedToAscii (const char16_t *const str) const |
| |
| const char * | CStrValue (const occ::handle< Standard_Transient > &list, const int num) const |
| |
| const char16_t * | EStrValue (const occ::handle< Standard_Transient > &list, const int num) const |
| |
| occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > | NewSeqCStr () const |
| |
| void | AppendCStr (const occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > &seqval, const char *const strval) const |
| |
| occ::handle< NCollection_HSequence< occ::handle< TCollection_HExtendedString > > > | NewSeqEStr () const |
| |
| void | AppendEStr (const occ::handle< NCollection_HSequence< occ::handle< TCollection_HExtendedString > > > &seqval, const char16_t *const strval) const |
| |
| TopoDS_Shape | CompoundFromSeq (const occ::handle< NCollection_HSequence< TopoDS_Shape > > &seqval) const |
| | Converts a list of Shapes to a Compound (a kind of Shape)
|
| |
| TopAbs_ShapeEnum | ShapeType (const TopoDS_Shape &shape, const bool compound) const |
| | Returns the type of a Shape : true type if <compound> is False If <compound> is True and <shape> is a Compound, iterates on its items. If all are of the same type, returns this type. Else, returns COMPOUND. If it is empty, returns SHAPE For a Null Shape, returns SHAPE.
|
| |
| TopoDS_Shape | SortedCompound (const TopoDS_Shape &shape, const TopAbs_ShapeEnum type, const bool explore, const bool compound) const |
| | From a Shape, builds a Compound as follows : explores it level by level If <explore> is False, only COMPOUND items. Else, all items Adds to the result, shapes which comply to <type>
|
| |
| TopoDS_Shape | ShapeValue (const occ::handle< NCollection_HSequence< TopoDS_Shape > > &seqv, const int num) const |
| |
| occ::handle< NCollection_HSequence< TopoDS_Shape > > | NewSeqShape () const |
| |
| void | AppendShape (const occ::handle< NCollection_HSequence< TopoDS_Shape > > &seqv, const TopoDS_Shape &shape) const |
| |
| occ::handle< Standard_Transient > | ShapeBinder (const TopoDS_Shape &shape, const bool hs=true) const |
| | Creates a Transient Object from a Shape : it is either a Binder (used by functions which require a Transient but can process a Shape, such as viewing functions) or a HShape (according to hs) Default is a HShape.
|
| |
| TopoDS_Shape | BinderShape (const occ::handle< Standard_Transient > &tr) const |
| | From a Transient, returns a Shape. In fact, recognizes ShapeBinder ShapeMapper and HShape.
|
| |
| int | SeqLength (const occ::handle< Standard_Transient > &list) const |
| |
| occ::handle< Standard_Transient > | SeqToArr (const occ::handle< Standard_Transient > &seq, const int first=1) const |
| |
| occ::handle< Standard_Transient > | ArrToSeq (const occ::handle< Standard_Transient > &arr) const |
| |
| int | SeqIntValue (const occ::handle< NCollection_HSequence< int > > &list, const int num) const |
| |
This class provides various useful utility routines, to facilitate handling of most common data structures : transients (type, type name ...), strings (ascii or extended, pointed or handled or ...), shapes (reading, writing, testing ...), sequences & arrays (of strings, of transients, of shapes ...), ...
Also it gives some helps on some data structures from XSTEP, such as printing on standard trace file, recignizing most currently used auxiliary types (Binder,Mapper ...)