libcluon  0.0.148
cluon::MetaMessage::MetaField Class Reference

#include <MetaMessage.hpp>

Public Types

enum  MetaFieldDataTypes : uint16_t {
  BOOL_T = 0, UINT8_T = 2, INT8_T = 3, UINT16_T = 4,
  INT16_T = 5, UINT32_T = 6, INT32_T = 7, UINT64_T = 8,
  INT64_T = 9, CHAR_T = 11, FLOAT_T = 13, DOUBLE_T = 14,
  BYTES_T = 49, STRING_T = 51, MESSAGE_T = 53, UNDEFINED_T = 0xFFFF
}
 

Public Member Functions

 MetaField ()=default
 
 MetaField (const MetaField &)=default
 
 MetaField (MetaField &&)=default
 
MetaFieldoperator= (const MetaField &)=default
 
MetaFieldDataTypes fieldDataType () const noexcept
 
MetaFieldfieldDataType (const MetaFieldDataTypes &v) noexcept
 
std::string fieldDataTypeName () const noexcept
 
MetaFieldfieldDataTypeName (const std::string &v) noexcept
 
std::string fieldName () const noexcept
 
MetaFieldfieldName (const std::string &v) noexcept
 
uint32_t fieldIdentifier () const noexcept
 
MetaFieldfieldIdentifier (uint32_t v) noexcept
 
std::string defaultInitializationValue () const noexcept
 
MetaFielddefaultInitializationValue (const std::string &v) noexcept
 

Detailed Description

This inner class provides a generic description for a message's fields. It is internally used during the processing of message specifications.

Member Enumeration Documentation

◆ MetaFieldDataTypes

Enumerator
BOOL_T 
UINT8_T 
INT8_T 
UINT16_T 
INT16_T 
UINT32_T 
INT32_T 
UINT64_T 
INT64_T 
CHAR_T 
FLOAT_T 
DOUBLE_T 
BYTES_T 
STRING_T 
MESSAGE_T 
UNDEFINED_T 

Constructor & Destructor Documentation

◆ MetaField() [1/3]

cluon::MetaMessage::MetaField::MetaField ( )
default

◆ MetaField() [2/3]

cluon::MetaMessage::MetaField::MetaField ( const MetaField )
default

◆ MetaField() [3/3]

cluon::MetaMessage::MetaField::MetaField ( MetaField &&  )
default

Member Function Documentation

◆ defaultInitializationValue() [1/2]

std::string cluon::MetaMessage::MetaField::defaultInitializationValue ( ) const
noexcept
Returns
Field's default initialization value.

◆ defaultInitializationValue() [2/2]

MetaMessage::MetaField & cluon::MetaMessage::MetaField::defaultInitializationValue ( const std::string &  v)
noexcept

This method sets the field's default initialization value for this field.

Parameters
vField's default initialization value for this field.
Returns
Reference to this instance.

◆ fieldDataType() [1/2]

MetaMessage::MetaField::MetaFieldDataTypes cluon::MetaMessage::MetaField::fieldDataType ( ) const
noexcept
Returns
Type of this field.

◆ fieldDataType() [2/2]

MetaMessage::MetaField & cluon::MetaMessage::MetaField::fieldDataType ( const MetaFieldDataTypes v)
noexcept

This method sets the type for this field.

Parameters
vType for this field.
Returns
Reference to this instance.

◆ fieldDataTypeName() [1/2]

std::string cluon::MetaMessage::MetaField::fieldDataTypeName ( ) const
noexcept
Returns
Type name of this field.

◆ fieldDataTypeName() [2/2]

MetaMessage::MetaField & cluon::MetaMessage::MetaField::fieldDataTypeName ( const std::string &  v)
noexcept

This method sets the type name for this field.

Parameters
vType name for this field.
Returns
Reference to this instance.

◆ fieldIdentifier() [1/2]

uint32_t cluon::MetaMessage::MetaField::fieldIdentifier ( ) const
noexcept
Returns
Identifier of this field.

◆ fieldIdentifier() [2/2]

MetaMessage::MetaField & cluon::MetaMessage::MetaField::fieldIdentifier ( uint32_t  v)
noexcept

This method sets the identifier for this field.

Parameters
vIdentifier for this field.
Returns
Reference to this instance.

◆ fieldName() [1/2]

std::string cluon::MetaMessage::MetaField::fieldName ( ) const
noexcept
Returns
Name of this field.

◆ fieldName() [2/2]

MetaMessage::MetaField & cluon::MetaMessage::MetaField::fieldName ( const std::string &  v)
noexcept

This method sets the name for this field.

Parameters
vName for this field.
Returns
Reference to this instance.

◆ operator=()

MetaField& cluon::MetaMessage::MetaField::operator= ( const MetaField )
default