Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Safir::Dob::PersistenceParameters Class Reference

This class has no summary. More...

#include <Safir/Dob/PersistenceParameters.h>

Inheritance diagram for Safir::Dob::PersistenceParameters:
Collaboration diagram for Safir::Dob::PersistenceParameters:

Public Member Functions

 PersistenceParameters ()
 
virtual
Safir::Dob::Typesystem::ObjectPtr 
Clone () const
 Create a copy of the object. More...
 
virtual
Safir::Dob::Typesystem::TypeId 
GetTypeId () const
 Get the type id of this object. More...
 
virtual bool IsChanged ()
 Check if any member of this object is changed. More...
 
virtual void SetChanged (const bool changed)
 Recursively set change flags in all members of this object. More...
 
virtual
Safir::Dob::Typesystem::ContainerBase
GetMember (const Safir::Dob::Typesystem::MemberIndex member, const Safir::Dob::Typesystem::ArrayIndex index)
 Get a reference to a member container from an object. More...
 
virtual const
Safir::Dob::Typesystem::ContainerBase
GetMember (const Safir::Dob::Typesystem::MemberIndex member, const Safir::Dob::Typesystem::ArrayIndex index) const
 Get a const reference to a member container from an object. More...
 
virtual
Safir::Dob::Typesystem::Int32 
CalculateBlobSize () const
 Calculate the size of the blob-serialized form of this object. More...
 
virtual void WriteToBlob (char *blob, char *&beginningOfUnused) const
 Write the object to a blob. More...
 
 PersistenceParameters (char const *const blob)
 
- Public Member Functions inherited from Safir::Dob::Parametrization
 Parametrization ()
 
 Parametrization (char const *const blob)
 
- Public Member Functions inherited from Safir::Dob::Typesystem::Object
 Object ()
 Default constructor. More...
 
virtual ~Object ()
 Virtual destructor. More...
 
 Object (char const *const blob)
 Create an Object from a blob. More...
 

Static Public Member Functions

static PersistenceParametersPtr Create ()
 
static bool SystemHasPersistence ()
 True if persistence is used in this system. More...
 
static
Safir::Dob::PersistenceBackend::Enumeration 
Backend (const Safir::Dob::Typesystem::TypeId enumId=Safir::Dob::PersistenceBackend::Checksum)
 Which backend should DOPE use (Currently 'File' and 'Odbc' are supported). More...
 
static std::wstring FileStoragePath ()
 Full path where the File storage backend stores its data. More...
 
static std::wstring OdbcStorageConnectString ()
 The string to use for connection to the physical storage. More...
 
static
Safir::Dob::Typesystem::Int32 
XmlDataColumnSize ()
 The size of the XmlData column in the database. More...
 
static
Safir::Dob::Typesystem::Int32 
BinaryDataColumnSize ()
 The size of the BinaryData column in the database. More...
 
static
Safir::Dob::Typesystem::Int32 
BinarySmallDataColumnSize ()
 The size of the BinarySmallData column in the database. More...
 
static
Safir::Dob::Typesystem::Int32 
TypeNameColumnSize ()
 The size of the TypeName column in the database. More...
 
static bool StandaloneMode ()
 StandaloneMode means that each dope that is started is saving its own persistent data. More...
 
static bool TestMode ()
 TestMode allow initial injections without persistence started. More...
 
- Static Public Member Functions inherited from Safir::Dob::Parametrization
static ParametrizationPtr Create ()
 
- Static Public Member Functions inherited from Safir::Dob::Typesystem::Object
static Dob::Typesystem::ObjectPtr Create ()
 Creates a new Object. More...
 

Static Public Attributes

static const
Safir::Dob::Typesystem::TypeId 
ClassTypeId = 8276373340234567943LL
 Type id for PersistenceParameters. More...
 
- Static Public Attributes inherited from Safir::Dob::Parametrization
static const
Safir::Dob::Typesystem::TypeId 
ClassTypeId = 8075666004421608370LL
 Type id for Parametrization. More...
 
- Static Public Attributes inherited from Safir::Dob::Typesystem::Object
static const
Dob::Typesystem::TypeId 
ClassTypeId = 5955188366590963785LL
 The TypeId of the Object class. More...
 

Detailed Description

This class has no summary.

Constructor & Destructor Documentation

Safir::Dob::PersistenceParameters::PersistenceParameters ( )
Safir::Dob::PersistenceParameters::PersistenceParameters ( char const *const  blob)
explicit

Member Function Documentation

static Safir::Dob::PersistenceBackend::Enumeration Safir::Dob::PersistenceParameters::Backend ( const Safir::Dob::Typesystem::TypeId  enumId = Safir::Dob::PersistenceBackend::Checksum)
static

Which backend should DOPE use (Currently 'File' and 'Odbc' are supported).

static Safir::Dob::Typesystem::Int32 Safir::Dob::PersistenceParameters::BinaryDataColumnSize ( )
static

The size of the BinaryData column in the database.

Unit is bytes.

static Safir::Dob::Typesystem::Int32 Safir::Dob::PersistenceParameters::BinarySmallDataColumnSize ( )
static

The size of the BinarySmallData column in the database.

Unit is bytes.

virtual Safir::Dob::Typesystem::Int32 Safir::Dob::PersistenceParameters::CalculateBlobSize ( ) const
virtual

Calculate the size of the blob-serialized form of this object.

Returns
The needed size in bytes.

Reimplemented from Safir::Dob::Parametrization.

virtual Safir::Dob::Typesystem::ObjectPtr Safir::Dob::PersistenceParameters::Clone ( ) const
virtual

Create a copy of the object.

Will create a copy of the object on the heap and return a smart pointer to it. Use boost::static_pointer_cast or boost::dynamic_pointer_cast to cast it to the pointer type that you're after.

Returns
A smart pointer to the copy of the object.

Reimplemented from Safir::Dob::Parametrization.

static PersistenceParametersPtr Safir::Dob::PersistenceParameters::Create ( )
static
static std::wstring Safir::Dob::PersistenceParameters::FileStoragePath ( )
static

Full path where the File storage backend stores its data.

Use forward slashes as directory separator!

virtual Safir::Dob::Typesystem::ContainerBase& Safir::Dob::PersistenceParameters::GetMember ( const Safir::Dob::Typesystem::MemberIndex  member,
const Safir::Dob::Typesystem::ArrayIndex  index 
)
virtual

Get a reference to a member container from an object.

Use the methods in Members to get member indices and array sizes for use with this method.

Note: Do not use this method unless you're very sure it is the one you need!

Parameters
member[in] - The index of the member to get.
index[in] - The array index of the member to get.
Returns
A reference to the member container.
Exceptions
IllegalValueExceptionIf the index is not in the range of the array.
SoftwareViolationExceptionIf the element is not an array and the index is not 0.

Reimplemented from Safir::Dob::Parametrization.

virtual const Safir::Dob::Typesystem::ContainerBase& Safir::Dob::PersistenceParameters::GetMember ( const Safir::Dob::Typesystem::MemberIndex  member,
const Safir::Dob::Typesystem::ArrayIndex  index 
) const
virtual

Get a const reference to a member container from an object.

Use the methods in Members to get member indices and array sizes for use with this method.

Note: Do not use this method unless you're very sure it is the one you need!

Parameters
member[in] - The index of the member to get.
index[in] - The array index of the member to get.
Returns
A const reference to the member container.
Exceptions
IllegalValueExceptionIf the index is not in the range of the array.
SoftwareViolationExceptionIf the element is not an array and the index is not 0.

Reimplemented from Safir::Dob::Parametrization.

virtual Safir::Dob::Typesystem::TypeId Safir::Dob::PersistenceParameters::GetTypeId ( ) const
virtual

Get the type id of this object.

Gets the type id of the object. Method is virtual to ensure that the right value gets returned for pointers or references.

Note
this method is overridden by all auto-generated classes.
Returns
The TypeId of the object.

Reimplemented from Safir::Dob::Parametrization.

virtual bool Safir::Dob::PersistenceParameters::IsChanged ( )
virtual

Check if any member of this object is changed.

This method will recursively check if any member of the object has its change flag set.

Note
this method is overridden by all auto-generated classes.
Returns
True if any member has changed.

Reimplemented from Safir::Dob::Parametrization.

static std::wstring Safir::Dob::PersistenceParameters::OdbcStorageConnectString ( )
static

The string to use for connection to the physical storage.

virtual void Safir::Dob::PersistenceParameters::SetChanged ( const bool  changed)
virtual

Recursively set change flags in all members of this object.

Note
this method is overridden by all auto-generated classes.
Parameters
changed[in] - The value to set the change flags to

Reimplemented from Safir::Dob::Parametrization.

static bool Safir::Dob::PersistenceParameters::StandaloneMode ( )
static

StandaloneMode means that each dope that is started is saving its own persistent data.

Only valid if when several dope_main runs on different nodes in a redundant system. Use with caution. If active dope_main(the one that is started first) has no persistent data saved, all other nodes persistent data will be cleared.

static bool Safir::Dob::PersistenceParameters::SystemHasPersistence ( )
static

True if persistence is used in this system.

static bool Safir::Dob::PersistenceParameters::TestMode ( )
static

TestMode allow initial injections without persistence started.

Only valid if SystemHasPersistence flag is set to false.

static Safir::Dob::Typesystem::Int32 Safir::Dob::PersistenceParameters::TypeNameColumnSize ( )
static

The size of the TypeName column in the database.

Unit is likely in unicode characters.

virtual void Safir::Dob::PersistenceParameters::WriteToBlob ( char *  blob,
char *&  beginningOfUnused 
) const
virtual

Write the object to a blob.

Note that the size of the blob is assumed to be correct! No checks are made!

Parameters
blob[in,out] - The blob to write to.
beginningOfUnused[in,out] - The beginning of unused dynamic blob space.

Reimplemented from Safir::Dob::Parametrization.

static Safir::Dob::Typesystem::Int32 Safir::Dob::PersistenceParameters::XmlDataColumnSize ( )
static

The size of the XmlData column in the database.

Member Data Documentation

const Safir::Dob::Typesystem::TypeId Safir::Dob::PersistenceParameters::ClassTypeId = 8276373340234567943LL
static

Type id for PersistenceParameters.