DATAKIT SDK  V2026.3
dtk_metadata.hpp
Go to the documentation of this file.
1 #ifndef __DTK_METADATA_HPP__
2 #define __DTK_METADATA_HPP__
3 
6 #include "def/define.h"
7 #include "util/error_dtk.hpp"
8 
9 class Dtk_Properties;
11 class Dtk_MetaData;
13 
14 /////////////////////////////////////////////////////////////////////////////
15 //! \ingroup DtkAPIGroup
16 //! \class Dtk_MetaData
17 //! \brief This is the Dtk_MetaData Class.\n
18 //! The Dtk_MetaDataPtr object is used to store any additional informations about
19 //! Dtk_ComponentPtr or Dtk_NodePtr.\n
20 //! It can be either be properties or parameters.\n
21 //! \SmartPtr{Dtk_MetaData}
22 class Dtk_MetaData : public Dtk_Object
23 {
24 public:
26  {
38  };
40  {
41  switch( inEnum )
42  {
43  case TypeProperty: return L"TypeProperty";
44  case TypeFileProperty: return L"TypeFileProperty";
45  case TypeConfigurationProperty: return L"TypeConfigurationProperty";
46  case TypeSheetMetal: return L"TypeSheetMetal";
47  case TypeParameter: return L"TypeParameter";
48  case TypeMassProperty: return L"TypeMassProperty";
49  case TypeElectricalProperty: return L"TypeElectricalProperty";
50  case TypeAttributeSet: return L"TypeAttributeSet";
51  case TypeUserAttribute: return L"TypeUserAttribute";
52  case TypeUserExpression: return L"TypeUserExpression";
53  default:
54  case TypeUnknown: return L"Unknown";
55  }
56  }
57 protected:
59  struct Dtk_Handle;
61 
62  //! \CopyConstructor{inToBeCopied}
63  Dtk_MetaData(const Dtk_MetaData& inToBeCopied);
65 
66  //! \sa CreateMetaData
67  //! \sa CreateParameterMetaData
69 
70  //! \BaseDestructor
71  virtual ~Dtk_MetaData();
72  friend class Dtk_SmartPtr<Dtk_MetaData>;
73 
74  void _Init();
75  void _Copy(const Dtk_MetaData& inToBeCopied);
76  void _Reset();
77 
78 
79 public:
80  //! \brief Create a property Dtk_MetaDataPtr from a Dtk_PropertiesPtr.
81  //! \param inObject Property data.
82  //! \return the constructed Dtk_MetaDataPtr.
84 // //! \brief Create a parameter Dtk_MetaDataPtr from a Dtk_PropertiesPtr.
85 // //! \param inObject Parameter data.
86 // //! \return the constructed Dtk_MetaDataPtr.
87 // static Dtk_MetaDataPtr CreateParameterMetaData(const Dtk_PropertiesPtr& inObject);
88 
89  //! \brief Create a Dtk_MetaDataPtr .
90  //! \param [in] inEnumType : the type of the metadata
91  //! \param [in] inTitle : the title of the metadata
92  //! \param [in] inValue : the value of the metadata
93  //! \param [in] inType : the type of value (default is "STRING")
94  //! \return the constructed Dtk_MetaDataPtr.
95  static Dtk_MetaDataPtr CreateMetaData(const MetaDataTypeEnum &inEnumType, Dtk_string inTitle, Dtk_string inValue, Dtk_string inValueType = Dtk_string(L"STRING"));
96  //! \brief Create a Dtk_MetaDataPtr .
97  //! \param [in] inEnumType : the type of the metadata
98  //! \param [in] inTitle : the title of the metadata
99  //! \param [in] inValue : the value of the metadata
100  //! \param [in] inUnits : the unit of the metadata
101  //! \param [in] inType : the type of value (default is "STRING")
102  //! \return the constructed Dtk_MetaDataPtr.
103  static Dtk_MetaDataPtr CreateMetaDataWithUnits(const MetaDataTypeEnum &inEnumType, Dtk_string inTitle, Dtk_string inValue, Dtk_string inUnits, Dtk_string inValueType = Dtk_string(L"STRING"));
104 
105  //! \DtkDynamicType
106  inline Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
107  {
108  if (inId == _typeID) return 1;
109  return Dtk_Object::DtkDynamicType(inId);
110  }
111 
112  //! \DtkDynamicCast
114  {
115  if (s->DtkDynamicType(_typeID)) return static_cast<Dtk_MetaData*>(s);
116  return NULL;
117  }
118 
119  //! \brief Retrieves the Dtk_MetaDataPtr as a property - if exists -
120  //! \return The Dtk_MetaDataPtr as a Dtk_PropertiesPtr if exists. Null Dtk_PropertiesPtr else.
121  //! \remark This method is used to retrieve the property
122  //! informations - if MetaDataType() method returns TypeProperty -.
124 
125  //! \brief Retrieves the Dtk_MetaDataPtr as a parameter - if exists -
126  //! \return The Dtk_MetaDataPtr as a Dtk_PropertiesPtr if exists. Null Dtk_PropertiesPtr else.
127  //! \remark This method is used to retrieve the parameter
128  //! informations - if MetaDataType() method returns TypeParameter -.
130 
131  //! \brief Retrieves the Dtk_MetaDataPtr as a parameter - if exists -
132  //! \return The Dtk_MetaDataPtr as a Dtk_PropertiesPtr if exists. Null Dtk_PropertiesPtr else.
133  //! \remark This method is used to retrieve the parameter
134  //! informations - if MetaDataType() method returns ToMassProperty -.
136 
137  //! \brief Retrieves the Dtk_MetaDataPtr as a parameter - if exists -
138  //! \return The Dtk_MetaDataPtr as a Dtk_PropertiesPtr if exists. Null Dtk_PropertiesPtr else.
139  //! \remark This method is used to retrieve the parameter
140  //! informations - if MetaDataType() method returns TypeElectricalProperty -.
142 
143  //! \brief Retrieves the Dtk_MetaDataPtr as a parameter - if exists -
144  //! \return The Dtk_MetaDataPtr as a Dtk_PropertiesPtr if exists. Null Dtk_PropertiesPtr else.
145  //! \remark This method is used to retrieve the parameter
146  //! informations - if MetaDataType() method returns TypeUserAttribute -.
148 
149  //! \brief Retrieves the Dtk_MetaDataPtr as a parameter - if exists -
150  //! \return The Dtk_MetaDataPtr as a Dtk_PropertiesPtr if exists. Null Dtk_PropertiesPtr else.
151  //! \remark This method is used to retrieve the parameter
152  //! informations - if MetaDataType() method returns TypeUserExpression -.
154 
155 //DTK_TOREMOVE_START
156 #ifdef AF51BDA7E49648f8AB95949F4CA52EF8
157  Dtk_PropertiesPtr ToSheetMetal();
158 #endif
159 //DTK_TOREMOVE_END
162  //! \brief Retrieves the Dtk_MetaDataPtr type - read only -.
163  //! \return The Dtk_MetaDataPtr type.
165  void SetMetaDataType( const MetaDataTypeEnum& inType );
166 
167  //! \deprecated Use GetUnits(Dtk_string& outUnits) method instead.
168  SetAsDeprecated("2022.1", "Use GetUnits(Dtk_string& outUnits) method instead.")
169  Dtk_string GetUnits_Deprecated221() const;
170 
171  //! \brief Get the Units of the MetaData.
172  //! \param[out] outUnits : the units string if present, empty string otherwise
173  //! \return dtkNoError if Units are present / dtkErrorAttributeNotFound if no Units .
174  Dtk_ErrorStatus GetUnits( Dtk_string& outUnits ) const;
175 
176  //! \brief Get the Type of the MetaData .
177  //! \return the Type of this MetaData .
178  //!
179  const Dtk_string& GetType() const;
180 
181  //! \brief Set the Type of the MetaData .
182  //!
183  void SetType( Dtk_string in) ;
184 
185  //! \brief Get the Title of the MetaData .
186  //! \return the Title of this MetaData .
187  //!
188  const Dtk_string& GetTitle() const;
189  //! \brief Set the Title of the MetaData .
190  //!
191  void SetTitle( Dtk_string in) ;
192 
193  //! \brief Get the Value of the MetaData .
194  //! \return the Value of this MetaData .
195  //!
196  const Dtk_string& GetValue() const;
197  //! \brief Set the Value of the MetaData .
198  //!
199  void SetValue( Dtk_string in) ;
200 
201 
202  //! \brief Get the Category of the MetaData .
203  //! \return the Category of this MetaData .
204  //!
205  const Dtk_string& GetCategory() const;
206  //! \brief Set the Category of the MetaData .
207  //!
209 
210 
211 
212 
213  //! \brief Get the Formula Type of result and its Estimated value of the MetaData .
214  //! \param[out] outEstimatedValue : Estimated value of formula
215  //! \param[out] outType : Type of Estimated value
216  //! \return DtkNoError if it is a Formula , dtkErrorCorruptedEntity otherwise.
217  //!
218  Dtk_ErrorStatus GetFormula(Dtk_string& outFormula,Dtk_string& outEstimatedValue,Dtk_string& outTitle,Dtk_string& outResultType) ;
219 
220  //! \brief Get the Formula and its Estimated value of the MetaData .
221  //! \param[out] outEstimatedValue : Estimated value of formula
222  //! \return the Formula of this MetaData .
223  //!
224  Dtk_string GetFormula(Dtk_string& outEstimatedValue) ;
225 
226  //! \brief Set the MetaData as Formula .
227  //! \param[in] inFormula : Formula
228  //! \param[in] inEstimatedValue : Estimated value of formula
229  //! \param[in] inResultType : Type of the EstimateValue
230  //! \return the Formula of this MetaData .
231  //!
232  void SetFormula( Dtk_string inFormula, Dtk_string inEstimatedValue, Dtk_string inTitle, Dtk_string inResultType);
233 
234 
235  Dtk_bool IsReal() const;
240  Dtk_bool IsDate() const;
243  Dtk_bool IsNull() const;
244 };
245 
247 {
249 
254 
255 };
256 
258 
260 
262 {
263 private:
264  void _Init();
265  void _Reset();
266  friend class Dtk_SmartPtr<Dtk_MetaDataWithUnit>;
267 
268 protected :
271 
272 
273 public:
275  Dtk_MetaDataWithUnit(const MetaDataTypeEnum &inEnumType, Dtk_string inType, Dtk_string inTitle, Dtk_string inValue, Dtk_string inUnit);
277 
278  //! \DtkDynamicType
279  inline Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
280  {
281  if (inId == _typeID) return 1;
282  return Dtk_MetaData::DtkDynamicType(inId);
283  }
284 
285  //! \DtkDynamicCast
287  {
288  if (s->DtkDynamicType(_typeID)) return static_cast<Dtk_MetaDataWithUnit*>(s);
289  return NULL;
290  }
291 };
292 
293 //! \class Dtk_MetaData
294 //! \brief This is the Dtk_MetaDataGroup Class.\n
295 //! The Dtk_MetaDataGroupPtr object is used to store a group of Dtk_MetaDataPtr in
296 //! a Dtk_ComponentPtr or a or Dtk_NodePtr.\n
297 //! The children metadata may or may not be also stored as single metadata but if it is
298 //! the case, then their category should be defined with the name of their Dtk_MetaDataGroup
299 //! in order to be distinguished from metadata only accessible alone.\n
300 //! It is defined by a name and a tab of metadatas.\n
301 //! \SmartPtr{Dtk_MetaDataGroup}
302 class Dtk_MetaDataGroup;
303 
305 
307 {
308 protected :
310 private:
311  //! \brief Name of the Group
312  Dtk_string _GroupName;
313 
314  //! \brief List of Metadata Children of the group
315  Dtk_tab< Dtk_MetaDataPtr > _MetadataChildren;
316 
317  void _Init();
318  void _Reset();
319 
320  friend class Dtk_SmartPtr<Dtk_MetaDataGroup>;
321 
322 public:
323 
324  //! \Create MetaDataGroup
326 
327  //! \BaseDestructor
329 
330  //! \DtkDynamicType
331  inline Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
332  {
333  if( inId == _typeID ) return 1;
335  }
336 
337  //! \DtkDynamicCast
339  {
340  if( s->DtkDynamicType(_typeID) ) return static_cast<Dtk_MetaDataGroup*>( s );
341  return NULL;
342  }
343 
345 
346  //! \brief Get the list of metadata of the MetaDataGroup.
347  //! \return the list of metadata of this MetaDataGroup.
349 
350  //! \brief Add a metadata to this Group
352 
353  //! \brief Set the group name
354  void SetName( Dtk_string inGroupName);
355 
356  //! \brief Get the group name
358 
359  //! \brief Get the number of metadatas in the Group
360  const Dtk_Size_t GetNumMetaData() const;
361 
362  //! \brief Get the inPos'th metadata of the Group
364 };
365 
366 //! \ingroup base_types
367 //! \class Dtk_Properties
368 //! \brief This is the Dtk_Properties class.
369 //! \brief A Dtk_Properties contains the property which defines by its Type,Title and Value
370 //!
371 //! This class lets you use Dtk_Properties.
373 {
374 public:
375 
378 
379 
380 
381  //! \brief Get the Type of the Property .
382  //! \return the Type of this Property .
383  //!
384  const Dtk_string& GetType() const;
385 
386  //! \brief Set the Type of the Property .
387  //! \return the Type of this Property .
388  //!
389  void SetType( Dtk_string in) ;
390 
391  //! \brief Get the Title of the Property .
392  //! \return the Title of this Property .
393  //!
394  const Dtk_string& GetTitle() const;
395 
396  //! \brief Set the Title of the Property .
397  //! \return the Type of this Property .
398  //!
400 
401  //! \brief Get the Value of the Property .
402  //! \return the Value of this Property .
403  //!
404  const Dtk_string& GetValue() const;
405 
406  //! \brief Set the Value of the Property .
407  //! \return the Type of this Property .
408  //!
410 
411 
412  //! \brief Get the Formula Type of result and its Estimated value of the MetaData .
413  //! \param[out] outEstimatedValue : Estimated value of formula
414  //! \param[out] outType : Type of Estimated value
415  //! \return the Formula of this MetaData .
416  //!
417  Dtk_ErrorStatus GetFormula(Dtk_string& outFormula,Dtk_string& outEstimatedValue,Dtk_string& outTitle,Dtk_string& outResultType) ;
418 
419  //! \brief Get the Formula and its Estimated value of the Property .
420  //! \param[out] outEstimatedValue : Estimated value of formula
421  //! \return the Value of this Property .
422  //!
423  Dtk_string GetFormula(Dtk_string& outEstimatedValue) ;
424  //! \brief Set the MetaData as Formula .
425  //! \param[in] inFormula : Formula
426  //! \param[in] inEstimatedValue : Estimated value of formula
427  //! \param[in] inResultType : Type of the EstimateValue
428  //! \return the Formula of this MetaData .
429  //!
430  void SetFormula( Dtk_string inFormula, Dtk_string inEstimatedValue, Dtk_string inTitle, Dtk_string inResultType);
431 
432 
434  virtual void conv_ptr(Dtk_Properties ** s){*s = this;}
435  int DtkDynamicType(const int& inId);
437 
438  void SetAsReal();
439  void SetAsInteger();
440  void SetAsBoolean();
441 
442  Dtk_bool IsReal() const;
447  Dtk_bool IsDate() const;
449  Dtk_bool IsNull() const;
450 
451 protected:
452  struct Dtk_Handle;
453  Dtk_Handle *_Private;
455  virtual ~Dtk_Properties();
456 
457  void _Init();
458  void _copy(const Dtk_Properties& s);
459  void _reset();
460  friend class Dtk_SmartPtr<Dtk_Properties>;
461 
462 };
463 
464 
465 #endif
Dtk_MetaData::Dtk_Handle::_Type
Dtk_string _Type
Definition: dtk_metadata.hpp:250
Dtk_MetaData::IsNull
Dtk_bool IsNull() const
Dtk_MetaData::CreatePropertiesMetaData
static Dtk_MetaDataPtr CreatePropertiesMetaData(const Dtk_PropertiesPtr &inObject)
Create a property Dtk_MetaDataPtr from a Dtk_PropertiesPtr.
Dtk_MetaData::TypeElectricalProperty
@ TypeElectricalProperty
Definition: dtk_metadata.hpp:34
Dtk_MetaData::~Dtk_MetaData
virtual ~Dtk_MetaData()
Destructor.
Dtk_MetaData::TypeUserAttribute
@ TypeUserAttribute
Definition: dtk_metadata.hpp:36
Dtk_MetaDataGroup::~Dtk_MetaDataGroup
virtual ~Dtk_MetaDataGroup()
Destructor.
Dtk_MetaDataGroup::CreateMetaDataGroup
static Dtk_MetaDataGroupPtr CreateMetaDataGroup(Dtk_string inGroupName, Dtk_tab< Dtk_MetaDataPtr > inMetadataChildren=Dtk_tab< Dtk_MetaDataPtr >())
Dtk_MetaData::SetType
void SetType(Dtk_string in)
Set the Type of the MetaData .
Dtk_MetaData::IsString
Dtk_bool IsString() const
Dtk_Properties::SetTitle
void SetTitle(Dtk_string)
Set the Title of the Property .
Dtk_Properties::GetFormula
Dtk_string GetFormula(Dtk_string &outEstimatedValue)
Get the Formula and its Estimated value of the Property .
Dtk_Properties::IsString
Dtk_bool IsString() const
Dtk_MetaData::SetMetaDataType
void SetMetaDataType(const MetaDataTypeEnum &inType)
Dtk_MetaDataWithUnit::Dtk_MetaDataWithUnit
Dtk_MetaDataWithUnit(const MetaDataTypeEnum &inEnumType, Dtk_string inType, Dtk_string inTitle, Dtk_string inValue, Dtk_string inUnit)
Dtk_MetaDataGroup::DtkDynamicCast
static Dtk_MetaDataGroup * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Definition: dtk_metadata.hpp:338
Dtk_MetaData::GetCategory
const Dtk_string & GetCategory() const
Get the Category of the MetaData .
Dtk_MetaData::DtkDynamicCast
static Dtk_MetaData * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Definition: dtk_metadata.hpp:113
Dtk_MetaData::ToUserExpression
Dtk_PropertiesPtr ToUserExpression()
Retrieves the Dtk_MetaDataPtr as a parameter - if exists -.
Dtk_MetaData::SetValue
void SetValue(Dtk_string in)
Set the Value of the MetaData .
Dtk_MetaData::ToProperty
Dtk_PropertiesPtr ToProperty()
Retrieves the Dtk_MetaDataPtr as a property - if exists -.
Dtk_Properties::Dtk_Properties
Dtk_Properties(const Dtk_Properties &p)
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_MetaData::MetaDataType
const MetaDataTypeEnum & MetaDataType() const
Retrieves the Dtk_MetaDataPtr type - read only -.
Dtk_MetaData::_Private
Dtk_Handle * _Private
Definition: dtk_metadata.hpp:59
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:711
Dtk_MetaData::ToConfigurationProperty
Dtk_PropertiesPtr ToConfigurationProperty()
Dtk_MetaData::TypeFileProperty
@ TypeFileProperty
Definition: dtk_metadata.hpp:29
Dtk_MetaData::SetTitle
void SetTitle(Dtk_string in)
Set the Title of the MetaData .
Dtk_MetaData::TypeUserExpression
@ TypeUserExpression
Definition: dtk_metadata.hpp:37
Dtk_Properties::operator=
Dtk_Properties & operator=(const Dtk_Properties &p)
Dtk_MetaData::ToFileProperty
Dtk_PropertiesPtr ToFileProperty()
Dtk_MetaData::Dtk_Handle::_Category
Dtk_string _Category
Definition: dtk_metadata.hpp:253
Dtk_MetaData::MetaDataTypeEnumToString
static Dtk_string MetaDataTypeEnumToString(const MetaDataTypeEnum &inEnum)
Definition: dtk_metadata.hpp:39
Dtk_MetaData::_Copy
void _Copy(const Dtk_MetaData &inToBeCopied)
Dtk_bool
char Dtk_bool
Definition: define.h:724
Dtk_MetaData::Dtk_Handle
Definition: dtk_metadata.hpp:247
Dtk_MetaDataGroup::AddMetadata
void AddMetadata(Dtk_MetaDataPtr inChild)
Add a metadata to this Group.
Dtk_Properties::IsDate
Dtk_bool IsDate() const
Dtk_Properties::conv_ptr
virtual void conv_ptr(Dtk_Properties **s)
Definition: dtk_metadata.hpp:434
Dtk_Properties::_Init
void _Init()
Dtk_MetaData::IsTime_t
Dtk_bool IsTime_t() const
Dtk_MetaData::ToMassProperty
Dtk_PropertiesPtr ToMassProperty()
Retrieves the Dtk_MetaDataPtr as a parameter - if exists -.
Dtk_MetaData::GetTitle
const Dtk_string & GetTitle() const
Get the Title of the MetaData .
Dtk_MetaData::CreateMetaDataWithUnits
static Dtk_MetaDataPtr CreateMetaDataWithUnits(const MetaDataTypeEnum &inEnumType, Dtk_string inTitle, Dtk_string inValue, Dtk_string inUnits, Dtk_string inValueType=Dtk_string(L"STRING"))
Create a Dtk_MetaDataPtr .
Dtk_Properties::~Dtk_Properties
virtual ~Dtk_Properties()
Dtk_Properties::SetAsInteger
void SetAsInteger()
Dtk_MetaData::_Reset
void _Reset()
Dtk_MetaDataPtr
Dtk_SmartPtr< Dtk_MetaData > Dtk_MetaDataPtr
Definition: dtk_metadata.hpp:11
Dtk_MetaData::IsReference
Dtk_bool IsReference() const
Dtk_Properties::GetValue
const Dtk_string & GetValue() const
Get the Value of the Property .
Dtk_MetaData::SetFormula
void SetFormula(Dtk_string inFormula, Dtk_string inEstimatedValue, Dtk_string inTitle, Dtk_string inResultType)
Set the MetaData as Formula .
Dtk_MetaData::Dtk_Handle::_Title
Dtk_string _Title
Definition: dtk_metadata.hpp:251
Dtk_MetaData::IsFormula
Dtk_bool IsFormula() const
Dtk_MetaDataWithUnit::_Units
Dtk_string _Units
Definition: dtk_metadata.hpp:270
Dtk_MetaDataWithUnit
Definition: dtk_metadata.hpp:262
Dtk_MetaData::IsReal
Dtk_bool IsReal() const
Dtk_Properties::SetAsBoolean
void SetAsBoolean()
Dtk_Properties::IsInteger
Dtk_bool IsInteger() const
Dtk_MetaData::Dtk_MetaData
Dtk_MetaData(const Dtk_MetaData &inToBeCopied)
Copy constructor.
Dtk_PropertiesPtr
Dtk_SmartPtr< Dtk_Properties > Dtk_PropertiesPtr
Definition: dtk_metadata.hpp:9
Dtk_MetaDataGroup::SetName
void SetName(Dtk_string inGroupName)
Set the group name.
DTK_TYPE_METADATA
@ DTK_TYPE_METADATA
Definition: define.h:507
Dtk_Properties::SetValue
void SetValue(Dtk_string)
Set the Value of the Property .
Dtk_MetaData::IsDate
Dtk_bool IsDate() const
Dtk_MetaData::GetValue
const Dtk_string & GetValue() const
Get the Value of the MetaData .
Dtk_Properties::create
static Dtk_PropertiesPtr create()
Dtk_MetaData::Dtk_MetaData
Dtk_MetaData(Dtk_MetaData &&inToBeMoved) DTK_NOEXCEPT
Dtk_MetaData::ToElectricalProperty
Dtk_PropertiesPtr ToElectricalProperty()
Retrieves the Dtk_MetaDataPtr as a parameter - if exists -.
Dtk_Properties::IsReal
Dtk_bool IsReal() const
Dtk_MetaDataWithUnit::GetUnits
Dtk_string GetUnits()
Dtk_MetaData::TypeConfigurationProperty
@ TypeConfigurationProperty
Definition: dtk_metadata.hpp:30
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:686
Dtk_MetaDataGroup::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Definition: dtk_metadata.hpp:331
Dtk_MetaData::TypeProperty
@ TypeProperty
Definition: dtk_metadata.hpp:28
Dtk_MetaData::TypeSheetMetal
@ TypeSheetMetal
Definition: dtk_metadata.hpp:31
Dtk_MetaData::Dtk_Handle::_MetaDataType
MetaDataTypeEnum _MetaDataType
Definition: dtk_metadata.hpp:248
Dtk_MetaDataGroup::Dtk_MetaDataGroup
Dtk_MetaDataGroup(Dtk_string inGroupName)
\Create MetaDataGroup
Dtk_MetaData::TypeUnknown
@ TypeUnknown
Definition: dtk_metadata.hpp:27
Dtk_MetaData::MetaDataTypeEnum
MetaDataTypeEnum
Definition: dtk_metadata.hpp:26
error_dtk.hpp
Dtk_MetaData::Dtk_MetaData
Dtk_MetaData(const MetaDataTypeEnum &inType)
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_MetaData::ToParameter
Dtk_PropertiesPtr ToParameter()
Retrieves the Dtk_MetaDataPtr as a parameter - if exists -.
Dtk_Properties::_Private
Dtk_Handle * _Private
Definition: dtk_metadata.hpp:452
Dtk_MetaData::IsBoolean
Dtk_bool IsBoolean() const
Dtk_MetaData::Dtk_Handle::_Value
Dtk_string _Value
Definition: dtk_metadata.hpp:252
Dtk_Properties::SetFormula
void SetFormula(Dtk_string inFormula, Dtk_string inEstimatedValue, Dtk_string inTitle, Dtk_string inResultType)
Set the MetaData as Formula .
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_MetaDataGroup
Definition: dtk_metadata.hpp:307
Dtk_Properties::DtkDynamicType
int DtkDynamicType(const int &inId)
Dtk_MetaDataGroup::GetNumMetaData
const Dtk_Size_t GetNumMetaData() const
Get the number of metadatas in the Group.
Dtk_MetaData::TypeParameter
@ TypeParameter
Definition: dtk_metadata.hpp:32
Dtk_MetaDataGroup::GetGroupName
const Dtk_string GetGroupName()
Get the group name.
Dtk_Properties::SetType
void SetType(Dtk_string in)
Set the Type of the Property .
Dtk_MetaData::TypeAttributeSet
@ TypeAttributeSet
Definition: dtk_metadata.hpp:35
Dtk_MetaData::GetUnits
Dtk_ErrorStatus GetUnits(Dtk_string &outUnits) const
Get the Units of the MetaData.
Dtk_Properties::_copy
void _copy(const Dtk_Properties &s)
Dtk_Properties::DtkDynamicCast
static Dtk_Properties * DtkDynamicCast(Dtk_Object *s)
Dtk_MetaData::GetFormula
Dtk_ErrorStatus GetFormula(Dtk_string &outFormula, Dtk_string &outEstimatedValue, Dtk_string &outTitle, Dtk_string &outResultType)
Get the Formula Type of result and its Estimated value of the MetaData .
Dtk_Properties::IsNull
Dtk_bool IsNull() const
Dtk_MetaDataWithUnit::~Dtk_MetaDataWithUnit
virtual ~Dtk_MetaDataWithUnit()
Dtk_MetaDataGroup::GetListOfMetadatas
const Dtk_tab< Dtk_MetaDataPtr > & GetListOfMetadatas() const
Get the list of metadata of the MetaDataGroup.
define.h
Dtk_Properties::GetTitle
const Dtk_string & GetTitle() const
Get the Title of the Property .
Dtk_MetaData::ToUserAttribute
Dtk_PropertiesPtr ToUserAttribute()
Retrieves the Dtk_MetaDataPtr as a parameter - if exists -.
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:84
Dtk_MetaData::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Definition: dtk_metadata.hpp:106
Dtk_Properties::GetFormula
Dtk_ErrorStatus GetFormula(Dtk_string &outFormula, Dtk_string &outEstimatedValue, Dtk_string &outTitle, Dtk_string &outResultType)
Get the Formula Type of result and its Estimated value of the MetaData .
Dtk_Properties::Dtk_Properties
Dtk_Properties()
Dtk_Properties::IsBoolean
Dtk_bool IsBoolean() const
Dtk_MetaData::SetAsDeprecated
SetAsDeprecated("2022.1", "Use GetUnits(Dtk_string& outUnits) method instead.") Dtk_string GetUnits_Deprecated221() const
Dtk_MetaDataGroupPtr
Dtk_SmartPtr< Dtk_MetaDataGroup > Dtk_MetaDataGroupPtr
Definition: dtk_metadata.hpp:302
Dtk_MetaDataWithUnitPtr
Dtk_SmartPtr< Dtk_MetaDataWithUnit > Dtk_MetaDataWithUnitPtr
Definition: dtk_metadata.hpp:257
Dtk_Object::DtkDynamicType
virtual int DtkDynamicType(const int &inId)=0
Dtk_Properties::IsFormula
Dtk_bool IsFormula() const
Dtk_Object
Definition: dtk_object.hpp:8
dtk_string.hpp
Dtk_MetaData
This is the Dtk_MetaData Class. The Dtk_MetaDataPtr object is used to store any additional informatio...
Definition: dtk_metadata.hpp:23
Dtk_MetaData::TypeMassProperty
@ TypeMassProperty
Definition: dtk_metadata.hpp:33
Dtk_Properties::IsReference
Dtk_bool IsReference() const
Dtk_MetaData::SetCategory
void SetCategory(Dtk_string in)
Set the Category of the MetaData .
DTK_TYPE_METADATA_GROUP
@ DTK_TYPE_METADATA_GROUP
Definition: define.h:508
Dtk_MetaData::_Init
void _Init()
Dtk_MetaDataWithUnit::DtkDynamicCast
static Dtk_MetaDataWithUnit * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Definition: dtk_metadata.hpp:286
Dtk_MetaData::_typeID
@ _typeID
Definition: dtk_metadata.hpp:58
Dtk_MetaData::GetType
const Dtk_string & GetType() const
Get the Type of the MetaData .
Dtk_MetaData::IsInteger
Dtk_bool IsInteger() const
DTK_TYPE_METADATAWITHUNIT
@ DTK_TYPE_METADATAWITHUNIT
Definition: define.h:509
dtk_object.hpp
Dtk_Properties::SetAsReal
void SetAsReal()
Dtk_Properties
This is the Dtk_Properties class.
Definition: dtk_metadata.hpp:373
Dtk_MetaDataWithUnit::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Definition: dtk_metadata.hpp:279
Dtk_MetaData::CreateMetaData
static Dtk_MetaDataPtr CreateMetaData(const MetaDataTypeEnum &inEnumType, Dtk_string inTitle, Dtk_string inValue, Dtk_string inValueType=Dtk_string(L"STRING"))
Create a Dtk_MetaDataPtr .
Dtk_MetaDataGroup::GetMetaData
Dtk_MetaDataPtr GetMetaData(const Dtk_Size_t &inPos)
Get the inPos'th metadata of the Group.
DTK_NOEXCEPT
#define DTK_NOEXCEPT
Definition: config.hpp:20
Dtk_Properties::GetType
const Dtk_string & GetType() const
Get the Type of the Property .