File indexing completed on 2025-01-18 10:05:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _TDataStd_NamedData_HeaderFile
0017 #define _TDataStd_NamedData_HeaderFile
0018
0019 #include <TDF_Attribute.hxx>
0020 #include <TColStd_DataMapOfStringInteger.hxx>
0021 #include <TDataStd_DataMapOfStringReal.hxx>
0022 #include <TDataStd_DataMapOfStringString.hxx>
0023 #include <TDataStd_DataMapOfStringByte.hxx>
0024 #include <TDataStd_DataMapOfStringHArray1OfInteger.hxx>
0025 #include <TDataStd_DataMapOfStringHArray1OfReal.hxx>
0026
0027 class TDataStd_HDataMapOfStringInteger;
0028 class TDataStd_HDataMapOfStringReal;
0029 class TDataStd_HDataMapOfStringString;
0030 class TDataStd_HDataMapOfStringByte;
0031 class TDataStd_HDataMapOfStringHArray1OfInteger;
0032 class TDataStd_HDataMapOfStringHArray1OfReal;
0033 class TCollection_ExtendedString;
0034
0035 class TDataStd_NamedData;
0036 DEFINE_STANDARD_HANDLE(TDataStd_NamedData, TDF_Attribute)
0037
0038
0039 class TDataStd_NamedData : public TDF_Attribute
0040 {
0041 public:
0042
0043
0044 Standard_EXPORT static const Standard_GUID& GetID();
0045
0046
0047 Standard_EXPORT static Handle(TDataStd_NamedData) Set (const TDF_Label& label);
0048
0049 public:
0050
0051
0052 Standard_EXPORT TDataStd_NamedData();
0053
0054
0055 Standard_EXPORT Standard_Boolean HasIntegers() const;
0056
0057
0058
0059 Standard_EXPORT Standard_Boolean HasInteger (const TCollection_ExtendedString& theName) const;
0060
0061
0062
0063
0064 Standard_EXPORT Standard_Integer GetInteger (const TCollection_ExtendedString& theName);
0065
0066
0067
0068 Standard_EXPORT void SetInteger (const TCollection_ExtendedString& theName, const Standard_Integer theInteger);
0069
0070
0071 Standard_EXPORT const TColStd_DataMapOfStringInteger& GetIntegersContainer();
0072
0073
0074 Standard_EXPORT void ChangeIntegers (const TColStd_DataMapOfStringInteger& theIntegers);
0075
0076
0077 Standard_EXPORT Standard_Boolean HasReals() const;
0078
0079
0080 Standard_EXPORT Standard_Boolean HasReal (const TCollection_ExtendedString& theName) const;
0081
0082
0083
0084
0085 Standard_EXPORT Standard_Real GetReal (const TCollection_ExtendedString& theName);
0086
0087
0088
0089 Standard_EXPORT void SetReal (const TCollection_ExtendedString& theName, const Standard_Real theReal);
0090
0091
0092 Standard_EXPORT const TDataStd_DataMapOfStringReal& GetRealsContainer();
0093
0094
0095 Standard_EXPORT void ChangeReals (const TDataStd_DataMapOfStringReal& theReals);
0096
0097
0098 Standard_EXPORT Standard_Boolean HasStrings() const;
0099
0100
0101 Standard_EXPORT Standard_Boolean HasString (const TCollection_ExtendedString& theName) const;
0102
0103
0104
0105
0106 Standard_EXPORT const TCollection_ExtendedString& GetString (const TCollection_ExtendedString& theName);
0107
0108
0109
0110 Standard_EXPORT void SetString (const TCollection_ExtendedString& theName, const TCollection_ExtendedString& theString);
0111
0112
0113 Standard_EXPORT const TDataStd_DataMapOfStringString& GetStringsContainer();
0114
0115
0116 Standard_EXPORT void ChangeStrings (const TDataStd_DataMapOfStringString& theStrings);
0117
0118
0119 Standard_EXPORT Standard_Boolean HasBytes() const;
0120
0121
0122 Standard_EXPORT Standard_Boolean HasByte (const TCollection_ExtendedString& theName) const;
0123
0124
0125
0126
0127 Standard_EXPORT Standard_Byte GetByte (const TCollection_ExtendedString& theName);
0128
0129
0130
0131 Standard_EXPORT void SetByte (const TCollection_ExtendedString& theName, const Standard_Byte theByte);
0132
0133
0134 Standard_EXPORT const TDataStd_DataMapOfStringByte& GetBytesContainer();
0135
0136
0137 Standard_EXPORT void ChangeBytes (const TDataStd_DataMapOfStringByte& theBytes);
0138
0139
0140 Standard_EXPORT Standard_Boolean HasArraysOfIntegers() const;
0141
0142
0143 Standard_EXPORT Standard_Boolean HasArrayOfIntegers (const TCollection_ExtendedString& theName) const;
0144
0145
0146
0147
0148 Standard_EXPORT const Handle(TColStd_HArray1OfInteger)& GetArrayOfIntegers (const TCollection_ExtendedString& theName);
0149
0150
0151
0152
0153 void SetArrayOfIntegers (const TCollection_ExtendedString& theName,
0154 const Handle(TColStd_HArray1OfInteger)& theArrayOfIntegers)
0155 {
0156 Backup();
0157 setArrayOfIntegers (theName, theArrayOfIntegers);
0158 }
0159
0160
0161 Standard_EXPORT const TDataStd_DataMapOfStringHArray1OfInteger& GetArraysOfIntegersContainer();
0162
0163
0164 Standard_EXPORT void ChangeArraysOfIntegers (const TDataStd_DataMapOfStringHArray1OfInteger& theArraysOfIntegers);
0165
0166
0167 Standard_EXPORT Standard_Boolean HasArraysOfReals() const;
0168
0169
0170 Standard_EXPORT Standard_Boolean HasArrayOfReals (const TCollection_ExtendedString& theName) const;
0171
0172
0173
0174
0175 Standard_EXPORT const Handle(TColStd_HArray1OfReal)& GetArrayOfReals (const TCollection_ExtendedString& theName);
0176
0177
0178
0179
0180 void SetArrayOfReals (const TCollection_ExtendedString& theName,
0181 const Handle(TColStd_HArray1OfReal)& theArrayOfReals)
0182 {
0183 Backup();
0184 setArrayOfReals (theName, theArrayOfReals);
0185 }
0186
0187
0188 Standard_EXPORT const TDataStd_DataMapOfStringHArray1OfReal& GetArraysOfRealsContainer();
0189
0190
0191 Standard_EXPORT void ChangeArraysOfReals (const TDataStd_DataMapOfStringHArray1OfReal& theArraysOfReals);
0192
0193
0194 void Clear()
0195 {
0196 Backup();
0197 clear();
0198 }
0199
0200 public:
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224
0225 virtual Standard_Boolean HasDeferredData() const { return false; }
0226
0227
0228
0229
0230
0231
0232 virtual Standard_Boolean LoadDeferredData (Standard_Boolean theToKeepDeferred = false)
0233 {
0234 (void )theToKeepDeferred;
0235 return false;
0236 }
0237
0238
0239
0240
0241
0242 virtual Standard_Boolean UnloadDeferredData() { return false; }
0243
0244 public:
0245
0246
0247 Standard_EXPORT void clear();
0248
0249
0250 Standard_EXPORT void setInteger (const TCollection_ExtendedString& theName,
0251 const Standard_Integer theInteger);
0252
0253
0254 Standard_EXPORT void setReal (const TCollection_ExtendedString& theName,
0255 const Standard_Real theReal);
0256
0257
0258 Standard_EXPORT void setString (const TCollection_ExtendedString& theName,
0259 const TCollection_ExtendedString& theString);
0260
0261
0262 Standard_EXPORT void setByte (const TCollection_ExtendedString& theName,
0263 const Standard_Byte theByte);
0264
0265
0266 Standard_EXPORT void setArrayOfIntegers (const TCollection_ExtendedString& theName,
0267 const Handle(TColStd_HArray1OfInteger)& theArrayOfIntegers);
0268
0269
0270 Standard_EXPORT void setArrayOfReals (const TCollection_ExtendedString& theName,
0271 const Handle(TColStd_HArray1OfReal)& theArrayOfReals);
0272
0273 public:
0274
0275 Standard_EXPORT virtual const Standard_GUID& ID() const Standard_OVERRIDE;
0276
0277 Standard_EXPORT virtual void Restore (const Handle(TDF_Attribute)& With) Standard_OVERRIDE;
0278
0279 Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
0280
0281 Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
0282
0283 Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
0284
0285
0286 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0287
0288 DEFINE_STANDARD_RTTIEXT(TDataStd_NamedData,TDF_Attribute)
0289
0290 protected:
0291
0292 Handle(TDataStd_HDataMapOfStringInteger) myIntegers;
0293 Handle(TDataStd_HDataMapOfStringReal) myReals;
0294 Handle(TDataStd_HDataMapOfStringString) myStrings;
0295 Handle(TDataStd_HDataMapOfStringByte) myBytes;
0296 Handle(TDataStd_HDataMapOfStringHArray1OfInteger) myArraysOfIntegers;
0297 Handle(TDataStd_HDataMapOfStringHArray1OfReal) myArraysOfReals;
0298
0299 };
0300
0301 #endif