Safir SDK Core
Loading...
Searching...
No Matches
ClassType.h
Go to the documentation of this file.
1#pragma once
2
9
10#include <Safir/Dob/Item.h>
13
14#include <Safir/Utilities/Internal/VisibilityHelpers.h>
15
16#ifdef safir_generated_Core_cpp_EXPORTS
17# define SAFIR_GENERATED_Core_API SAFIR_HELPER_DLL_EXPORT
18#else
19# define SAFIR_GENERATED_Core_API SAFIR_HELPER_DLL_IMPORT
20# define SAFIR_LIBRARY_NAME "safir_generated-Core-cpp"
21# include <Safir/Utilities/Internal/AutoLink.h>
22#endif
23#define SAFIR_GENERATED_Core_API_LOCAL SAFIR_HELPER_DLL_LOCAL
24
28namespace Safir
29{
33namespace Websocket
34{
38namespace Typesystem
39{
40
41 class ClassType; //forward declaration
42 typedef std::shared_ptr<ClassType> ClassTypePtr;
43 typedef std::shared_ptr<const ClassType> ClassTypeConstPtr;
44
48
54 {
55 public:
56 //Constructors and Create routines
60
61 //Summary
69
70
71 //Name
79
80
81 //Members
88
89
90 //Descendants
97
98
99 //SourceFile
107
108
110 static const Safir::Dob::Typesystem::TypeId ClassTypeId = -7334241585649594772LL;
111
112 //Type id for ClassType
113 Safir::Dob::Typesystem::TypeId GetTypeId() const override {return ClassTypeId;}
114
115 //Check if anything in the object has change flags set
116 bool IsChanged() override;
117
118 //Recursively set all change flags in the object
119 void SetChanged(const bool changed) override;
120
121
122 //Reflection part (Don't use unless you really know what you're doing!!)
124 const Safir::Dob::Typesystem::ArrayIndex index) override;
126 const Safir::Dob::Typesystem::ArrayIndex index) const override;
127
128 void WriteToBlob(Safir::Dob::Typesystem::Int64 handle) const override;
130
131 private:
132
133#ifdef _MSC_VER
134#pragma warning (push)
135#pragma warning (disable : 4251)
136#endif
137
143
144#ifdef _MSC_VER
145#pragma warning (pop)
146#endif
147 };
148
149} // Typesystem
150} // Websocket
151} // Safir
152
153
#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
std::shared_ptr< const ClassType > ClassTypeConstPtr
Definition ClassType.h:43
Safir::Dob::Typesystem::GenericObjectSequenceContainer< ClassType > ClassTypeSequenceContainer
Definition ClassType.h:47
std::shared_ptr< ClassType > ClassTypePtr
Definition ClassType.h:42
Safir::Dob::Typesystem::ObjectContainerImpl< ClassType > ClassTypeContainer
Definition ClassType.h:45
Safir::Dob::Typesystem::ArrayContainer< ClassTypeContainer > ClassTypeContainerArray
Definition ClassType.h:46
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 for strings (std::wstring).
Definition ValueContainers.h:127
The baseclass for all items.
Definition Item.h:46
Represents a class type in the Dob.
Definition ClassType.h:54
static Safir::Dob::Typesystem::Int32 NameMaxStringLength()
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.
static Safir::Dob::Typesystem::Int32 SourceFileMaxStringLength()
bool IsChanged() override
Check if any member of this object is changed.
void WriteToBlob(Safir::Dob::Typesystem::Int64 handle) const override
Write the object to a blob.
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > Name() const
Fully qualified name of class type.
ClassType(Safir::Dob::Typesystem::Int64 handle)
Safir::Websocket::Typesystem::MemberSequenceContainer & Members()
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::ContainerProxy< Safir::Dob::Typesystem::StringContainer > SourceFile() const
Dou file source.
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > Summary()
static Safir::Dob::Typesystem::MemberIndex SourceFileMemberIndex()
Safir::Dob::Typesystem::ObjectPtr Clone() const override
Create a copy of the object.
void SetChanged(const bool changed) override
Recursively set change flags in all members of this object.
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > Name()
Safir::Websocket::Typesystem::ClassTypeSequenceContainer & Descendants()
const Safir::Websocket::Typesystem::MemberSequenceContainer & Members() const
List of members.
static Safir::Dob::Typesystem::MemberIndex NameMemberIndex()
Safir::Dob::Typesystem::TypeId GetTypeId() const override
Get the type id of this object.
Definition ClassType.h:113
static Safir::Dob::Typesystem::MemberIndex SummaryMemberIndex()
static Safir::Dob::Typesystem::Int32 SummaryMaxStringLength()
const Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > Summary() const
Class summary.
const Safir::Websocket::Typesystem::ClassTypeSequenceContainer & Descendants() const
List of descendant classes.
static Safir::Dob::Typesystem::MemberIndex MembersMemberIndex()
Safir::Dob::Typesystem::ContainerProxy< Safir::Dob::Typesystem::StringContainer > SourceFile()
static Safir::Dob::Typesystem::MemberIndex DescendantsMemberIndex()