Safir SDK Core
Loading...
Searching...
No Matches
EnumType.h
Go to the documentation of this file.
1#pragma once
2
9
10#include <Safir/Dob/Item.h>
12
13#include <Safir/Utilities/Internal/VisibilityHelpers.h>
14
15#ifdef safir_generated_Core_cpp_EXPORTS
16# define SAFIR_GENERATED_Core_API SAFIR_HELPER_DLL_EXPORT
17#else
18# define SAFIR_GENERATED_Core_API SAFIR_HELPER_DLL_IMPORT
19# define SAFIR_LIBRARY_NAME "safir_generated-Core-cpp"
20# include <Safir/Utilities/Internal/AutoLink.h>
21#endif
22#define SAFIR_GENERATED_Core_API_LOCAL SAFIR_HELPER_DLL_LOCAL
23
27namespace Safir
28{
32namespace Websocket
33{
37namespace Typesystem
38{
39
40 class EnumType; //forward declaration
41 typedef std::shared_ptr<EnumType> EnumTypePtr;
42 typedef std::shared_ptr<const EnumType> EnumTypeConstPtr;
43
47
53 {
54 public:
55 //Constructors and Create routines
59
60 //Summary
68
69
70 //Name
78
79
80 //Values
88
89
90 //SourceFile
98
99
101 static const Safir::Dob::Typesystem::TypeId ClassTypeId = 193746530572108548LL;
102
103 //Type id for EnumType
104 Safir::Dob::Typesystem::TypeId GetTypeId() const override {return ClassTypeId;}
105
106 //Check if anything in the object has change flags set
107 bool IsChanged() override;
108
109 //Recursively set all change flags in the object
110 void SetChanged(const bool changed) override;
111
112
113 //Reflection part (Don't use unless you really know what you're doing!!)
115 const Safir::Dob::Typesystem::ArrayIndex index) override;
117 const Safir::Dob::Typesystem::ArrayIndex index) const override;
118
119 void WriteToBlob(Safir::Dob::Typesystem::Int64 handle) const override;
121
122 private:
123
124#ifdef _MSC_VER
125#pragma warning (push)
126#pragma warning (disable : 4251)
127#endif
128
133
134#ifdef _MSC_VER
135#pragma warning (pop)
136#endif
137 };
138
139} // Typesystem
140} // Websocket
141} // Safir
142
143
#define SAFIR_GENERATED_Core_API
Definition BackdoorCommand.h:18
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
DotsC_Int32 Int32
32 bit integer type.
Definition Defs.h:66
DotsC_Int64 Int64
64 bit integer type.
Definition Defs.h:69
std::shared_ptr< Object > ObjectPtr
A smart pointer to an Object.
Definition Object.h:44
DotsC_ArrayIndex ArrayIndex
Index into an array.
Definition Defs.h:246
DotsC_TypeId TypeId
A unique type identifier.
Definition Defs.h:218
DotsC_MemberIndex MemberIndex
The index of a member in an object.
Definition Defs.h:237
Safir::Dob::Typesystem::ArrayContainer< EnumTypeContainer > EnumTypeContainerArray
Definition EnumType.h:45
std::shared_ptr< const EnumType > EnumTypeConstPtr
Definition EnumType.h:42
Safir::Dob::Typesystem::GenericObjectSequenceContainer< EnumType > EnumTypeSequenceContainer
Definition EnumType.h:46
Safir::Dob::Typesystem::ObjectContainerImpl< EnumType > EnumTypeContainer
Definition EnumType.h:44
std::shared_ptr< EnumType > EnumTypePtr
Definition EnumType.h:41
STL container for arrays of DOB-containers.
Definition ArrayContainer.h:59
Base class for all Containers.
Definition ContainerBase.h:44
Definition ContainerProxies.h:39
Template class for all containers of automatically generated DOB objects.
Definition ObjectContainer.h:190
Container class for sequences of values.
Definition SequenceContainer.h:53
Container for strings (std::wstring).
Definition ValueContainers.h:127
The baseclass for all items.
Definition Item.h:46
Represents an enumeration type in the Dob.
Definition EnumType.h:53
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > Summary()
static Safir::Dob::Typesystem::Int32 SummaryMaxStringLength()
void WriteToBlob(Safir::Dob::Typesystem::Int64 handle) const override
Write the object to a blob.
Safir::Dob::Typesystem::StringSequenceContainer & Values()
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > Name()
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > SourceFile() const
Dou file source.
Safir::Dob::Typesystem::ObjectPtr Clone() const override
Create a copy of the object.
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > Summary() const
Enum summary.
static Safir::Dob::Typesystem::MemberIndex SourceFileMemberIndex()
EnumType(Safir::Dob::Typesystem::Int64 handle)
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > SourceFile()
static Safir::Dob::Typesystem::MemberIndex ValuesMemberIndex()
static Safir::Dob::Typesystem::Int32 SourceFileMaxStringLength()
static Safir::Dob::Typesystem::Int32 NameMaxStringLength()
static Safir::Dob::Typesystem::Int32 ValuesMaxStringLength()
Safir::Dob::Typesystem::TypeId GetTypeId() const override
Get the type id of this object.
Definition EnumType.h:104
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > Name() const
Name of enum type.
bool IsChanged() override
Check if any member of this object is changed.
Safir::Dob::Typesystem::ContainerBase & GetMember(const Safir::Dob::Typesystem::MemberIndex member, const Safir::Dob::Typesystem::ArrayIndex index) override
Get a reference to a member container from an object.
const Safir::Dob::Typesystem::ContainerBase & GetMember(const Safir::Dob::Typesystem::MemberIndex member, const Safir::Dob::Typesystem::ArrayIndex index) const override
Get a const reference to a member container from an object.
void SetChanged(const bool changed) override
Recursively set change flags in all members of this object.
static Safir::Dob::Typesystem::MemberIndex SummaryMemberIndex()
const Safir::Dob::Typesystem::StringSequenceContainer & Values() const
List of enumeration values.
static Safir::Dob::Typesystem::MemberIndex NameMemberIndex()