Safir SDK Core
Loading...
Searching...
No Matches
Safir::Dob::Typesystem::GenericObjectSequenceContainerBase Class Referenceabstract

Base class for all object sequences. More...

#include <Safir/Dob/Typesystem/SequenceContainer.h>

Inheritance diagram for Safir::Dob::Typesystem::GenericObjectSequenceContainerBase:
[legend]

Public Member Functions

virtual bool IsChangedHere () const =0
 Is the change flag in the container set?
 
virtual void SetChangedHere (const bool changed)=0
 Set the change flag in the container.
 
virtual size_t size () const =0
 Get the size of the sequence, i.e number of contained values.
 
Reflection part.

These methods allow applications to manipulate the members of objects without having been compiled against it.

There should be no reason for most applications to use these methods.

virtual ObjectPtr GetObj (const size_t index)=0
 Get a generic pointer to the object at the specified index.
 
virtual ObjectConstPtr GetObj (const size_t index) const =0
 Get a const generic pointer to the object at the specified index.
 
virtual ObjectPtr GetObjectPointer (const size_t index)=0
 Get a generic pointer to the object at the specified index.
 
virtual ObjectConstPtr GetObjectPointer (const size_t index) const =0
 Get a const generic pointer to the object at the specified index.
 
virtual void SetObjectPointer (const size_t index, const ObjectPtr &ptr)=0
 Set the smart pointer at a certain index in the container.
 
virtual void PushBackObjectPointer (const ObjectPtr &ptr)=0
 Insert a new object last in the sequence.
 

Friends

void Utilities::MergeChanges (ObjectPtr into, const ObjectConstPtr &from)
 

Detailed Description

Base class for all object sequences.

Needed for the reflection stuff.

Member Function Documentation

◆ GetObj() [1/2]

virtual ObjectConstPtr Safir::Dob::Typesystem::GenericObjectSequenceContainerBase::GetObj ( const size_t index) const
pure virtual

Get a const generic pointer to the object at the specified index.

Note: Unless you know that you need to use the reflection interface you should prefer to use the functions in GenericObjectSequenceContainer.

Indexing outside the sequence provokes undefined behavior.

Parameters
index[in] - The index of the object to get.
Returns
Const pointer to object.
Deprecated
use GetObjectPointer() or GetPtr() instead.

Implemented in Safir::Dob::Typesystem::GenericObjectSequenceContainer< T >, Safir::Dob::Typesystem::GenericObjectSequenceContainer< ClassType >, Safir::Dob::Typesystem::GenericObjectSequenceContainer< ConnectionStatisticsItem >, Safir::Dob::Typesystem::GenericObjectSequenceContainer< ConnectionStatisticsResponse >, Safir::Dob::Typesystem::GenericObjectSequenceContainer< EnumType >, and Safir::Dob::Typesystem::GenericObjectSequenceContainer< Member >.

◆ GetObj() [2/2]

virtual ObjectPtr Safir::Dob::Typesystem::GenericObjectSequenceContainerBase::GetObj ( const size_t index)
pure virtual

Get a generic pointer to the object at the specified index.

Note: Unless you know that you need to use the reflection interface you should prefer to use the functions in GenericObjectSequenceContainer.

Indexing outside the sequence provokes undefined behavior.

Parameters
index[in] - The index of the object to get.
Returns
Pointer to object.
Deprecated
use GetObjectPointer() or GetPtr() instead.

Implemented in Safir::Dob::Typesystem::GenericObjectSequenceContainer< T >, Safir::Dob::Typesystem::GenericObjectSequenceContainer< ClassType >, Safir::Dob::Typesystem::GenericObjectSequenceContainer< ConnectionStatisticsItem >, Safir::Dob::Typesystem::GenericObjectSequenceContainer< ConnectionStatisticsResponse >, Safir::Dob::Typesystem::GenericObjectSequenceContainer< EnumType >, and Safir::Dob::Typesystem::GenericObjectSequenceContainer< Member >.

◆ GetObjectPointer() [1/2]

virtual ObjectConstPtr Safir::Dob::Typesystem::GenericObjectSequenceContainerBase::GetObjectPointer ( const size_t index) const
pure virtual

◆ GetObjectPointer() [2/2]

virtual ObjectPtr Safir::Dob::Typesystem::GenericObjectSequenceContainerBase::GetObjectPointer ( const size_t index)
pure virtual

◆ IsChangedHere()

virtual bool Safir::Dob::Typesystem::GenericObjectSequenceContainerBase::IsChangedHere ( ) const
pure virtual

◆ PushBackObjectPointer()

virtual void Safir::Dob::Typesystem::GenericObjectSequenceContainerBase::PushBackObjectPointer ( const ObjectPtr & ptr)
pure virtual

◆ SetChangedHere()

virtual void Safir::Dob::Typesystem::GenericObjectSequenceContainerBase::SetChangedHere ( const bool changed)
pure virtual

◆ SetObjectPointer()

virtual void Safir::Dob::Typesystem::GenericObjectSequenceContainerBase::SetObjectPointer ( const size_t index,
const ObjectPtr & ptr )
pure virtual

Set the smart pointer at a certain index in the container.

This method will set the contained pointer to point to another object. Change flag is updated.

Parameters
ptr[in] A pointer to the new object to point to.
index[in] - The index of the object to set.
Exceptions
std::out_of_rangeexception if index is not in range

Implemented in Safir::Dob::Typesystem::GenericObjectSequenceContainer< T >, Safir::Dob::Typesystem::GenericObjectSequenceContainer< ClassType >, Safir::Dob::Typesystem::GenericObjectSequenceContainer< ConnectionStatisticsItem >, Safir::Dob::Typesystem::GenericObjectSequenceContainer< ConnectionStatisticsResponse >, Safir::Dob::Typesystem::GenericObjectSequenceContainer< EnumType >, and Safir::Dob::Typesystem::GenericObjectSequenceContainer< Member >.

◆ size()

Friends And Related Symbol Documentation

◆ Utilities::MergeChanges

void Utilities::MergeChanges ( ObjectPtr into,
const ObjectConstPtr & from )
friend