Attention
This API is currently available in C++ and Python.
OEFieldBase
class OEFieldBase
The OEFieldBase class is a base class for the templated OEField classes used to set and get data from OERecord objects. In most cases, the templated, concrete OEField objects should be used.
Constructors
OEFieldBase()
The default constructor initializes the field object to an invalid field with no name or type.
OEFieldBase(const OEFieldBase& rhs)
Copy constructor.
operator=
OEFieldBase & operator=(const OEFieldBase &)
Assignment operator.
GetName
std::string GetName() const
Returns the field’s name.
SetName
void SetName(const std::string& name)
Sets the name of the field.
GetTypeName
std::string GetTypeName() const
Returns the name of the field’s type.
IsNullable
bool IsNullable() const
Returns true if the field allows setting of null values.
IsReadonly
bool IsReadonly() const
Returns true if the field only allows reading, but not writing, of data onto a record.
IsValid
bool IsValid() const
Returns true if the field has been initialized.
GetMeta
OEFieldMeta GetMeta() const
Returns the metadata associated with this field. If the field has no metadata, an empty OEFieldMeta object is returned.
SetMeta
void SetMeta(const OEFieldMeta& meta)
Sets metadata for this field.
See also
OEField
class OEField
The OEField class is a templated subclass of OEFieldBase and is templated on types that can be stored on OERecord.
The following methods are publicly inherited from OEFieldBase:
Constructors
template<typename T> OEField<T>::OEField(const string &,
OEFieldMeta, bool, bool)
This constructor initializes the field object with the specified type, name, and metadata, and sets the readonly and nullable states of the field.
The Types namespace contains the types of
T that are supported.
Note
OEField objects are best created using the
OEMakeField function instead of this
constructor method.
See also
template<typename T> OEField<T>::OEField(const OEFieldBase& f)
Copy constructor.
GetType
OEFieldType<T> GetType() const
Returns an OEFieldType object representing the type of objects stored and retrieved by this field.
OEVectorField
class OEVectorField
The OEVectorField class is a templated subclass of OEFieldBase and is templated on types that can be stored in vectors on OERecord.
Constructors
template<typename T> OEVectorField<T>::OEVectorField(const string &,
OEFieldMeta = OEFieldMeta(),
bool = false,
bool = false)
This constructor initializes the field object with the specified type, name, and metadata, and sets the readonly and nullable states of the field. An OEVectorField<T> can store and retrieve std::vector<T> objects to and from records.
See the Types namespace for types of
T that are supported.
Note
OEVectorField objects are best created using the
OEMakeField function instead of this
constructor method.
template<typename T> OEVectorField<T>::OEVectorField(const OEFieldBase &)
Copy constructor.
GetType
OEVectorFieldType<T> GetType() const
Returns an OEVectorFieldType object representing the type of objects stored and retrieved by this field.
OEMatchField
class OEMatchField
The OEMatchField class is a templated subclass of OEField. It is used to retrieve values from an OERecord object when the name of the field is unknown. An OEMatchField object acts as a surrogate for the first field of a record that matches the type and metadata.
Constructors
OEMatchField(const std::string& name,
const OEFieldMeta meta = OEFieldMeta(),
bool readonly = false, bool nullable = false)
This constructor initializes the match field object with the specified type, name, and metadata, and sets the readonly and nullable states of the field. The provided name parameter is only used if the match field creates a new field on a record.
Note
OEMatchField objects are best created using the
OEMakeMatchField function instead of this
constructor method.
See also
OEMatchVectorField
class OEMatchVectorField
The OEMatchVectorField class is a templated subclass of OEVectorField. It is used to retrieve values from an OERecord object when the name of the field is unknown. An OEMatchVectorField object acts as a surrogate for the first vector field of a record that matches the type and metadata.
Constructors
OEMatchVectorField(const std::string& name,
const OEFieldMeta meta = OEFieldMeta(),
bool readonly = false, bool nullable = false)
This constructor initializes the match field object with the specified type, name, and metadata, and sets the readonly and nullable states of the field. The provided name parameter is only used if the match field creates a new field on a record.
Note
OEMatchVectorField objects are best created using the
OEMakeMatchField function instead of this
constructor method.
See also