DATAKIT SDK  V2026.2
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  //! \brief Get the Units of the MetaData .
168  //! \return the Units of this MetaData or "None" .
169  //! \deprecated Use GetUnits(Dtk_string& outUnits) method instead.
170  SetAsDeprecated("2022.1", "Use GetUnits(Dtk_string& outUnits) method instead.")
171  Dtk_string GetUnits() const;
172 
173  //! \brief Get the Units of the MetaData.
174  //! \param[out] outUnits : the units string if present, empty string otherwise
175  //! \return dtkNoError if Units are present / dtkErrorAttributeNotFound if no Units .
176  Dtk_ErrorStatus GetUnits( Dtk_string& outUnits ) const;
177 
178  //! \brief Get the Type of the MetaData .
179  //! \return the Type of this MetaData .
180  //!
181  const Dtk_string& GetType() const;
182 
183  //! \brief Set the Type of the MetaData .
184  //!
185  void SetType( Dtk_string in) ;
186 
187  //! \brief Get the Title of the MetaData .
188  //! \return the Title of this MetaData .
189  //!
190  const Dtk_string& GetTitle() const;
191  //! \brief Set the Title of the MetaData .
192  //!
193  void SetTitle( Dtk_string in) ;
194 
195  //! \brief Get the Value of the MetaData .
196  //! \return the Value of this MetaData .
197  //!
198  const Dtk_string& GetValue() const;
199  //! \brief Set the Value of the MetaData .
200  //!
201  void SetValue( Dtk_string in) ;
202 
203 
204  //! \brief Get the Category of the MetaData .
205  //! \return the Category of this MetaData .
206  //!
207  const Dtk_string& GetCategory() const;
208  //! \brief Set the Category of the MetaData .
209  //!
211 
212 
213 
214 
215  //! \brief Get the Formula Type of result and its Estimated value of the MetaData .
216  //! \param[out] outEstimatedValue : Estimated value of formula
217  //! \param[out] outType : Type of Estimated value
218  //! \return DtkNoError if it is a Formula , dtkErrorCorruptedEntity otherwise.
219  //!
220  Dtk_ErrorStatus GetFormula(Dtk_string& outFormula,Dtk_string& outEstimatedValue,Dtk_string& outTitle,Dtk_string& outResultType) ;
221 
222  //! \brief Get the Formula and its Estimated value of the MetaData .
223  //! \param[out] outEstimatedValue : Estimated value of formula
224  //! \return the Formula of this MetaData .
225  //!
226  Dtk_string GetFormula(Dtk_string& outEstimatedValue) ;
227 
228  //! \brief Set the MetaData as Formula .
229  //! \param[in] inFormula : Formula
230  //! \param[in] inEstimatedValue : Estimated value of formula
231  //! \param[in] inResultType : Type of the EstimateValue
232  //! \return the Formula of this MetaData .
233  //!
234  void SetFormula( Dtk_string inFormula, Dtk_string inEstimatedValue, Dtk_string inTitle, Dtk_string inResultType);
235 
236 
237  Dtk_bool IsReal() const;
242  Dtk_bool IsDate() const;
245  Dtk_bool IsNull() const;
246 };
247 
249 {
251 
256 
257 };
258 
260 
262 
264 {
265 private:
266  void _Init();
267  void _Reset();
268  friend class Dtk_SmartPtr<Dtk_MetaDataWithUnit>;
269 
270 protected :
273 
274 
275 public:
277  Dtk_MetaDataWithUnit(const MetaDataTypeEnum &inEnumType, Dtk_string inType, Dtk_string inTitle, Dtk_string inValue, Dtk_string inUnit);
279 
280  //! \DtkDynamicType
281  inline Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
282  {
283  if (inId == _typeID) return 1;
284  return Dtk_MetaData::DtkDynamicType(inId);
285  }
286 
287  //! \DtkDynamicCast
289  {
290  if (s->DtkDynamicType(_typeID)) return static_cast<Dtk_MetaDataWithUnit*>(s);
291  return NULL;
292  }
293 };
294 
295 //! \class Dtk_MetaData
296 //! \brief This is the Dtk_MetaDataGroup Class.\n
297 //! The Dtk_MetaDataGroupPtr object is used to store a group of Dtk_MetaDataPtr in
298 //! a Dtk_ComponentPtr or a or Dtk_NodePtr.\n
299 //! The children metadata may or may not be also stored as single metadata but if it is
300 //! the case, then their category should be defined with the name of their Dtk_MetaDataGroup
301 //! in order to be distinguished from metadata only accessible alone.\n
302 //! It is defined by a name and a tab of metadatas.\n
303 //! \SmartPtr{Dtk_MetaDataGroup}
304 class Dtk_MetaDataGroup;
305 
307 
309 {
310 protected :
312 private:
313  //! \brief Name of the Group
314  Dtk_string _GroupName;
315 
316  //! \brief List of Metadata Children of the group
317  Dtk_tab< Dtk_MetaDataPtr > _MetadataChildren;
318 
319  void _Init();
320  void _Reset();
321 
322  friend class Dtk_SmartPtr<Dtk_MetaDataGroup>;
323 
324 public:
325 
326  //! \Create MetaDataGroup
328 
329  //! \BaseDestructor
331 
332  //! \DtkDynamicType
333  inline Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
334  {
335  if( inId == _typeID ) return 1;
337  }
338 
339  //! \DtkDynamicCast
341  {
342  if( s->DtkDynamicType(_typeID) ) return static_cast<Dtk_MetaDataGroup*>( s );
343  return NULL;
344  }
345 
347 
348  //! \brief Get the list of metadata of the MetaDataGroup.
349  //! \return the list of metadata of this MetaDataGroup.
351 
352  //! \brief Add a metadata to this Group
354 
355  //! \brief Set the group name
356  void SetName( Dtk_string inGroupName);
357 
358  //! \brief Get the group name
360 
361  //! \brief Get the number of metadatas in the Group
362  const Dtk_Size_t GetNumMetaData() const;
363 
364  //! \brief Get the inPos'th metadata of the Group
366 };
367 
368 //! \ingroup base_types
369 //! \class Dtk_Properties
370 //! \brief This is the Dtk_Properties class.
371 //! \brief A Dtk_Properties contains the property which defines by its Type,Title and Value
372 //!
373 //! This class lets you use Dtk_Properties.
375 {
376 public:
377 
380 
381 
382 
383  //! \brief Get the Type of the Property .
384  //! \return the Type of this Property .
385  //!
386  const Dtk_string& GetType() const;
387 
388  //! \brief Set the Type of the Property .
389  //! \return the Type of this Property .
390  //!
391  void SetType( Dtk_string in) ;
392 
393  //! \brief Get the Title of the Property .
394  //! \return the Title of this Property .
395  //!
396  const Dtk_string& GetTitle() const;
397 
398  //! \brief Set the Title of the Property .
399  //! \return the Type of this Property .
400  //!
402 
403  //! \brief Get the Value of the Property .
404  //! \return the Value of this Property .
405  //!
406  const Dtk_string& GetValue() const;
407 
408  //! \brief Set the Value of the Property .
409  //! \return the Type of this Property .
410  //!
412 
413 
414  //! \brief Get the Formula Type of result and its Estimated value of the MetaData .
415  //! \param[out] outEstimatedValue : Estimated value of formula
416  //! \param[out] outType : Type of Estimated value
417  //! \return the Formula of this MetaData .
418  //!
419  Dtk_ErrorStatus GetFormula(Dtk_string& outFormula,Dtk_string& outEstimatedValue,Dtk_string& outTitle,Dtk_string& outResultType) ;
420 
421  //! \brief Get the Formula and its Estimated value of the Property .
422  //! \param[out] outEstimatedValue : Estimated value of formula
423  //! \return the Value of this Property .
424  //!
425  Dtk_string GetFormula(Dtk_string& outEstimatedValue) ;
426  //! \brief Set the MetaData as Formula .
427  //! \param[in] inFormula : Formula
428  //! \param[in] inEstimatedValue : Estimated value of formula
429  //! \param[in] inResultType : Type of the EstimateValue
430  //! \return the Formula of this MetaData .
431  //!
432  void SetFormula( Dtk_string inFormula, Dtk_string inEstimatedValue, Dtk_string inTitle, Dtk_string inResultType);
433 
434 
436  virtual void conv_ptr(Dtk_Properties ** s){*s = this;}
437  int DtkDynamicType(const int& inId);
439 
440  void SetAsReal();
441  void SetAsInteger();
442  void SetAsBoolean();
443 
444  Dtk_bool IsReal() const;
449  Dtk_bool IsDate() const;
451  Dtk_bool IsNull() const;
452 
453 protected:
454  struct Dtk_Handle;
455  Dtk_Handle *_Private;
457  virtual ~Dtk_Properties();
458 
459  void _Init();
460  void _copy(const Dtk_Properties& s);
461  void _reset();
462  friend class Dtk_SmartPtr<Dtk_Properties>;
463 
464 };
465 
466 
467 #endif
Dtk_MetaData::Dtk_Handle::_Type
Dtk_string _Type
Definition: dtk_metadata.hpp:252
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:340
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:704
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:255
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:717
Dtk_MetaData::Dtk_Handle
Definition: dtk_metadata.hpp:249
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:436
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:253
Dtk_MetaData::IsFormula
Dtk_bool IsFormula() const
Dtk_MetaDataWithUnit::_Units
Dtk_string _Units
Definition: dtk_metadata.hpp:272
Dtk_MetaDataWithUnit
Definition: dtk_metadata.hpp:264
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:679
Dtk_MetaDataGroup::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Definition: dtk_metadata.hpp:333
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:250
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:454
Dtk_MetaData::IsBoolean
Dtk_bool IsBoolean() const
Dtk_MetaData::Dtk_Handle::_Value
Dtk_string _Value
Definition: dtk_metadata.hpp:254
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:309
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_MetaDataGroupPtr
Dtk_SmartPtr< Dtk_MetaDataGroup > Dtk_MetaDataGroupPtr
Definition: dtk_metadata.hpp:304
Dtk_MetaData::SetAsDeprecated
SetAsDeprecated("2022.1", "Use GetUnits(Dtk_string& outUnits) method instead.") Dtk_string GetUnits() const
Get the Units of the MetaData .
Dtk_MetaDataWithUnitPtr
Dtk_SmartPtr< Dtk_MetaDataWithUnit > Dtk_MetaDataWithUnitPtr
Definition: dtk_metadata.hpp:259
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:288
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:375
Dtk_MetaDataWithUnit::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Definition: dtk_metadata.hpp:281
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:30
Dtk_Properties::GetType
const Dtk_string & GetType() const
Get the Type of the Property .