Safir SDK Core
|
Container for base types. More...
#include <Safir/Dob/Typesystem/ValueContainers.h>
Public Types | |
typedef T | ContainedType |
Public Member Functions | |
ValueContainer () | |
Default constructor. More... | |
void | SetVal (const T value) |
Set the value of the container. More... | |
T | GetVal () const |
Get the value of the container. More... | |
virtual bool | IsNull () const |
Is the container set to null? More... | |
virtual void | SetNull () |
Set the container to null. More... | |
virtual void | Copy (const ContainerBase &that) |
Virtual assignment. More... | |
Public Member Functions inherited from Safir::Dob::Typesystem::ContainerBase | |
ContainerBase () | |
Default Constructor. More... | |
virtual | ~ContainerBase () |
Virtual destructor. More... | |
virtual bool | IsChanged () const |
Is the change flag set on the container? The change flag gets updated every time the contained value changes. More... | |
virtual void | SetChanged (const bool changed) |
Set the containers change flag. More... | |
Friends | |
class | Safir::Dob::Typesystem::Internal::BlobOperations |
Additional Inherited Members | |
Protected Member Functions inherited from Safir::Dob::Typesystem::ContainerBase | |
ContainerBase & | operator= (const ContainerBase &other) |
Copy assignment operator. More... | |
Protected Attributes inherited from Safir::Dob::Typesystem::ContainerBase | |
bool | m_bIsChanged |
The variable containing the change flag. More... | |
Container for base types.
This class holds a value of the template argument type and a null flag. The operations that modify the value update the null flag and the change flag (which is inherited from ContainerBase).
This container is intended for the simple types of the DOB typesystem. There should be no need to use this type in a definition, since all the relevant instances of this template are defined with typedefs (e.g. Int32Container, BooleanContainer, EntityIdContainer, etc).
T | The type to contain. |
typedef T Safir::Dob::Typesystem::ValueContainer< T >::ContainedType |
Safir::Dob::Typesystem::ValueContainer< T >::ValueContainer | ( | ) |
Default constructor.
Creates a null and not changed container.
|
virtual |
Virtual assignment.
Copy all the members from "that" into "this". Types must be the same for this to work!
that | [in] - The object to copy into this. |
SoftwareViolationException | If the types are not of the same kind. |
Implements Safir::Dob::Typesystem::ContainerBase.
References __WFILE__.
T Safir::Dob::Typesystem::ValueContainer< T >::GetVal | ( | ) | const |
Get the value of the container.
NullException | The container is null. |
References __WFILE__.
|
virtual |
Is the container set to null?
Implements Safir::Dob::Typesystem::ContainerBase.
|
virtual |
Set the container to null.
Implements Safir::Dob::Typesystem::ContainerBase.
References Safir::Dob::Typesystem::ContainerBase::m_bIsChanged.
void Safir::Dob::Typesystem::ValueContainer< T >::SetVal | ( | const T | value | ) |
Set the value of the container.
Null and change flags are updated accordingly.
value | [in] - The new value. |
References Safir::Dob::Typesystem::ContainerBase::m_bIsChanged.
|
friend |