![]() |
Safir SDK Core
|
Base class for all object sequences. More...
#include <Safir/Dob/Typesystem/SequenceContainer.h>
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) |
Base class for all object sequences.
Needed for the reflection stuff.
|
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.
index | [in] - The index of the object to get. |
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 >.
|
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.
index | [in] - The index of the object to get. |
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 >.
|
pure virtual |
Get a const generic pointer to the object at the specified index.
index | [in] - The index of the object to get. |
std::out_of_range | exception 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 >.
|
pure virtual |
Get a generic pointer to the object at the specified index.
index | [in] - The index of the object to get. |
std::out_of_range | exception 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 >.
|
pure virtual |
Is the change flag in the container set?
This method is like IsChanged without the recursion.
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 >.
|
pure virtual |
Insert a new object last in the sequence.
If the sequence was null before it will no longer be null after this call. Change flag is updated.
ptr | [in] - Object to be inserted. |
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 >.
|
pure virtual |
Set the change flag in the container.
This method is like SetChanged without the recursion
changed | [in] - The value to set the change flag to. |
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 >.
|
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.
ptr | [in] A pointer to the new object to point to. |
index | [in] - The index of the object to set. |
std::out_of_range | exception 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 >.
|
pure virtual |
Get the size of the sequence, i.e number of contained values.
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 >.
|
friend |