OpenLexocad  27.0
PropertyEnumDescriptor.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <utility>
6 
7 namespace Core
8 {
9 /* @brief Saves and restores the characteristics of a PropertyEnum
10  */
12 {
15 public:
16  friend class PropertyEnumDescriptor_Factory;
17 
18  size_t addEntry(const Base::String& aValue, int aTranslationId);
19  bool getEntry(size_t aIndex, std::pair<Base::String, int>& aEntry) const;
20  bool removeEntry(size_t aIndex);
21  std::vector<std::pair<Base::String, int>> getEntries() const;
22  void setEmpty();
23 
25  virtual ~PropertyEnumDescriptor();
26 
27  Type getType() const override;
28  size_t getSize() const;
29 
30 private:
31  PropertyTextList enums;
32  PropertyIndexList translationIds;
33 };
34 
36 DECLARE_OBJECT_FACTORY_NOIFC(PropertyEnumDescriptor_Factory, PropertyEnumDescriptor);
37 } // namespace Core
DECLARE_PROPERTY_TEMPLATES(Core::PropertyDescriptor, CORE_EXPORT)
#define CORE_EXPORT
Definition: core_defines2.h:10
Definition: PropertyInteger.h:159
Definition: PropertyText.h:23
Definition: PropertyEnumDescriptor.h:11
Type
Definition: PropertyDescriptor.h:23
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:29
Definition: Base.h:19
DECLARE_OBJECT_FACTORY_NOIFC(PropertyBoolDescriptor_Factory, PropertyBoolDescriptor)
Definition: PropertyDescriptor.h:16
LX_NODE_HEADER()
TYPESYSTEM_HEADER()