Safir SDK Core
Loading...
Searching...
No Matches
PersistenceParameters.h
Go to the documentation of this file.
1#pragma once
2
9
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 Dob
34{
35
36 class PersistenceParameters; //forward declaration
37 typedef std::shared_ptr<PersistenceParameters> PersistenceParametersPtr;
38 typedef std::shared_ptr<const PersistenceParameters> PersistenceParametersConstPtr;
39
43
49 {
50 public:
51 //Constructors and Create routines
55
56 //Backend
61
62 //FileStoragePath
66 static std::wstring FileStoragePath();
67
68 //OdbcStorageConnectString
72 static std::wstring OdbcStorageConnectString();
73
74 //XmlDataColumnSize
82
83 //TypeNameColumnSize
91
92 //BinaryDataColumnSize
97
98 //BinarySmallDataColumnSize
103
104 //StandaloneMode
111 static bool StandaloneMode();
112
113 //TestMode
117 static bool TestMode();
118
120 static const Safir::Dob::Typesystem::TypeId ClassTypeId = 8276373340234567943LL;
121
122 //Type id for PersistenceParameters
123 Safir::Dob::Typesystem::TypeId GetTypeId() const override {return ClassTypeId;}
124
125 //Check if anything in the object has change flags set
126 bool IsChanged() override;
127
128 //Recursively set all change flags in the object
129 void SetChanged(const bool changed) override;
130
131
132 //Reflection part (Don't use unless you really know what you're doing!!)
134 const Safir::Dob::Typesystem::ArrayIndex index) override;
136 const Safir::Dob::Typesystem::ArrayIndex index) const override;
137
138 void WriteToBlob(Safir::Dob::Typesystem::Int64 handle) const override;
140
141 private:
142
143#ifdef _MSC_VER
144#pragma warning (push)
145#pragma warning (disable : 4251)
146#endif
147
148
149#ifdef _MSC_VER
150#pragma warning (pop)
151#endif
152 };
153
154} // Dob
155} // Safir
156
157
#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::GenericObjectSequenceContainer< PersistenceParameters > PersistenceParametersSequenceContainer
Definition PersistenceParameters.h:42
std::shared_ptr< const PersistenceParameters > PersistenceParametersConstPtr
Definition PersistenceParameters.h:38
std::shared_ptr< PersistenceParameters > PersistenceParametersPtr
Definition PersistenceParameters.h:37
Safir::Dob::Typesystem::ArrayContainer< PersistenceParametersContainer > PersistenceParametersContainerArray
Definition PersistenceParameters.h:41
Safir::Dob::Typesystem::ObjectContainerImpl< PersistenceParameters > PersistenceParametersContainer
Definition PersistenceParameters.h:40
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
STL container for arrays of DOB-containers.
Definition ArrayContainer.h:59
Base class for all Containers.
Definition ContainerBase.h:44
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 only contains parameters.
Definition Parametrization.h:46
static const Safir::Dob::Typesystem::TypeId Checksum
Definition PersistenceBackend.h:55
Enumeration
Definition PersistenceBackend.h:37
This class has no summary.
Definition PersistenceParameters.h:49
PersistenceParameters(Safir::Dob::Typesystem::Int64 handle)
Safir::Dob::Typesystem::ObjectPtr Clone() const override
Create a copy of the object.
static Safir::Dob::Typesystem::Int32 BinaryDataColumnSize()
The size of the BinaryData column in the database.
static Safir::Dob::Typesystem::Int32 TypeNameColumnSize()
The number of bytes that can be written for each entry to the TypeName column in the database.
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.
bool IsChanged() override
Check if any member of this object is changed.
static std::wstring FileStoragePath()
Full path where the File storage backend stores its data.
static PersistenceParametersPtr Create()
static bool StandaloneMode()
StandaloneMode means that each dope that is started is saving its own persistent data.
static Safir::Dob::Typesystem::Int32 BinarySmallDataColumnSize()
The size of the BinarySmallData column in the database.
static Safir::Dob::PersistenceBackend::Enumeration Backend(const Safir::Dob::Typesystem::TypeId enumId=Safir::Dob::PersistenceBackend::Checksum)
Which backend should DOPE use (Currently 'None', 'File', and 'Odbc' are supported).
static bool TestMode()
TestMode allow initial injections without persistence started.
void SetChanged(const bool changed) override
Recursively set change flags in all members of this object.
static std::wstring OdbcStorageConnectString()
The string to use for connection to the physical storage.
Safir::Dob::Typesystem::TypeId GetTypeId() const override
Get the type id of this object.
Definition PersistenceParameters.h:123
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 WriteToBlob(Safir::Dob::Typesystem::Int64 handle) const override
Write the object to a blob.
static Safir::Dob::Typesystem::Int32 XmlDataColumnSize()
The number of bytes that can be written for each entry to the XmlData column in the database.