24 #ifndef __DOTS_OBJECT_CONTAINER_H__
25 #define __DOTS_OBJECT_CONTAINER_H__
212 m_pObject = boost::dynamic_pointer_cast<T>(other.m_pObject->Clone());
213 if (m_pObject == NULL)
236 m_pObject = boost::dynamic_pointer_cast<T>(other.m_pObject->Clone());
237 if (m_pObject == NULL)
264 m_pObject = boost::dynamic_pointer_cast<T>(ptr);
265 if (m_pObject == NULL)
302 virtual bool IsNull()
const {
return m_pObject == NULL;}
316 if (
typeid(*
this) !=
typeid(that))
360 m_pObject = boost::dynamic_pointer_cast<T>(ptr);
361 if(m_pObject == NULL)
366 m_pObject = boost::static_pointer_cast<T>(ptr);
385 typedef boost::shared_ptr<Object>
T_Ptr;
408 m_pObject = other.m_pObject->Clone();
427 m_pObject = other.m_pObject->Clone();
472 virtual bool IsNull()
const {
return m_pObject == NULL;}
486 if (
typeid(*
this) !=
typeid(that))
virtual const ContainerBase & GetMember(const int member, const int index) const
Get a const reference to a member container from an object.
Definition: ObjectContainer.h:336
Object *const operator->() const
Dereference the smart pointer in the container.
Definition: ObjectContainer.h:460
virtual ContainerBase & GetMember(const int member, const int index)
Get a reference to a member container from an object.
Definition: ObjectContainer.h:334
This exception is thrown if a class cannot be cast to the expected type.
Definition: Exceptions.h:289
Thrown when an application attempts to get the value of a member that is null.
Definition: Exceptions.h:394
virtual bool IsNull() const
Is the container set to null?
Definition: ObjectContainer.h:472
Meant to be used when something goes very wrong.
Definition: Exceptions.h:360
Int32 CalculateBlobSize() const
Calculate the size of the blob-serialized form of the contained object.
Definition: ObjectContainer.h:352
virtual void SetChanged(const bool changed)
Set the containers change flag.
Definition: ObjectContainer.h:296
virtual void SetPtr(const ObjectPtr &ptr)=0
Set the smart pointer in the container.
#define __WFILE__
Definition: Exceptions.h:31
bool m_bIsChanged
The variable containing the change flag.
Definition: ContainerBase.h:122
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition: Backdoor.h:30
virtual void Copy(const ContainerBase &that)
Virtual assignment.
Definition: ObjectContainer.h:482
boost::shared_ptr< Object > T_Ptr
Typedef for the contained smart pointer.
Definition: ObjectContainer.h:385
virtual bool IsChanged() const
Is the change flag set on the container? The change flag gets updated every time the contained value ...
Definition: ObjectContainer.h:299
virtual bool IsNull() const =0
Is the container set to null?
Template class for all containers of automatically generated DOB objects.
Definition: ObjectContainer.h:185
boost::shared_ptr< Object > ObjectPtr
A smart pointer to an Object.
Definition: Object.h:41
virtual void SetPtr(const ObjectPtr &ptr)
Set the smart pointer in the container.
Definition: ObjectContainer.h:261
virtual void SetObjectPointer(const ObjectPtr ptr)=0
Set the smart pointer in the container.
ObjectContainerBase()
Default constructor.
Definition: ObjectContainer.h:48
virtual void SetNull()
Set the container to null.
Definition: ObjectContainer.h:305
virtual void SetNull()
Set the container to null.
Definition: ObjectContainer.h:475
virtual void ResetObjectPointer()
Reset (ie set to null) the contained pointer.
Definition: ObjectContainer.h:369
virtual void SetChanged(const bool changed)
Set the containers change flag.
Definition: ObjectContainer.h:466
Safir::Dob::Typesystem::ObjectContainerImpl< Object > ObjectContainer
Container for DOB Objects.
Definition: ObjectContainer.h:530
virtual const ObjectPtr GetObjectPointer() const =0
Get a smart pointer to the contained object.
virtual void SetObjectPointer(const ObjectPtr ptr)
Set the smart pointer in the container.
Definition: ObjectContainer.h:357
Base class for all Containers.
Definition: ContainerBase.h:43
virtual void Copy(const ContainerBase &that)
Virtual assignment.
Definition: ObjectContainer.h:312
const T_Ptr & GetPtr() const
Get the smart pointer from the container.
Definition: ObjectContainer.h:280
virtual bool IsNull() const
Is the container set to null?
Definition: ObjectContainer.h:302
virtual void SetPtr(const ObjectPtr &ptr)
Set the smart pointer in the container.
Definition: ObjectContainer.h:434
ObjectContainerImpl & operator=(const ObjectContainerImpl &other)
Copy assignment operator.
Definition: ObjectContainer.h:418
This is a specialization of the ObjectContainerImpl template for the case where the template argument...
Definition: ObjectContainer.h:381
virtual const ObjectPtr GetObjectPointer() const
Get a smart pointer to the contained object.
Definition: ObjectContainer.h:356
The base class for all DOB objects.
Definition: Object.h:54
DotsC_Int32 Int32
32 bit integer type.
Definition: Defs.h:66
ObjectContainerImpl(const ObjectContainerImpl &other)
Copy constructor.
Definition: ObjectContainer.h:207
ObjectContainerImpl & operator=(const ObjectContainerImpl &other)
Copy assignment operator.
Definition: ObjectContainer.h:227
virtual const ContainerBase & GetMember(const int member, const int index) const
Get a const reference to a member container from an object.
Definition: ObjectContainer.h:507
bool IsChangedHere() const
Is the change flag in the container set?
Definition: ObjectContainer.h:69
void SetPtr(const T_Ptr &ptr)
Set the smart pointer in the container.
Definition: ObjectContainer.h:254
friend class Safir::Dob::Typesystem::Internal::BlobOperations
Definition: ObjectContainer.h:160
ObjectContainerImpl()
Default constructor.
Definition: ObjectContainer.h:197
ContainerBase & operator=(const ContainerBase &other)
Copy assignment operator.
Definition: ContainerBase.h:116
T *const operator->() const
Dereference the smart pointer in the container.
Definition: ObjectContainer.h:291
ObjectContainerImpl(const ObjectContainerImpl &other)
Copy constructor.
Definition: ObjectContainer.h:403
ObjectContainerBase & operator=(const ObjectContainerBase &other)
Copy assignment operator.
Definition: ObjectContainer.h:168
boost::shared_ptr< T > T_Ptr
Typedef for the contained smart pointer.
Definition: ObjectContainer.h:189
void SetChangedHere(const bool changed)
Set the change flag in the container.
Definition: ObjectContainer.h:78
ObjectContainerImpl()
Default constructor.
Definition: ObjectContainer.h:393
const T_Ptr & GetPtr() const
Get the smart pointer from the container.
Definition: ObjectContainer.h:449
virtual void ResetObjectPointer()=0
Reset (ie set to null) the contained pointer.
T_Ptr ContainedType
Definition: ObjectContainer.h:190
virtual bool IsChanged() const
Is the change flag set on the container? The change flag gets updated every time the contained value ...
Definition: ObjectContainer.h:469
T_Ptr ContainedType
Definition: ObjectContainer.h:386
Base class for all object containers.
Definition: ObjectContainer.h:44
virtual ContainerBase & GetMember(const int member, const int index)=0
Get a reference to a member container from an object.
virtual ContainerBase & GetMember(const int member, const int index)
Get a reference to a member container from an object.
Definition: ObjectContainer.h:505