CONZEPT 16 C++ API
C16::Record::Field< Value > Class Template Reference

Field buffer of a record buffer. More...

#include "C16/Record.hpp"

Inheritance diagram for C16::Record::Field< Value >:
C16::Record::FieldGeneric C16::Record::FieldCommon

Detailed Description

template<typename Value>
class C16::Record::Field< Value >

Field buffer of a record buffer.

Template Parameters
ValueValue type of the field.

Public Member Functions

 Field (Record &record, const C16::Field &field)
 Constructs a field buffer of a record buffer by means of its corresponing field. More...
 
 Field (Record &record, int subrecord_number, int field_number)
 Constructs a field buffer of a record buffer by means of the number of its subrecord and the number of its corresponing field. More...
 
 Field (Record &record, const std::string &field_name)
 Constructs a field buffer of a record buffer by means of the name of its corresponing field. More...
 
Value value () const
 Gets the value of the field buffer. More...
 
 operator Value () const
 Gets the value of the field buffer. More...
 
Fieldoperator= (const Value &value)
 Sets the value of the field buffer. More...
 
- Public Member Functions inherited from C16::Record::FieldGeneric
const Recordrecord () const override
 Gets the record buffer of the field buffer. More...
 
Recordrecord ()
 Gets the record buffer of the field buffer. More...
 
- Public Member Functions inherited from C16::Record::FieldCommon
const Fieldfield () const
 Gets the field of the field buffer. More...
 

Constructor & Destructor Documentation

◆ Field() [1/3]

template<typename Value >
C16::Record::Field< Value >::Field ( Record record,
const C16::Field< Value > &  field 
)

Constructs a field buffer of a record buffer by means of its corresponing field.

Parameters
recordRecord buffer
fieldField
Exceptions
Exception::DifferenceTable different.
Table of the field is different to table of the record buffer.
Exception::DifferenceType different.
Type of the field is different to the value type.
See also
Record::field<Value>(const C16::Field& field)

◆ Field() [2/3]

template<typename Value >
C16::Record::Field< Value >::Field ( Record record,
int  subrecord_number,
int  field_number 
)

Constructs a field buffer of a record buffer by means of the number of its subrecord and the number of its corresponing field.

Parameters
recordRecord buffer
subrecord_numberNumber of the subrecord
field_numberNumber of the field
Exceptions
Exception::InexistenceField inexistent.
Exception::DifferenceType different.
Type of the field is different to the value type.
See also
Record::field<Value>(int subrecord_number, int field_number)

◆ Field() [3/3]

template<typename Value >
C16::Record::Field< Value >::Field ( Record record,
const std::string &  field_name 
)

Constructs a field buffer of a record buffer by means of the name of its corresponing field.

Parameters
recordRecord buffer
field_nameName of the field
Exceptions
Exception::InexistenceField inexistent.
Exception::DifferenceType different.
Type of the field is different to the value type.
See also
Record::field<Value>(const std::string& field_name)

Member Function Documentation

◆ value()

template<typename Value >
Value C16::Record::Field< Value >::value ( ) const

Gets the value of the field buffer.

◆ operator Value()

template<typename Value >
C16::Record::Field< Value >::operator Value ( ) const

Gets the value of the field buffer.

◆ operator=()

template<typename Value >
Field& C16::Record::Field< Value >::operator= ( const Value &  value)

Sets the value of the field buffer.

Parameters
valueValue
Returns
This field buffer