Metadata Last update: 16.07.2025 1#ifndef CFFSDK_PROJECT_METADATA_H 2#define CFFSDK_PROJECT_METADATA_H 3 4#include "Project/LibraryType.hpp" 5#include "Project/Iterator.hpp" 6#include "Project/Path.hpp" 7#include "Project/Types.hpp" 8#include <string> 9#include <map> 10#include <vector> 11#include <memory> 12 13namespace ansys { 14namespace Project { 15 16class MetadataHoof; 17class PItem; 18 19class ANSYS_PROJECT_DLL Metadata { 20public: 21 // Common functions 22 bool hasKey(const std::string) const; 23 bool removeKey(const std::string); 24 25 bool isString(const std::string) const; 26 bool isInt(const std::string) const; 27 bool isDouble(const std::string) const; 28 29 std::string getValue(const std::string) const; 30 std::vector<std::string> getValueVector(const std::string) const; 31 int getValueInt(const std::string) const; 32 double getValueDouble(const std::string) const; 33 34 MetaVariableType getValueType(const std::string) const; 35 36 // String 37 void setValue(const std::string& pKey, 38 const std::string& pValue); 39 void setValueVector(const std::string& pKey, 40 const std::vector<std::string>& pValue); 41 42 // Int 43 void setValue(const std::string& pKey, 44 int pValue); 45 46 // Float 47 void setValue(const std::string& pKey, 48 double pValue); 49 50 // Link 51 void setValueLink(const Iterator& pParent, 52 const std::string& pKey, 53 const Iterator& pTarget); 54 Iterator getValueLink(const Iterator& pParent, 55 const std::string& pKey) const; 56 bool isLink(const std::string& pKey) const; 57 58 void copyAllTo(Metadata& pTarget) const; 59 void copyValueTo(const std::string& pKey,Metadata& pTarget) const; 60 61 std::vector<std::string> getKeys() const; 62 63 void reset(); 64 65 Metadata() {}; 66private: 67 friend Iterator; 68 friend PItem; 69 70 Metadata(std::shared_ptr<MetadataHoof>& pMetaRef); 71 72 std::weak_ptr<MetadataHoof> aHoofPtr; 73 74}; 75 76} 77} 78 79#endif // CFFSDK_PROJECT_METADATA_H ansys::Project::IteratorPointer to a project location.Definition: Iterator.hpp:20 ansys::Project::MetadataDictionary of values associated with an Iterator.Definition: Metadata.hpp:19 ansysDefinition: API.dox:1