8#ifndef META_OCEAN_SCENEDESCRIPTION_FIELD_0D_H
9#define META_OCEAN_SCENEDESCRIPTION_FIELD_0D_H
19namespace SceneDescription
23template <
typename T>
class Field0D;
234 timestamp_ = timestamp;
246 if (fieldType != field.
type() || fieldDimension != field.
dimension())
251 value_ =
dynamic_cast<const Field0D<T>&
>(field).value_;
Field0D()=default
Creates a new single value field with an undefined value.
const T & value() const
Returns the value of this field.
Definition Field0D.h:218
T value_
Field (single) value.
Definition Field0D.h:187
static constexpr unsigned int fieldDimension
Dimension of this single field.
Definition Field0D.h:116
static constexpr Type fieldType
Scalar type of this single field.
Definition Field0D.h:113
Field0D(const T &value, const Timestamp timestamp)
Creates a new single value field by a given initialization value and an explicit timestamp.
Definition Field0D.h:198
Type type() const override
Returns the type of this field.
Definition Field0D.h:206
Field0D(const T &value)
Creates a new single value field by a given initialization value.
Definition Field0D.h:191
unsigned int dimension() const override
Returns the dimension of this field.
Definition Field0D.h:212
Field * copy() const override
Returns a new instance of this field.
Definition Field0D.h:238
void setValue(const T &value, const Timestamp timestamp)
Sets the value of this field and defines an explicit modification timestamp.
Definition Field0D.h:231
bool assign(const Field &field) override
Assigns a field to this field if both field have the identical field type.
Definition Field0D.h:244
void setValue(const T &value)
Sets the value of this field and changes the modification timestamp to the current time.
Definition Field0D.h:224
This class is the base class for all scene description fields.
Definition Field.h:36
Timestamp timestamp() const
Returns the most recent field modification timestamp.
Definition Field.h:197
Type
Definition of scalar field types.
Definition Field.h:43
virtual Type type() const =0
Returns the type of this field.
virtual unsigned int dimension() const =0
Returns the dimension of this field.
static constexpr Field::Type type()
Returns the scalar field type for this mapper object.
Definition FieldTyper.h:37
This class implements a timestamp.
Definition Timestamp.h:63
The namespace covering the entire Ocean framework.
Definition Accessor.h:15