![]() |
Open CASCADE Technology Reference Manual 8.0.1
|
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...
#include <XSControl_Utils.hxx>
Public Member Functions | |
| 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 numnum) 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 numnum) const |
| const char16_t * | EStrValue (const occ::handle< Standard_Transient > &list, const int numnum) 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 typetype, 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 numnum) 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 firstfirst=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 numnum) 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 ...)
| XSControl_Utils::XSControl_Utils | ( | ) |
the only use of this, is to allow a frontal to get one distinct "Utils" set per separate engine
| void XSControl_Utils::AppendCStr | ( | const occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > & | seqval, |
| const char *const | strval ) const |
| void XSControl_Utils::AppendEStr | ( | const occ::handle< NCollection_HSequence< occ::handle< TCollection_HExtendedString > > > & | seqval, |
| const char16_t *const | strval ) const |
| void XSControl_Utils::AppendShape | ( | const occ::handle< NCollection_HSequence< TopoDS_Shape > > & | seqv, |
| const TopoDS_Shape & | shape ) const |
| void XSControl_Utils::AppendTra | ( | const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > & | seqval, |
| const occ::handle< Standard_Transient > & | traval ) const |
| occ::handle< Standard_Transient > XSControl_Utils::ArrToSeq | ( | const occ::handle< Standard_Transient > & | arr | ) | const |
| const char16_t * XSControl_Utils::AsciiToExtended | ( | const char *const | str | ) | const |
| TopoDS_Shape XSControl_Utils::BinderShape | ( | const occ::handle< Standard_Transient > & | tr | ) | const |
From a Transient, returns a Shape. In fact, recognizes ShapeBinder ShapeMapper and HShape.
| TopoDS_Shape XSControl_Utils::CompoundFromSeq | ( | const occ::handle< NCollection_HSequence< TopoDS_Shape > > & | seqval | ) | const |
Converts a list of Shapes to a Compound (a kind of Shape).
| const char * XSControl_Utils::CStrValue | ( | const occ::handle< Standard_Transient > & | list, |
| const int | num ) const |
| const char * XSControl_Utils::DateString | ( | const int | yy, |
| const int | mm, | ||
| const int | dd, | ||
| const int | hh, | ||
| const int | mn, | ||
| const int | ss ) const |
| void XSControl_Utils::DateValues | ( | const char *const | text, |
| int & | yy, | ||
| int & | mm, | ||
| int & | dd, | ||
| int & | hh, | ||
| int & | mn, | ||
| int & | ss ) const |
| const char16_t * XSControl_Utils::EStrValue | ( | const occ::handle< Standard_Transient > & | list, |
| const int | num ) const |
| const char * XSControl_Utils::ExtendedToAscii | ( | const char16_t *const | str | ) | const |
| bool XSControl_Utils::IsAscii | ( | const char16_t *const | str | ) | const |
| bool XSControl_Utils::IsKind | ( | const occ::handle< Standard_Transient > & | item, |
| const occ::handle< Standard_Type > & | what ) const |
| occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > XSControl_Utils::NewSeqCStr | ( | ) | const |
| occ::handle< NCollection_HSequence< occ::handle< TCollection_HExtendedString > > > XSControl_Utils::NewSeqEStr | ( | ) | const |
| occ::handle< NCollection_HSequence< TopoDS_Shape > > XSControl_Utils::NewSeqShape | ( | ) | const |
| occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > XSControl_Utils::NewSeqTra | ( | ) | const |
| int XSControl_Utils::SeqIntValue | ( | const occ::handle< NCollection_HSequence< int > > & | list, |
| const int | num ) const |
| int XSControl_Utils::SeqLength | ( | const occ::handle< Standard_Transient > & | list | ) | const |
| occ::handle< Standard_Transient > XSControl_Utils::SeqToArr | ( | const occ::handle< Standard_Transient > & | seq, |
| const int | first = 1 ) const |
| occ::handle< Standard_Transient > XSControl_Utils::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.
| TopAbs_ShapeEnum XSControl_Utils::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 XSControl_Utils::ShapeValue | ( | const occ::handle< NCollection_HSequence< TopoDS_Shape > > & | seqv, |
| const int | num ) const |
| TopoDS_Shape XSControl_Utils::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>.
| TCollection_AsciiString XSControl_Utils::ToAString | ( | const char *const | strcon | ) | const |
| const char * XSControl_Utils::ToCString | ( | const occ::handle< TCollection_HAsciiString > & | strval | ) | const |
| const char * XSControl_Utils::ToCString | ( | const TCollection_AsciiString & | strval | ) | const |
| const char16_t * XSControl_Utils::ToEString | ( | const occ::handle< TCollection_HExtendedString > & | strval | ) | const |
| const char16_t * XSControl_Utils::ToEString | ( | const TCollection_ExtendedString & | strval | ) | const |
| occ::handle< TCollection_HAsciiString > XSControl_Utils::ToHString | ( | const char *const | strcon | ) | const |
| occ::handle< TCollection_HExtendedString > XSControl_Utils::ToHString | ( | const char16_t *const | strcon | ) | const |
| TCollection_ExtendedString XSControl_Utils::ToXString | ( | const char16_t *const | strcon | ) | const |
| void XSControl_Utils::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 XSControl_Utils::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).
| occ::handle< Standard_Transient > XSControl_Utils::TraValue | ( | const occ::handle< Standard_Transient > & | list, |
| const int | num ) const |
| const char * XSControl_Utils::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.