![]() |
Safir SDK Core
|
Container for base types. More...
#include <Safir/Dob/Typesystem/ValueContainers.h>
Public Types | |
typedef T | ContainedType |
Public Member Functions | |
constexpr | ValueContainer () |
Default constructor. | |
void | SetVal (const T value) |
Set the value of the container. | |
T | GetVal () const |
Get the value of the container. | |
bool | IsNull () const override |
Is the container set to null? | |
void | SetNull () override |
Set the container to null. | |
void | Copy (const ContainerBase &that) override |
Virtual assignment. | |
![]() | |
constexpr | ContainerBase () |
Default Constructor. | |
constexpr | ContainerBase (const ContainerBase &)=default |
Copy constructor. | |
virtual | ~ContainerBase () |
Virtual destructor. | |
virtual bool | IsChanged () const |
Is the change flag set on the container? | |
virtual void | SetChanged (const bool changed) |
Set the containers change flag. | |
Friends | |
class | Safir::Dob::Typesystem::Internal::BlobOperations |
Additional Inherited Members | |
![]() | |
ContainerBase & | operator= (const ContainerBase &other) |
Copy assignment operator. | |
![]() | |
bool | m_bIsChanged |
The variable containing the change flag. | |
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 |
|
constexpr |
Default constructor.
Creates a null and not changed container.
|
overridevirtual |
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__.
|
overridevirtual |
Is the container set to null?
Implements Safir::Dob::Typesystem::ContainerBase.
|
overridevirtual |
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 |