OpenLexocad  27.1
PropertyValue.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Base/Type.h>
4 #include <Core/Variant.h>
5 
6 #include <unordered_map>
7 
8 
9 namespace Core
10 {
11 class Property;
12 
13 class LX_CORE_EXPORT PropertyValue // Wraps property type and Core::Variant value
14 {
15 public:
16  PropertyValue() : propertyName(""), propertyType(Base::Type::badType()), value(Core::Variant()) {}
17 
18  PropertyValue(const std::string& name, Base::Type t, const Core::Variant& v) : propertyName(name), propertyType(t), value(v) {}
19 
20  std::string propertyName;
23 };
24 
25 
26 typedef std::unordered_map<std::string, Core::Property*> PropertyMap;
27 typedef std::unordered_map<std::string, PropertyValue> PropertyValueMap;
28 
29 } // namespace Core
PropertyValue(const std::string &name, Base::Type t, const Core::Variant &v)
Definition: PropertyValue.h:18
Core::PropertyText name
Definition: CoreDocument.h:167
PropertyValue()
Definition: PropertyValue.h:16
Core::Variant value
Definition: PropertyValue.h:22
std::string propertyName
Definition: PropertyValue.h:20
Definition: Type.h:52
Definition: Variant.h:87
std::unordered_map< std::string, Core::Property * > PropertyMap
Definition: PropertyValue.h:26
std::unordered_map< std::string, PropertyValue > PropertyValueMap
Definition: PropertyValue.h:27
Definition: Base.h:12
Definition: AbstractXMLReader.h:5
Base::Type propertyType
Definition: PropertyValue.h:21
Definition: PropertyValue.h:13