DATAKIT SDK  V2026.4
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 #include <memory>
9 
10 class Dtk_Properties;
12 class Dtk_MetaData;
14 
15 /////////////////////////////////////////////////////////////////////////////
16 //! \ingroup DtkAPIGroup
17 //! \class Dtk_MetaData
18 //! \brief This is the Dtk_MetaData Class.\n
19 //! The Dtk_MetaDataPtr object is used to store any additional informations about
20 //! Dtk_ComponentPtr or Dtk_NodePtr.\n
21 //! It can be either be properties or parameters.\n
22 //! \SmartPtr{Dtk_MetaData}
23 class Dtk_MetaData : public Dtk_Object
24 {
25 public:
27  {
39  };
41  {
42  switch( inEnum )
43  {
44  case TypeProperty: return L"TypeProperty";
45  case TypeFileProperty: return L"TypeFileProperty";
46  case TypeConfigurationProperty: return L"TypeConfigurationProperty";
47  case TypeSheetMetal: return L"TypeSheetMetal";
48  case TypeParameter: return L"TypeParameter";
49  case TypeMassProperty: return L"TypeMassProperty";
50  case TypeElectricalProperty: return L"TypeElectricalProperty";
51  case TypeAttributeSet: return L"TypeAttributeSet";
52  case TypeUserAttribute: return L"TypeUserAttribute";
53  case TypeUserExpression: return L"TypeUserExpression";
54  default:
55  case TypeUnknown: return L"Unknown";
56  }
57  }
58 protected:
60  struct Dtk_Handle;
61  std::unique_ptr<Dtk_Handle> _Private;
62 
63  //! \sa Create( const Dtk_MetaData& in );
64  Dtk_MetaData(const Dtk_MetaData& inToBeCopied);
66 
67  //! \sa CreateMetaData
69 
70  //! \BaseDestructor
71  virtual ~Dtk_MetaData();
72  friend class Dtk_SmartPtr<Dtk_MetaData>;
73 
74 public:
75  //! \brief Create a property Dtk_MetaDataPtr from a Dtk_PropertiesPtr.
76  //! \param inObject Property data.
77  //! \return the constructed Dtk_MetaDataPtr.
79 
80  //! \brief Create a Dtk_MetaDataPtr .
81  //! \param [in] inEnumType : the type of the metadata
82  //! \param [in] inTitle : the title of the metadata
83  //! \param [in] inValue : the value of the metadata
84  //! \param [in] inType : the type of value (default is "STRING")
85  //! \return the constructed Dtk_MetaDataPtr.
86  static Dtk_MetaDataPtr CreateMetaData(const MetaDataTypeEnum &inEnumType, Dtk_string inTitle, Dtk_string inValue, Dtk_string inValueType = Dtk_string(L"STRING"));
87  //! \brief Create a Dtk_MetaDataPtr .
88  //! \param [in] inEnumType : the type of the metadata
89  //! \param [in] inTitle : the title of the metadata
90  //! \param [in] inValue : the value of the metadata
91  //! \param [in] inUnits : the unit of the metadata
92  //! \param [in] inType : the type of value (default is "STRING")
93  //! \return the constructed Dtk_MetaDataPtr.
94  static Dtk_MetaDataPtr CreateMetaDataWithUnits(const MetaDataTypeEnum &inEnumType, Dtk_string inTitle, Dtk_string inValue, Dtk_string inUnits, Dtk_string inValueType = Dtk_string(L"STRING"));
95 
96  //! \\CreateCopy{in}
97  static Dtk_MetaDataPtr Create( const Dtk_MetaData& in );
98 
99  //! \DtkDynamicType
100  inline Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
101  {
102  if (inId == _typeID) return 1;
103  return Dtk_Object::DtkDynamicType(inId);
104  }
105 
106  //! \DtkDynamicCast
108  {
109  if (s->DtkDynamicType(_typeID)) return static_cast<Dtk_MetaData*>(s);
110  return NULL;
111  }
112 
113  //! \brief Retrieves the Dtk_MetaDataPtr as a property - if exists -
114  //! \return The Dtk_MetaDataPtr as a Dtk_PropertiesPtr if exists. Null Dtk_PropertiesPtr else.
115  //! \remark This method is used to retrieve the property
116  //! informations - if MetaDataType() method returns TypeProperty -.
118 
119  //! \brief Retrieves the Dtk_MetaDataPtr as a parameter - 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 parameter
122  //! informations - if MetaDataType() method returns TypeParameter -.
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 ToMassProperty -.
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 TypeElectricalProperty -.
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 TypeUserAttribute -.
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 TypeUserExpression -.
148 
149 //DTK_TOREMOVE_START
150 #ifdef AF51BDA7E49648f8AB95949F4CA52EF8
151  Dtk_PropertiesPtr ToSheetMetal();
152 #endif
153 //DTK_TOREMOVE_END
156  //! \brief Retrieves the Dtk_MetaDataPtr type - read only -.
157  //! \return The Dtk_MetaDataPtr type.
159  void SetMetaDataType( const MetaDataTypeEnum& inType );
160 
161  //! \brief Get the Units of the MetaData.
162  //! \param[out] outUnits : the units string if present, empty string otherwise
163  //! \return dtkNoError if Units are present / dtkErrorAttributeNotFound if no Units .
164  Dtk_ErrorStatus GetUnits( Dtk_string& outUnits ) const;
165 
166  //! \brief Get the Type of the MetaData .
167  //! \return the Type of this MetaData .
168  //!
169  const Dtk_string& GetType() const;
170 
171  //! \brief Set the Type of the MetaData .
172  //!
173  void SetType( Dtk_string in) ;
174 
175  //! \brief Get the Title of the MetaData .
176  //! \return the Title of this MetaData .
177  //!
178  const Dtk_string& GetTitle() const;
179  //! \brief Set the Title of the MetaData .
180  //!
181  void SetTitle( Dtk_string in) ;
182 
183  //! \brief Get the Value of the MetaData .
184  //! \return the Value of this MetaData .
185  //!
186  const Dtk_string& GetValue() const;
187  //! \brief Set the Value of the MetaData .
188  //!
189  void SetValue( Dtk_string in) ;
190 
191 
192  //! \brief Get the Category of the MetaData .
193  //! \return the Category of this MetaData .
194  //!
195  const Dtk_string& GetCategory() const;
196  //! \brief Set the Category of the MetaData .
197  //!
199 
200  //! \brief Get the Formula Type of result and its Estimated value of the MetaData .
201  //! \param[out] outEstimatedValue : Estimated value of formula
202  //! \param[out] outType : Type of Estimated value
203  //! \return DtkNoError if it is a Formula , dtkErrorCorruptedEntity otherwise.
204  //!
205  Dtk_ErrorStatus GetFormula(Dtk_string& outFormula,Dtk_string& outEstimatedValue,Dtk_string& outTitle,Dtk_string& outResultType) ;
206 
207  //! \brief Get the Formula and its Estimated value of the MetaData .
208  //! \param[out] outEstimatedValue : Estimated value of formula
209  //! \return the Formula of this MetaData .
210  //!
211  Dtk_string GetFormula(Dtk_string& outEstimatedValue) const;
212 
213  //! \brief Set the MetaData as Formula .
214  //! \param[in] inFormula : Formula
215  //! \param[in] inEstimatedValue : Estimated value of formula
216  //! \param[in] inResultType : Type of the EstimateValue
217  //! \return the Formula of this MetaData .
218  //!
219  void SetFormula( Dtk_string inFormula, Dtk_string inEstimatedValue, Dtk_string inTitle, Dtk_string inResultType);
220 
221 
222  Dtk_bool IsReal() const;
227  Dtk_bool IsDate() const;
230  Dtk_bool IsNull() const;
231 };
232 
234 {
236 
237  explicit Dtk_Handle(const MetaDataTypeEnum& inType) : _MetaDataType(inType){}
238 
240 
242 
247 
248 };
249 
251 
253 
255 {
256 private:
257  friend class Dtk_SmartPtr<Dtk_MetaDataWithUnit>;
258 
259 protected :
262 
263 
264 public:
266  Dtk_MetaDataWithUnit(const MetaDataTypeEnum &inEnumType, Dtk_string inType, Dtk_string inTitle, Dtk_string inValue, Dtk_string inUnit);
268 
269  //! \DtkDynamicType
270  inline Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
271  {
272  if (inId == _typeID) return 1;
273  return Dtk_MetaData::DtkDynamicType(inId);
274  }
275 
276  //! \DtkDynamicCast
278  {
279  if (s->DtkDynamicType(_typeID)) return static_cast<Dtk_MetaDataWithUnit*>(s);
280  return NULL;
281  }
282 };
283 
284 //! \class Dtk_MetaData
285 //! \brief This is the Dtk_MetaDataGroup Class.\n
286 //! The Dtk_MetaDataGroupPtr object is used to store a group of Dtk_MetaDataPtr in
287 //! a Dtk_ComponentPtr or a or Dtk_NodePtr.\n
288 //! The children metadata may or may not be also stored as single metadata but if it is
289 //! the case, then their category should be defined with the name of their Dtk_MetaDataGroup
290 //! in order to be distinguished from metadata only accessible alone.\n
291 //! It is defined by a name and a tab of metadatas.\n
292 //! \SmartPtr{Dtk_MetaDataGroup}
293 class Dtk_MetaDataGroup;
294 
296 
298 {
299 protected :
301 private:
302  //! \brief Name of the Group
303  Dtk_string _GroupName;
304 
305  //! \brief List of Metadata Children of the group
306  Dtk_tab< Dtk_MetaDataPtr > _MetadataChildren;
307 
308  friend class Dtk_SmartPtr<Dtk_MetaDataGroup>;
309 
310 public:
311 
312  //! \Create MetaDataGroup
314 
315  //! \BaseDestructor
317 
318  //! \DtkDynamicType
319  inline Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
320  {
321  if( inId == _typeID ) return 1;
323  }
324 
325  //! \DtkDynamicCast
327  {
328  if( s->DtkDynamicType(_typeID) ) return static_cast<Dtk_MetaDataGroup*>( s );
329  return NULL;
330  }
331 
333 
334  //! \brief Get the list of metadata of the MetaDataGroup.
335  //! \return the list of metadata of this MetaDataGroup.
337 
338  //! \brief Add a metadata to this Group
340 
341  //! \brief Set the group name
342  void SetName( Dtk_string inGroupName);
343 
344  //! \brief Get the group name
346 
347  //! \brief Get the number of metadatas in the Group
348  const Dtk_Size_t GetNumMetaData() const;
349 
350  //! \brief Get the inPos'th metadata of the Group
352 };
353 
354 //! \ingroup base_types
355 //! \class Dtk_Properties
356 //! \brief This is the Dtk_Properties class.
357 //! \brief A Dtk_Properties contains the property which defines by its Type,Title and Value
358 //!
359 //! This class lets you use Dtk_Properties.
361 {
362 protected:
363  struct Dtk_Handle;
364  std::unique_ptr<Dtk_Handle> _Private;
366  //! \sa Create( const Dtk_Properties& in );
369  inline virtual Dtk_Object* Clone()
370  {
371  return new Dtk_Properties( *this );
372  }
373 
374  virtual ~Dtk_Properties();
375 
376  friend class Dtk_SmartPtr<Dtk_Properties>;
377 public:
378 
379  //! \CreateBase
381  //! \deprecated Use Create instead.
382  SetAsDeprecated( "2026.4", "Use Create instead." )
383  static Dtk_PropertiesPtr create();
384  //! \CreateCopy{in}
386  int DtkDynamicType( const int& inId );
388  //! \brief Get the Type of the Property .
389  //! \return the Type of this Property .
390  //!
391  const Dtk_string& GetType() const;
392 
393  //! \brief Set the Type of the Property .
394  //! \return the Type of this Property .
395  //!
396  void SetType( Dtk_string in) ;
397 
398  //! \brief Get the Title of the Property .
399  //! \return the Title of this Property .
400  //!
401  const Dtk_string& GetTitle() const;
402 
403  //! \brief Set the Title of the Property .
404  //! \return the Type of this Property .
405  //!
407 
408  //! \brief Get the Value of the Property .
409  //! \return the Value of this Property .
410  //!
411  const Dtk_string& GetValue() const;
412 
413  //! \brief Set the Value of the Property .
414  //! \return the Type of this Property .
415  //!
417 
418 
419  //! \brief Get the Formula Type of result and its Estimated value of the MetaData .
420  //! \param[out] outEstimatedValue : Estimated value of formula
421  //! \param[out] outType : Type of Estimated value
422  //! \return the Formula of this MetaData .
423  //!
424  Dtk_ErrorStatus GetFormula(Dtk_string& outFormula,Dtk_string& outEstimatedValue,Dtk_string& outTitle,Dtk_string& outResultType) ;
425 
426  //! \brief Get the Formula and its Estimated value of the Property .
427  //! \param[out] outEstimatedValue : Estimated value of formula
428  //! \return the Value of this Property .
429  //!
430  Dtk_string GetFormula(Dtk_string& outEstimatedValue) ;
431  //! \brief Set the MetaData as Formula .
432  //! \param[in] inFormula : Formula
433  //! \param[in] inEstimatedValue : Estimated value of formula
434  //! \param[in] inResultType : Type of the EstimateValue
435  //! \return the Formula of this MetaData .
436  //!
437  void SetFormula( Dtk_string inFormula, Dtk_string inEstimatedValue, Dtk_string inTitle, Dtk_string inResultType);
438 
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 
454 };
455 
456 
457 #endif
Dtk_Properties::Create
static Dtk_PropertiesPtr Create()
Calls default constructor to allocate a new object.
Dtk_MetaData::Dtk_Handle::_Type
Dtk_string _Type
Definition: dtk_metadata.hpp:243
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:35
Dtk_MetaData::~Dtk_MetaData
virtual ~Dtk_MetaData()
Destructor.
Dtk_MetaData::TypeUserAttribute
@ TypeUserAttribute
Definition: dtk_metadata.hpp:37
Dtk_Properties::Clone
virtual Dtk_Object * Clone()
Definition: dtk_metadata.hpp:369
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::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:326
Dtk_MetaData::GetFormula
Dtk_string GetFormula(Dtk_string &outEstimatedValue) const
Get the Formula and its Estimated value of the MetaData .
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:107
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_Properties::Dtk_Properties
Dtk_Properties(const Dtk_Properties &)
Dtk_MetaData::ToProperty
Dtk_PropertiesPtr ToProperty()
Retrieves the Dtk_MetaDataPtr as a property - if exists -.
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_Size_t
size_t Dtk_Size_t
Definition: define.h:711
Dtk_Properties::SetAsDeprecated
SetAsDeprecated("2026.4", "Use Create instead.") static Dtk_PropertiesPtr create()
Dtk_MetaData::ToConfigurationProperty
Dtk_PropertiesPtr ToConfigurationProperty()
Dtk_MetaData::TypeFileProperty
@ TypeFileProperty
Definition: dtk_metadata.hpp:30
Dtk_MetaData::SetTitle
void SetTitle(Dtk_string in)
Set the Title of the MetaData .
Dtk_MetaData::TypeUserExpression
@ TypeUserExpression
Definition: dtk_metadata.hpp:38
Dtk_MetaData::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: dtk_metadata.hpp:60
Dtk_MetaData::ToFileProperty
Dtk_PropertiesPtr ToFileProperty()
Dtk_MetaData::Dtk_Handle::_Category
Dtk_string _Category
Definition: dtk_metadata.hpp:246
Dtk_MetaData::MetaDataTypeEnumToString
static Dtk_string MetaDataTypeEnumToString(const MetaDataTypeEnum &inEnum)
Definition: dtk_metadata.hpp:40
Dtk_bool
char Dtk_bool
Definition: define.h:724
Dtk_MetaData::Dtk_Handle
Definition: dtk_metadata.hpp:234
Dtk_MetaDataGroup::AddMetadata
void AddMetadata(Dtk_MetaDataPtr inChild)
Add a metadata to this Group.
Dtk_Properties::IsDate
Dtk_bool IsDate() const
Dtk_MetaData::Dtk_Handle::Dtk_Handle
Dtk_Handle(const Dtk_Handle &o)
Definition: dtk_metadata.hpp:239
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_MetaData::Create
static Dtk_MetaDataPtr Create(const Dtk_MetaData &in)
\CreateCopy{in}
Dtk_Properties::~Dtk_Properties
virtual ~Dtk_Properties()
Dtk_Properties::SetAsInteger
void SetAsInteger()
Dtk_MetaDataPtr
Dtk_SmartPtr< Dtk_MetaData > Dtk_MetaDataPtr
Definition: dtk_metadata.hpp:12
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:244
Dtk_MetaData::IsFormula
Dtk_bool IsFormula() const
Dtk_MetaDataWithUnit::_Units
Dtk_string _Units
Definition: dtk_metadata.hpp:261
Dtk_MetaDataWithUnit
Definition: dtk_metadata.hpp:255
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)
Dtk_PropertiesPtr
Dtk_SmartPtr< Dtk_Properties > Dtk_PropertiesPtr
Definition: dtk_metadata.hpp:10
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_MetaData::Dtk_MetaData
Dtk_MetaData(Dtk_MetaData &&inToBeMoved) DTK_NOEXCEPT
Dtk_Properties::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: dtk_metadata.hpp:363
Dtk_MetaData::ToElectricalProperty
Dtk_PropertiesPtr ToElectricalProperty()
Retrieves the Dtk_MetaDataPtr as a parameter - if exists -.
Dtk_Properties::IsReal
Dtk_bool IsReal() const
Dtk_MetaDataWithUnit::_typeID
@ _typeID
Definition: dtk_metadata.hpp:260
Dtk_MetaData::TypeConfigurationProperty
@ TypeConfigurationProperty
Definition: dtk_metadata.hpp:31
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:686
Dtk_MetaData::Dtk_Handle::Dtk_Handle
Dtk_Handle()
Definition: dtk_metadata.hpp:235
Dtk_MetaDataGroup::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Definition: dtk_metadata.hpp:319
Dtk_MetaData::TypeProperty
@ TypeProperty
Definition: dtk_metadata.hpp:29
Dtk_MetaData::TypeSheetMetal
@ TypeSheetMetal
Definition: dtk_metadata.hpp:32
Dtk_MetaData::Dtk_Handle::_MetaDataType
MetaDataTypeEnum _MetaDataType
Definition: dtk_metadata.hpp:241
Dtk_MetaDataGroup::Dtk_MetaDataGroup
Dtk_MetaDataGroup(Dtk_string inGroupName)
\Create MetaDataGroup
Dtk_MetaData::TypeUnknown
@ TypeUnknown
Definition: dtk_metadata.hpp:28
Dtk_MetaData::MetaDataTypeEnum
MetaDataTypeEnum
Definition: dtk_metadata.hpp:27
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_MetaData::IsBoolean
Dtk_bool IsBoolean() const
Dtk_MetaData::Dtk_Handle::_Value
Dtk_string _Value
Definition: dtk_metadata.hpp:245
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:298
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::Dtk_Handle::Dtk_Handle
Dtk_Handle(const MetaDataTypeEnum &inType)
Definition: dtk_metadata.hpp:237
Dtk_MetaData::TypeParameter
@ TypeParameter
Definition: dtk_metadata.hpp:33
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:36
Dtk_MetaData::GetUnits
Dtk_ErrorStatus GetUnits(Dtk_string &outUnits) const
Get the Units of the MetaData.
Dtk_Properties::DtkDynamicCast
static Dtk_Properties * DtkDynamicCast(Dtk_Object *s)
Dtk_Properties::Dtk_Properties
Dtk_Properties(Dtk_Properties &&) DTK_NOEXCEPT
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:100
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:293
Dtk_MetaDataWithUnitPtr
Dtk_SmartPtr< Dtk_MetaDataWithUnit > Dtk_MetaDataWithUnitPtr
Definition: dtk_metadata.hpp:250
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:24
Dtk_MetaData::TypeMassProperty
@ TypeMassProperty
Definition: dtk_metadata.hpp:34
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_MetaDataWithUnit::GetUnits
Dtk_string GetUnits() const
Dtk_MetaDataWithUnit::DtkDynamicCast
static Dtk_MetaDataWithUnit * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Definition: dtk_metadata.hpp:277
Dtk_MetaData::_typeID
@ _typeID
Definition: dtk_metadata.hpp:59
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:361
Dtk_MetaDataWithUnit::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Definition: dtk_metadata.hpp:270
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 .
Dtk_MetaDataGroup::_typeID
@ _typeID
Definition: dtk_metadata.hpp:300