25 #ifndef __DOTS_OBJECT_CONTAINER_H__
26 #define __DOTS_OBJECT_CONTAINER_H__
211 m_pObject = boost::dynamic_pointer_cast<T>(other.m_pObject->Clone());
212 if (m_pObject == NULL)
235 m_pObject = boost::dynamic_pointer_cast<T>(other.m_pObject->Clone());
236 if (m_pObject == NULL)
263 m_pObject = boost::dynamic_pointer_cast<T>(ptr);
264 if (m_pObject == NULL)
301 virtual bool IsNull()
const {
return m_pObject == NULL;}
315 if (
typeid(*
this) !=
typeid(that))
359 m_pObject = boost::dynamic_pointer_cast<T>(ptr);
360 if(m_pObject == NULL)
365 m_pObject = boost::static_pointer_cast<T>(ptr);
385 typedef boost::shared_ptr<Object>
T_Ptr;
407 m_pObject = other.m_pObject->Clone();
426 m_pObject = other.m_pObject->Clone();
471 virtual bool IsNull()
const {
return m_pObject == NULL;}
485 if (
typeid(*
this) !=
typeid(that))
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:468
ObjectContainerImpl()
Default constructor.
Definition: ObjectContainer.h:196
The base class for all DOB objects.
Definition: Object.h:54
virtual bool IsNull() const
Is the container set to null?
Definition: ObjectContainer.h:471
virtual void SetNull()
Set the container to null.
Definition: ObjectContainer.h:304
Int32 CalculateBlobSize() const
Calculate the size of the blob-serialized form of the contained object.
Definition: ObjectContainer.h:521
virtual const ObjectPtr GetObjectPointer() const =0
Get a smart pointer to the contained object.
This is a specialization of the ObjectContainerImpl template for the case where the template argument...
Definition: ObjectContainer.h:381
const T_Ptr & GetPtr() const
Get the smart pointer from the container.
Definition: ObjectContainer.h:448
boost::shared_ptr< T > T_Ptr
Typedef for the contained smart pointer.
Definition: ObjectContainer.h:189
virtual void Copy(const ContainerBase &that)
Virtual assignment.
Definition: ObjectContainer.h:481
void SetPtr(const T_Ptr &ptr)
Set the smart pointer in the container.
Definition: ObjectContainer.h:253
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:506
Base class for all object containers.
Definition: ObjectContainer.h:46
virtual ContainerBase & GetMember(const int member, const int index)
Get a reference to a member container from an object.
Definition: ObjectContainer.h:504
virtual void SetChanged(const bool changed)
Set the containers change flag.
Definition: ObjectContainer.h:295
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:335
Meant to be used when something goes very wrong.
Definition: Exceptions.h:360
T *const operator->() const
Dereference the smart pointer in the container.
Definition: ObjectContainer.h:290
virtual const ObjectPtr GetObjectPointer() const
Get a smart pointer to the contained object.
Definition: ObjectContainer.h:355
Int32 CalculateBlobSize() const
Calculate the size of the blob-serialized form of the contained object.
Definition: ObjectContainer.h:351
ObjectContainerImpl & operator=(const ObjectContainerImpl &other)
Copy assignment operator.
Definition: ObjectContainer.h:417
virtual void SetPtr(const ObjectPtr &ptr)
Set the smart pointer in the container.
Definition: ObjectContainer.h:260
ContainerBase & operator=(const ContainerBase &other)
Copy assignment operator.
Definition: ContainerBase.h:117
virtual bool IsNull() const
Is the container set to null?
Definition: ObjectContainer.h:301
Template class for all containers of automatically generated DOB objects.
Definition: ObjectContainer.h:185
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:298
virtual void ResetObjectPointer()=0
Reset (ie set to null) the contained pointer.
virtual void SetPtr(const ObjectPtr &ptr)
Set the smart pointer in the container.
Definition: ObjectContainer.h:433
virtual void SetObjectPointer(const ObjectPtr ptr)=0
Set the smart pointer in the container.
Object *const operator->() const
Dereference the smart pointer in the container.
Definition: ObjectContainer.h:459
ObjectContainerBase()
Default constructor.
Definition: ObjectContainer.h:50
Safir::Dob::Typesystem::ObjectContainerImpl< Object > ObjectContainer
Container for DOB Objects.
Definition: ObjectContainer.h:544
#define __WFILE__
Definition: Exceptions.h:31
ObjectContainerImpl(const ObjectContainerImpl &other)
Copy constructor.
Definition: ObjectContainer.h:206
boost::shared_ptr< Object > ObjectPtr
A smart pointer to an Object.
Definition: Object.h:41
ObjectContainerImpl()
Default constructor.
Definition: ObjectContainer.h:392
virtual bool IsNull() const =0
Is the container set to null?
ObjectContainerBase & operator=(const ObjectContainerBase &other)
Copy assignment operator.
Definition: ObjectContainer.h:168
virtual void Copy(const ContainerBase &that)
Virtual assignment.
Definition: ObjectContainer.h:311
bool IsChangedHere() const
Is the change flag in the container set?
Definition: ObjectContainer.h:71
Base class for all Containers.
Definition: ContainerBase.h:41
Thrown when an application attempts to get the value of a member that is null.
Definition: Exceptions.h:394
boost::shared_ptr< Object > T_Ptr
Typedef for the contained smart pointer.
Definition: ObjectContainer.h:385
virtual void SetChanged(const bool changed)
Set the containers change flag.
Definition: ObjectContainer.h:465
ObjectContainerImpl & operator=(const ObjectContainerImpl &other)
Copy assignment operator.
Definition: ObjectContainer.h:226
ObjectContainerImpl(const ObjectContainerImpl &other)
Copy constructor.
Definition: ObjectContainer.h:402
virtual ContainerBase & GetMember(const int member, const int index)=0
Get a reference to a member container from an object.
virtual void SetObjectPointer(const ObjectPtr ptr)
Set the smart pointer in the container.
Definition: ObjectContainer.h:356
virtual void SetNull()
Set the container to null.
Definition: ObjectContainer.h:474
bool m_bIsChanged
The variable containing the change flag.
Definition: ContainerBase.h:123
virtual void ResetObjectPointer()
Reset (ie set to null) the contained pointer.
Definition: ObjectContainer.h:368
virtual void SetPtr(const ObjectPtr &ptr)=0
Set the smart pointer in the container.
const T_Ptr & GetPtr() const
Get the smart pointer from the container.
Definition: ObjectContainer.h:279
DotsC_Int32 Int32
32 bit integer type.
Definition: Defs.h:67
virtual ContainerBase & GetMember(const int member, const int index)
Get a reference to a member container from an object.
Definition: ObjectContainer.h:333
This exception is thrown if a class cannot be cast to the expected type.
Definition: Exceptions.h:289
void SetChangedHere(const bool changed)
Set the change flag in the container.
Definition: ObjectContainer.h:80