File indexing completed on 2025-01-18 10:05:36
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _XSControl_Utils_HeaderFile
0018 #define _XSControl_Utils_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <Standard_CString.hxx>
0025 #include <Standard_Type.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <TColStd_HSequenceOfTransient.hxx>
0028 #include <TColStd_HSequenceOfHAsciiString.hxx>
0029 #include <TColStd_HSequenceOfHExtendedString.hxx>
0030 #include <TopTools_HSequenceOfShape.hxx>
0031 #include <TopAbs_ShapeEnum.hxx>
0032 #include <TColStd_HSequenceOfInteger.hxx>
0033 class Standard_Transient;
0034 class TCollection_HAsciiString;
0035 class TCollection_AsciiString;
0036 class TCollection_HExtendedString;
0037 class TCollection_ExtendedString;
0038 class TopoDS_Shape;
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052 class XSControl_Utils
0053 {
0054 public:
0055
0056 DEFINE_STANDARD_ALLOC
0057
0058
0059
0060
0061 Standard_EXPORT XSControl_Utils();
0062
0063
0064
0065 Standard_EXPORT void TraceLine (const Standard_CString line) const;
0066
0067
0068
0069
0070
0071 Standard_EXPORT void TraceLines (const Handle(Standard_Transient)& lines) const;
0072
0073 Standard_EXPORT Standard_Boolean IsKind (const Handle(Standard_Transient)& item, const Handle(Standard_Type)& what) const;
0074
0075
0076
0077
0078
0079
0080
0081 Standard_EXPORT Standard_CString TypeName (const Handle(Standard_Transient)& item, const Standard_Boolean nopk = Standard_False) const;
0082
0083 Standard_EXPORT Handle(Standard_Transient) TraValue (const Handle(Standard_Transient)& list, const Standard_Integer num) const;
0084
0085 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) NewSeqTra() const;
0086
0087 Standard_EXPORT void AppendTra (const Handle(TColStd_HSequenceOfTransient)& seqval, const Handle(Standard_Transient)& traval) const;
0088
0089 Standard_EXPORT Standard_CString DateString (const Standard_Integer yy, const Standard_Integer mm, const Standard_Integer dd, const Standard_Integer hh, const Standard_Integer mn, const Standard_Integer ss) const;
0090
0091 Standard_EXPORT void DateValues (const Standard_CString text, Standard_Integer& yy, Standard_Integer& mm, Standard_Integer& dd, Standard_Integer& hh, Standard_Integer& mn, Standard_Integer& ss) const;
0092
0093 Standard_EXPORT Standard_CString ToCString (const Handle(TCollection_HAsciiString)& strval) const;
0094
0095 Standard_EXPORT Standard_CString ToCString (const TCollection_AsciiString& strval) const;
0096
0097 Standard_EXPORT Handle(TCollection_HAsciiString) ToHString (const Standard_CString strcon) const;
0098
0099 Standard_EXPORT TCollection_AsciiString ToAString (const Standard_CString strcon) const;
0100
0101 Standard_EXPORT Standard_ExtString ToEString (const Handle(TCollection_HExtendedString)& strval) const;
0102
0103 Standard_EXPORT Standard_ExtString ToEString (const TCollection_ExtendedString& strval) const;
0104
0105 Standard_EXPORT Handle(TCollection_HExtendedString) ToHString (const Standard_ExtString strcon) const;
0106
0107 Standard_EXPORT TCollection_ExtendedString ToXString (const Standard_ExtString strcon) const;
0108
0109 Standard_EXPORT Standard_ExtString AsciiToExtended (const Standard_CString str) const;
0110
0111 Standard_EXPORT Standard_Boolean IsAscii (const Standard_ExtString str) const;
0112
0113 Standard_EXPORT Standard_CString ExtendedToAscii (const Standard_ExtString str) const;
0114
0115 Standard_EXPORT Standard_CString CStrValue (const Handle(Standard_Transient)& list, const Standard_Integer num) const;
0116
0117 Standard_EXPORT Standard_ExtString EStrValue (const Handle(Standard_Transient)& list, const Standard_Integer num) const;
0118
0119 Standard_EXPORT Handle(TColStd_HSequenceOfHAsciiString) NewSeqCStr() const;
0120
0121 Standard_EXPORT void AppendCStr (const Handle(TColStd_HSequenceOfHAsciiString)& seqval, const Standard_CString strval) const;
0122
0123 Standard_EXPORT Handle(TColStd_HSequenceOfHExtendedString) NewSeqEStr() const;
0124
0125 Standard_EXPORT void AppendEStr (const Handle(TColStd_HSequenceOfHExtendedString)& seqval, const Standard_ExtString strval) const;
0126
0127
0128 Standard_EXPORT TopoDS_Shape CompoundFromSeq (const Handle(TopTools_HSequenceOfShape)& seqval) const;
0129
0130
0131
0132
0133
0134
0135 Standard_EXPORT TopAbs_ShapeEnum ShapeType (const TopoDS_Shape& shape, const Standard_Boolean compound) const;
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146 Standard_EXPORT TopoDS_Shape SortedCompound (const TopoDS_Shape& shape, const TopAbs_ShapeEnum type, const Standard_Boolean explore, const Standard_Boolean compound) const;
0147
0148 Standard_EXPORT TopoDS_Shape ShapeValue (const Handle(TopTools_HSequenceOfShape)& seqv, const Standard_Integer num) const;
0149
0150 Standard_EXPORT Handle(TopTools_HSequenceOfShape) NewSeqShape() const;
0151
0152 Standard_EXPORT void AppendShape (const Handle(TopTools_HSequenceOfShape)& seqv, const TopoDS_Shape& shape) const;
0153
0154
0155
0156
0157
0158 Standard_EXPORT Handle(Standard_Transient) ShapeBinder (const TopoDS_Shape& shape, const Standard_Boolean hs = Standard_True) const;
0159
0160
0161
0162 Standard_EXPORT TopoDS_Shape BinderShape (const Handle(Standard_Transient)& tr) const;
0163
0164 Standard_EXPORT Standard_Integer SeqLength (const Handle(Standard_Transient)& list) const;
0165
0166 Standard_EXPORT Handle(Standard_Transient) SeqToArr (const Handle(Standard_Transient)& seq, const Standard_Integer first = 1) const;
0167
0168 Standard_EXPORT Handle(Standard_Transient) ArrToSeq (const Handle(Standard_Transient)& arr) const;
0169
0170 Standard_EXPORT Standard_Integer SeqIntValue (const Handle(TColStd_HSequenceOfInteger)& list, const Standard_Integer num) const;
0171
0172
0173
0174
0175 protected:
0176
0177
0178
0179
0180
0181 private:
0182
0183
0184
0185
0186
0187 };
0188
0189
0190
0191
0192
0193
0194
0195 #endif