OpenLexocad
27.0
PropertyEnumDescriptor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
Core/PropertyDescriptor.h
>
4
5
#include <utility>
6
7
namespace
Core
8
{
9
/* @brief Saves and restores the characteristics of a PropertyEnum
10
*/
11
class
CORE_EXPORT
PropertyEnumDescriptor
:
public
Core::PropertyDescriptor
12
{
13
TYPESYSTEM_HEADER
()
14
LX_NODE_HEADER
()
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
24
PropertyEnumDescriptor
();
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
35
DECLARE_PROPERTY_TEMPLATES
(
Core::PropertyEnumDescriptor
,
CORE_EXPORT
);
36
DECLARE_OBJECT_FACTORY_NOIFC
(PropertyEnumDescriptor_Factory,
PropertyEnumDescriptor
);
37
}
// namespace Core
Core::DECLARE_PROPERTY_TEMPLATES
DECLARE_PROPERTY_TEMPLATES(Core::PropertyDescriptor, CORE_EXPORT)
CORE_EXPORT
#define CORE_EXPORT
Definition:
core_defines2.h:10
Core::PropertyIndexList
Definition:
PropertyInteger.h:159
Core::PropertyTextList
Definition:
PropertyText.h:23
Core::PropertyEnumDescriptor
Definition:
PropertyEnumDescriptor.h:11
Core::PropertyDescriptor::Type
Type
Definition:
PropertyDescriptor.h:23
Base::String
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition:
String.h:29
PropertyDescriptor.h
Core
Definition:
Base.h:19
Core::DECLARE_OBJECT_FACTORY_NOIFC
DECLARE_OBJECT_FACTORY_NOIFC(PropertyBoolDescriptor_Factory, PropertyBoolDescriptor)
Core::PropertyDescriptor
Definition:
PropertyDescriptor.h:16
LX_NODE_HEADER
LX_NODE_HEADER()
TYPESYSTEM_HEADER
TYPESYSTEM_HEADER()
lexocad
Core
include
Core
PropertyEnumDescriptor.h
Generated by
1.8.15