Safir SDK Core
Loading...
Searching...
No Matches
Struct.h
Go to the documentation of this file.
1#pragma once
2
9
10
11#include <Safir/Utilities/Internal/VisibilityHelpers.h>
12
13#ifdef safir_generated_Core_cpp_EXPORTS
14# define SAFIR_GENERATED_Core_API SAFIR_HELPER_DLL_EXPORT
15#else
16# define SAFIR_GENERATED_Core_API SAFIR_HELPER_DLL_IMPORT
17# define SAFIR_LIBRARY_NAME "safir_generated-Core-cpp"
18# include <Safir/Utilities/Internal/AutoLink.h>
19#endif
20#define SAFIR_GENERATED_Core_API_LOCAL SAFIR_HELPER_DLL_LOCAL
21
25namespace Safir
26{
30namespace Dob
31{
32
33 class Struct; //forward declaration
34 typedef std::shared_ptr<Struct> StructPtr;
35 typedef std::shared_ptr<const Struct> StructConstPtr;
36
40
46 {
47 public:
48 //Constructors and Create routines
51 static StructPtr Create();
52
54 static const Safir::Dob::Typesystem::TypeId ClassTypeId = -6502158762730083309LL;
55
56 //Type id for Struct
57 Safir::Dob::Typesystem::TypeId GetTypeId() const override {return ClassTypeId;}
58
59 //Check if anything in the object has change flags set
60 bool IsChanged() override;
61
62 //Recursively set all change flags in the object
63 void SetChanged(const bool changed) override;
64
65
66 //Reflection part (Don't use unless you really know what you're doing!!)
68 const Safir::Dob::Typesystem::ArrayIndex index) override;
70 const Safir::Dob::Typesystem::ArrayIndex index) const override;
71
72 void WriteToBlob(Safir::Dob::Typesystem::Int64 handle) const override;
74
75 private:
76
77#ifdef _MSC_VER
78#pragma warning (push)
79#pragma warning (disable : 4251)
80#endif
81
82
83#ifdef _MSC_VER
84#pragma warning (pop)
85#endif
86 };
87
88} // Dob
89} // Safir
90
91
#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
Safir::Dob::Typesystem::ObjectContainerImpl< Struct > StructContainer
Definition Struct.h:37
std::shared_ptr< Struct > StructPtr
Definition Struct.h:34
Safir::Dob::Typesystem::ArrayContainer< StructContainer > StructContainerArray
Definition Struct.h:38
Safir::Dob::Typesystem::GenericObjectSequenceContainer< Struct > StructSequenceContainer
Definition Struct.h:39
std::shared_ptr< const Struct > StructConstPtr
Definition Struct.h:35
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
STL container for arrays of DOB-containers.
Definition ArrayContainer.h:59
Base class for all Containers.
Definition ContainerBase.h:44
The base class for all DOB objects.
Definition Object.h:55
Template class for all containers of automatically generated DOB objects.
Definition ObjectContainer.h:190
This class is intended to be used as baseclass for classes that in the future may be realized as low ...
Definition Struct.h:46
Safir::Dob::Typesystem::TypeId GetTypeId() const override
Get the type id of this object.
Definition Struct.h:57
Safir::Dob::Typesystem::ObjectPtr Clone() const override
Create a copy of the object.
Struct(Safir::Dob::Typesystem::Int64 handle)
bool IsChanged() override
Check if any member of this object is changed.
static StructPtr Create()
void SetChanged(const bool changed) override
Recursively set change flags in all members of this object.
void WriteToBlob(Safir::Dob::Typesystem::Int64 handle) const override
Write the object to a blob.
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.
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.