Fawkes API  Fawkes Development Version
fawkes::InterfaceFieldIterator Class Reference

Interface field iterator. More...

#include <>>

Public Member Functions

 InterfaceFieldIterator ()
 Constructor. More...
 
 InterfaceFieldIterator (const InterfaceFieldIterator &fit)
 Copy constructor. More...
 
 ~InterfaceFieldIterator ()
 Destructor. More...
 
InterfaceFieldIteratoroperator++ ()
 Prefix increment. More...
 
InterfaceFieldIterator operator++ (int inc)
 Postfix increment operator. More...
 
InterfaceFieldIteratoroperator+ (unsigned int i)
 Advance by i steps. More...
 
InterfaceFieldIteratoroperator+= (unsigned int i)
 Advance by i steps. More...
 
bool operator== (const InterfaceFieldIterator &fit) const
 Check iterators for equality. More...
 
bool operator!= (const InterfaceFieldIterator &fit) const
 Check iterators for inequality. More...
 
const void * operator* () const
 Get FieldHeader. More...
 
InterfaceFieldIteratoroperator= (const InterfaceFieldIterator &fit)
 Make this instance point to the same segment as fi. More...
 
interface_fieldtype_t get_type () const
 Get type of current field. More...
 
const char * get_typename () const
 Get type of current field as string. More...
 
bool is_enum () const
 Check if field is an enum. More...
 
std::list< const char * > get_enum_valuenames () const
 Return the list of possible enum value names. More...
 
const char * get_name () const
 Get name of current field. More...
 
const void * get_value () const
 Get value of current field. More...
 
const char * get_value_string (const char *array_sep=", ")
 Get value of current field as string. More...
 
size_t get_length () const
 Get length of current field. More...
 
bool get_bool (unsigned int index=0) const
 Get value of current field as bool. More...
 
int8_t get_int8 (unsigned int index=0) const
 Get value of current field as integer. More...
 
uint8_t get_uint8 (unsigned int index=0) const
 Get value of current field as unsigned integer. More...
 
int16_t get_int16 (unsigned int index=0) const
 Get value of current field as integer. More...
 
uint16_t get_uint16 (unsigned int index=0) const
 Get value of current field as unsigned integer. More...
 
int32_t get_int32 (unsigned int index=0) const
 Get value of current field as integer. More...
 
uint32_t get_uint32 (unsigned int index=0) const
 Get value of current field as unsigned integer. More...
 
int64_t get_int64 (unsigned int index=0) const
 Get value of current field as integer. More...
 
uint64_t get_uint64 (unsigned int index=0) const
 Get value of current field as unsigned integer. More...
 
float get_float (unsigned int index=0) const
 Get value of current field as float. More...
 
double get_double (unsigned int index=0) const
 Get value of current field as double. More...
 
uint8_t get_byte (unsigned int index=0) const
 Get value of current field as byte. More...
 
int32_t get_enum (unsigned int index=0) const
 Get value of current enum field as integer. More...
 
const char * get_enum_string (unsigned int index=0) const
 Get value of current enum field as string. More...
 
bool * get_bools () const
 Get value of current field as bool array. More...
 
int8_t * get_int8s () const
 Get value of current field as integer array. More...
 
uint8_t * get_uint8s () const
 Get value of current field as unsigned integer array. More...
 
int16_t * get_int16s () const
 Get value of current field as integer array. More...
 
uint16_t * get_uint16s () const
 Get value of current field as unsigned integer array. More...
 
int32_t * get_int32s () const
 Get value of current field as integer array. More...
 
uint32_t * get_uint32s () const
 Get value of current field as unsigned integer array. More...
 
int64_t * get_int64s () const
 Get value of current field as integer array. More...
 
uint64_t * get_uint64s () const
 Get value of current field as unsigned integer array. More...
 
float * get_floats () const
 Get value of current field as float array. More...
 
double * get_doubles () const
 Get value of current field as double array. More...
 
uint8_t * get_bytes () const
 Get value of current field as byte array. More...
 
int32_t * get_enums () const
 Get value of current enum field as integer array. More...
 
const char * get_string () const
 Get value of current field as string. More...
 
void set_bool (bool b, unsigned int index=0)
 Set value of current field as bool. More...
 
void set_int8 (int8_t i, unsigned int index=0)
 Set value of current field as integer. More...
 
void set_uint8 (uint8_t i, unsigned int index=0)
 Set value of current field as unsigned integer. More...
 
void set_int16 (int16_t i, unsigned int index=0)
 Set value of current field as integer. More...
 
void set_uint16 (uint16_t i, unsigned int index=0)
 Set value of current field as unsigned integer. More...
 
void set_int32 (int32_t i, unsigned int index=0)
 Set value of current field as integer. More...
 
void set_uint32 (uint32_t i, unsigned int index=0)
 Set value of current field as unsigned integer. More...
 
void set_int64 (int64_t i, unsigned int index=0)
 Set value of current field as integer. More...
 
void set_uint64 (uint64_t i, unsigned int index=0)
 Set value of current field as unsigned integer. More...
 
void set_float (float f, unsigned int index=0)
 Set value of current field as float. More...
 
void set_double (double f, unsigned int index=0)
 Set value of current field as double. More...
 
void set_byte (uint8_t b, unsigned int index=0)
 Set value of current field as byte. More...
 
void set_enum (int32_t e, unsigned int index=0)
 Set value of current field as enum (from an integer). More...
 
void set_enum_string (const char *e, unsigned int index=0)
 Set value of current field as enum (from an integer). More...
 
void set_bools (bool *b)
 Set value of current field as bool array. More...
 
void set_int8s (int8_t *i)
 Set value of current field as integer array. More...
 
void set_uint8s (uint8_t *i)
 Set value of current field as unsigned integer array. More...
 
void set_int16s (int16_t *i)
 Set value of current field as integer array. More...
 
void set_uint16s (uint16_t *i)
 Set value of current field as unsigned integer array. More...
 
void set_int32s (int32_t *i)
 Set value of current field as integer array. More...
 
void set_uint32s (uint32_t *i)
 Set value of current field as unsigned integer array. More...
 
void set_int64s (int64_t *i)
 Set value of current field as integer array. More...
 
void set_uint64s (uint64_t *i)
 Set value of current field as unsigned integer array. More...
 
void set_floats (float *f)
 Set value of current field as float array. More...
 
void set_doubles (double *f)
 Set value of current field as double array. More...
 
void set_bytes (uint8_t *b)
 Set value of current field as byte array. More...
 
void set_string (const char *s)
 Set value of current field as string. More...
 

Protected Member Functions

 InterfaceFieldIterator (Interface *interface, const interface_fieldinfo_t *info_list)
 Constructor. More...
 

Detailed Description

Interface field iterator.

This iterator is part of the BlackBoard introspection API. It can be used to iterate over all available fields and values of an interface without actually knowing the specific type of the interface.

Author
Tim Niemueller

Definition at line 38 of file field_iterator.h.

Constructor & Destructor Documentation

◆ InterfaceFieldIterator() [1/3]

fawkes::InterfaceFieldIterator::InterfaceFieldIterator ( )

Constructor.

Creates an invalid iterator.

Definition at line 47 of file field_iterator.cpp.

◆ InterfaceFieldIterator() [2/3]

fawkes::InterfaceFieldIterator::InterfaceFieldIterator ( const InterfaceFieldIterator fit)

Copy constructor.

Parameters
fititerator to copy

Definition at line 70 of file field_iterator.cpp.

◆ ~InterfaceFieldIterator()

fawkes::InterfaceFieldIterator::~InterfaceFieldIterator ( )

Destructor.

Definition at line 82 of file field_iterator.cpp.

◆ InterfaceFieldIterator() [3/3]

fawkes::InterfaceFieldIterator::InterfaceFieldIterator ( Interface interface,
const interface_fieldinfo_t info_list 
)
protected

Constructor.

This creates an iterator pointing to the given entry of the info list.

Parameters
interfaceinterface this field iterator is assigned to
info_listpointer to info list entry to start from

Definition at line 59 of file field_iterator.cpp.

Member Function Documentation

◆ get_bool()

bool fawkes::InterfaceFieldIterator::get_bool ( unsigned int  index = 0) const

Get value of current field as bool.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type bool
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 409 of file field_iterator.cpp.

References fawkes::IFT_BOOL, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_bools()

bool * fawkes::InterfaceFieldIterator::get_bools ( ) const

Get value of current field as bool array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type bool or field is not an array (length is 1)

Definition at line 709 of file field_iterator.cpp.

References fawkes::IFT_BOOL, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_byte()

uint8_t fawkes::InterfaceFieldIterator::get_byte ( unsigned int  index = 0) const

Get value of current field as byte.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type byte
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 640 of file field_iterator.cpp.

References fawkes::IFT_BYTE, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_bytes()

uint8_t * fawkes::InterfaceFieldIterator::get_bytes ( ) const

Get value of current field as byte array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type byte or field is not an array (length is 1)

Definition at line 909 of file field_iterator.cpp.

References fawkes::IFT_BYTE, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_double()

double fawkes::InterfaceFieldIterator::get_double ( unsigned int  index = 0) const

Get value of current field as double.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type float
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 619 of file field_iterator.cpp.

References fawkes::IFT_DOUBLE, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_doubles()

double * fawkes::InterfaceFieldIterator::get_doubles ( ) const

Get value of current field as double array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type double or field is not an array (length is 1)

Definition at line 891 of file field_iterator.cpp.

References fawkes::IFT_DOUBLE, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_enum()

int32_t fawkes::InterfaceFieldIterator::get_enum ( unsigned int  index = 0) const

Get value of current enum field as integer.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 661 of file field_iterator.cpp.

References fawkes::IFT_ENUM, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_enum_string()

const char * fawkes::InterfaceFieldIterator::get_enum_string ( unsigned int  index = 0) const

Get value of current enum field as string.

Returns
field value as string
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int
OutOfBoundsExceptionthrown if index is out of bounds
IllegalArgumentExceptionthrown if the value is set to an integer which is not represented by any of the canonical enum values

Definition at line 684 of file field_iterator.cpp.

References fawkes::interface_fieldinfo_t::enum_map, fawkes::IFT_ENUM, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_enum_valuenames()

std::list< const char * > fawkes::InterfaceFieldIterator::get_enum_valuenames ( ) const

Return the list of possible enum value names.

Returns
a list of the possible enum values.

Definition at line 247 of file field_iterator.cpp.

References fawkes::interface_fieldinfo_t::enum_map.

◆ get_enums()

int32_t * fawkes::InterfaceFieldIterator::get_enums ( ) const

Get value of current enum field as integer array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int or field is not an array (length is 1)

Definition at line 927 of file field_iterator.cpp.

References fawkes::IFT_ENUM, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_float()

float fawkes::InterfaceFieldIterator::get_float ( unsigned int  index = 0) const

Get value of current field as float.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type float
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 598 of file field_iterator.cpp.

References fawkes::IFT_FLOAT, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_floats()

float * fawkes::InterfaceFieldIterator::get_floats ( ) const

Get value of current field as float array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type float or field is not an array (length is 1)

Definition at line 873 of file field_iterator.cpp.

References fawkes::IFT_FLOAT, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_int16()

int16_t fawkes::InterfaceFieldIterator::get_int16 ( unsigned int  index = 0) const

Get value of current field as integer.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 472 of file field_iterator.cpp.

References fawkes::IFT_INT16, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_int16s()

int16_t * fawkes::InterfaceFieldIterator::get_int16s ( ) const

Get value of current field as integer array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int or field is not an array (length is 1)

Definition at line 765 of file field_iterator.cpp.

References fawkes::IFT_INT16, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_int32()

int32_t fawkes::InterfaceFieldIterator::get_int32 ( unsigned int  index = 0) const

Get value of current field as integer.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 514 of file field_iterator.cpp.

References fawkes::IFT_INT32, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_int32s()

int32_t * fawkes::InterfaceFieldIterator::get_int32s ( ) const

Get value of current field as integer array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int or field is not an array (length is 1)

Definition at line 801 of file field_iterator.cpp.

References fawkes::IFT_INT32, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_int64()

int64_t fawkes::InterfaceFieldIterator::get_int64 ( unsigned int  index = 0) const

Get value of current field as integer.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 556 of file field_iterator.cpp.

References fawkes::IFT_INT64, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_int64s()

int64_t * fawkes::InterfaceFieldIterator::get_int64s ( ) const

Get value of current field as integer array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int or field is not an array (length is 1)

Definition at line 837 of file field_iterator.cpp.

References fawkes::IFT_INT64, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_int8()

int8_t fawkes::InterfaceFieldIterator::get_int8 ( unsigned int  index = 0) const

Get value of current field as integer.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 430 of file field_iterator.cpp.

References fawkes::IFT_INT8, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_int8s()

int8_t * fawkes::InterfaceFieldIterator::get_int8s ( ) const

Get value of current field as integer array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int or field is not an array (length is 1)

Definition at line 729 of file field_iterator.cpp.

References fawkes::IFT_INT8, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_length()

size_t fawkes::InterfaceFieldIterator::get_length ( ) const

Get length of current field.

Returns
length of field

Definition at line 287 of file field_iterator.cpp.

References fawkes::interface_fieldinfo_t::length.

Referenced by BBLogFile::print_entry().

◆ get_name()

const char * fawkes::InterfaceFieldIterator::get_name ( void  ) const

Get name of current field.

Returns
field name

Definition at line 261 of file field_iterator.cpp.

References fawkes::interface_fieldinfo_t::name.

Referenced by BBLogFile::print_entry().

◆ get_string()

const char * fawkes::InterfaceFieldIterator::get_string ( ) const

Get value of current field as string.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type string

Definition at line 944 of file field_iterator.cpp.

References fawkes::IFT_STRING, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_type()

interface_fieldtype_t fawkes::InterfaceFieldIterator::get_type ( ) const

Get type of current field.

Returns
field type

Definition at line 192 of file field_iterator.cpp.

References fawkes::interface_fieldinfo_t::type.

Referenced by fawkes::gpp::ValueToFieldVisitor::operator()().

◆ get_typename()

◆ get_uint16()

uint16_t fawkes::InterfaceFieldIterator::get_uint16 ( unsigned int  index = 0) const

Get value of current field as unsigned integer.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 493 of file field_iterator.cpp.

References fawkes::IFT_UINT16, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_uint16s()

uint16_t * fawkes::InterfaceFieldIterator::get_uint16s ( ) const

Get value of current field as unsigned integer array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int or field is not an array (length is 1)

Definition at line 783 of file field_iterator.cpp.

References fawkes::IFT_UINT16, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_uint32()

uint32_t fawkes::InterfaceFieldIterator::get_uint32 ( unsigned int  index = 0) const

Get value of current field as unsigned integer.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 535 of file field_iterator.cpp.

References fawkes::IFT_UINT32, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_uint32s()

uint32_t * fawkes::InterfaceFieldIterator::get_uint32s ( ) const

Get value of current field as unsigned integer array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int or field is not an array (length is 1)

Definition at line 819 of file field_iterator.cpp.

References fawkes::IFT_UINT32, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_uint64()

uint64_t fawkes::InterfaceFieldIterator::get_uint64 ( unsigned int  index = 0) const

Get value of current field as unsigned integer.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 577 of file field_iterator.cpp.

References fawkes::IFT_UINT64, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_uint64s()

uint64_t * fawkes::InterfaceFieldIterator::get_uint64s ( ) const

Get value of current field as unsigned integer array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int or field is not an array (length is 1)

Definition at line 855 of file field_iterator.cpp.

References fawkes::IFT_UINT64, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_uint8()

uint8_t fawkes::InterfaceFieldIterator::get_uint8 ( unsigned int  index = 0) const

Get value of current field as unsigned integer.

Returns
field value
Parameters
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 451 of file field_iterator.cpp.

References fawkes::IFT_UINT8, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_uint8s()

uint8_t * fawkes::InterfaceFieldIterator::get_uint8s ( ) const

Get value of current field as unsigned integer array.

Returns
field value
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int or field is not an array (length is 1)

Definition at line 747 of file field_iterator.cpp.

References fawkes::IFT_UINT8, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ get_value()

const void * fawkes::InterfaceFieldIterator::get_value ( ) const

Get value of current field.

Returns
field value

Definition at line 274 of file field_iterator.cpp.

References fawkes::interface_fieldinfo_t::value.

◆ get_value_string()

const char * fawkes::InterfaceFieldIterator::get_value_string ( const char *  array_sep = ", ")

Get value of current field as string.

Parameters
array_sepin the case that the field is an array the given string is used to split the individual elements in the array string representation
Returns
field value as string

Definition at line 302 of file field_iterator.cpp.

References fawkes::Interface::enum_tostring(), fawkes::interface_fieldinfo_t::enumtype, fawkes::IFT_BOOL, fawkes::IFT_BYTE, fawkes::IFT_DOUBLE, fawkes::IFT_ENUM, fawkes::IFT_FLOAT, fawkes::IFT_INT16, fawkes::IFT_INT32, fawkes::IFT_INT64, fawkes::IFT_INT8, fawkes::IFT_STRING, fawkes::IFT_UINT16, fawkes::IFT_UINT32, fawkes::IFT_UINT64, fawkes::IFT_UINT8, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

Referenced by BBLogFile::print_entry().

◆ is_enum()

bool fawkes::InterfaceFieldIterator::is_enum ( ) const

Check if field is an enum.

Returns
true if the value is an enum, false otherwise

Definition at line 234 of file field_iterator.cpp.

References fawkes::IFT_ENUM, and fawkes::interface_fieldinfo_t::type.

◆ operator!=()

bool fawkes::InterfaceFieldIterator::operator!= ( const InterfaceFieldIterator fi) const

Check iterators for inequality.

Parameters
fiiterator to compare to
Returns
true if iteraters point to the different fields, false otherwise

Definition at line 157 of file field_iterator.cpp.

◆ operator*()

const void * fawkes::InterfaceFieldIterator::operator* ( ) const

Get FieldHeader.

Returns
shared memory header

Definition at line 166 of file field_iterator.cpp.

References fawkes::interface_fieldinfo_t::value.

◆ operator+()

InterfaceFieldIterator & fawkes::InterfaceFieldIterator::operator+ ( unsigned int  i)

Advance by i steps.

Parameters
inumber of (matching) segments to advance.
Returns
reference to this after advancing

Definition at line 121 of file field_iterator.cpp.

◆ operator++() [1/2]

InterfaceFieldIterator & fawkes::InterfaceFieldIterator::operator++ ( )

Prefix increment.

Returns
reference to this instance

Definition at line 92 of file field_iterator.cpp.

References fawkes::interface_fieldinfo_t::next.

◆ operator++() [2/2]

InterfaceFieldIterator fawkes::InterfaceFieldIterator::operator++ ( int  inc)

Postfix increment operator.

Parameters
incignored
Returns
instance before advancing to the next shared memory segment

Definition at line 109 of file field_iterator.cpp.

◆ operator+=()

InterfaceFieldIterator & fawkes::InterfaceFieldIterator::operator+= ( unsigned int  i)

Advance by i steps.

Parameters
inumber of (matching) segments to advance.
Returns
reference to this after advancing

Definition at line 134 of file field_iterator.cpp.

◆ operator=()

InterfaceFieldIterator & fawkes::InterfaceFieldIterator::operator= ( const InterfaceFieldIterator fi)

Make this instance point to the same segment as fi.

Parameters
fifield iterator to compare
Returns
reference to this instance

Definition at line 180 of file field_iterator.cpp.

◆ operator==()

bool fawkes::InterfaceFieldIterator::operator== ( const InterfaceFieldIterator fi) const

Check iterators for equality.

Parameters
fiiterator to compare to
Returns
true if iterators point to the the same field, false otherwise

Definition at line 147 of file field_iterator.cpp.

◆ set_bool()

void fawkes::InterfaceFieldIterator::set_bool ( bool  v,
unsigned int  index = 0 
)

Set value of current field as bool.

Parameters
vthe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type bool
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 963 of file field_iterator.cpp.

References fawkes::IFT_BOOL, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

Referenced by fawkes::gpp::ValueToFieldVisitor::operator()().

◆ set_bools()

void fawkes::InterfaceFieldIterator::set_bools ( bool *  v)

Set value of current field as bool array.

Parameters
van array of bools
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type bool or field is not an array (length is 1)

Definition at line 1310 of file field_iterator.cpp.

References fawkes::IFT_BOOL, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_byte()

void fawkes::InterfaceFieldIterator::set_byte ( uint8_t  v,
unsigned int  index = 0 
)

Set value of current field as byte.

Parameters
vthe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type byte
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 1227 of file field_iterator.cpp.

References fawkes::IFT_BYTE, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_bytes()

void fawkes::InterfaceFieldIterator::set_bytes ( uint8_t *  v)

Set value of current field as byte array.

Parameters
van array of bytes
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type byte or field is not an array (length is 1)

Definition at line 1552 of file field_iterator.cpp.

References fawkes::IFT_BYTE, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_double()

void fawkes::InterfaceFieldIterator::set_double ( double  v,
unsigned int  index = 0 
)

Set value of current field as double.

Parameters
vthe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type double
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 1203 of file field_iterator.cpp.

References fawkes::IFT_DOUBLE, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

Referenced by fawkes::gpp::ValueToFieldVisitor::operator()().

◆ set_doubles()

void fawkes::InterfaceFieldIterator::set_doubles ( double *  v)

Set value of current field as double array.

Parameters
van array of doubles
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type double or field is not an array (length is 1)

Definition at line 1530 of file field_iterator.cpp.

References fawkes::IFT_DOUBLE, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_enum()

void fawkes::InterfaceFieldIterator::set_enum ( int32_t  e,
unsigned int  index = 0 
)

Set value of current field as enum (from an integer).

Parameters
ethe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 1251 of file field_iterator.cpp.

References fawkes::interface_fieldinfo_t::enum_map, fawkes::IFT_ENUM, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_enum_string()

void fawkes::InterfaceFieldIterator::set_enum_string ( const char *  e,
unsigned int  index = 0 
)

Set value of current field as enum (from an integer).

Parameters
ethe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 1279 of file field_iterator.cpp.

References fawkes::interface_fieldinfo_t::enum_map, fawkes::IFT_ENUM, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

Referenced by fawkes::gpp::ValueToFieldVisitor::operator()().

◆ set_float()

void fawkes::InterfaceFieldIterator::set_float ( float  v,
unsigned int  index = 0 
)

Set value of current field as float.

Parameters
vthe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type float
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 1179 of file field_iterator.cpp.

References fawkes::IFT_FLOAT, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

Referenced by fawkes::gpp::ValueToFieldVisitor::operator()().

◆ set_floats()

void fawkes::InterfaceFieldIterator::set_floats ( float *  v)

Set value of current field as float array.

Parameters
van array of floats
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type float or field is not an array (length is 1)

Definition at line 1508 of file field_iterator.cpp.

References fawkes::IFT_FLOAT, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_int16()

void fawkes::InterfaceFieldIterator::set_int16 ( int16_t  v,
unsigned int  index = 0 
)

Set value of current field as integer.

Parameters
vthe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 1035 of file field_iterator.cpp.

References fawkes::IFT_INT16, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_int16s()

void fawkes::InterfaceFieldIterator::set_int16s ( int16_t *  v)

Set value of current field as integer array.

Parameters
van array of ints
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int or field is not an array (length is 1)

Definition at line 1376 of file field_iterator.cpp.

References fawkes::IFT_INT16, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_int32()

void fawkes::InterfaceFieldIterator::set_int32 ( int32_t  v,
unsigned int  index = 0 
)

Set value of current field as integer.

Parameters
vthe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 1083 of file field_iterator.cpp.

References fawkes::IFT_INT32, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

Referenced by fawkes::gpp::ValueToFieldVisitor::operator()().

◆ set_int32s()

void fawkes::InterfaceFieldIterator::set_int32s ( int32_t *  v)

Set value of current field as integer array.

Parameters
van array of ints
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int or field is not an array (length is 1)

Definition at line 1420 of file field_iterator.cpp.

References fawkes::IFT_INT32, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_int64()

void fawkes::InterfaceFieldIterator::set_int64 ( int64_t  v,
unsigned int  index = 0 
)

Set value of current field as integer.

Parameters
vthe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 1131 of file field_iterator.cpp.

References fawkes::IFT_INT64, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

Referenced by fawkes::gpp::ValueToFieldVisitor::operator()().

◆ set_int64s()

void fawkes::InterfaceFieldIterator::set_int64s ( int64_t *  v)

Set value of current field as integer array.

Parameters
van array of ints
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int or field is not an array (length is 1)

Definition at line 1464 of file field_iterator.cpp.

References fawkes::IFT_INT64, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_int8()

void fawkes::InterfaceFieldIterator::set_int8 ( int8_t  v,
unsigned int  index = 0 
)

Set value of current field as integer.

Parameters
vthe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 987 of file field_iterator.cpp.

References fawkes::IFT_INT8, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_int8s()

void fawkes::InterfaceFieldIterator::set_int8s ( int8_t *  v)

Set value of current field as integer array.

Parameters
van array of ints
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type int or field is not an array (length is 1)

Definition at line 1332 of file field_iterator.cpp.

References fawkes::IFT_INT8, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_string()

void fawkes::InterfaceFieldIterator::set_string ( const char *  v)

Set value of current field as string.

Parameters
va string
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type string

Definition at line 1573 of file field_iterator.cpp.

References fawkes::IFT_STRING, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

Referenced by fawkes::gpp::ValueToFieldVisitor::operator()().

◆ set_uint16()

void fawkes::InterfaceFieldIterator::set_uint16 ( uint16_t  v,
unsigned int  index = 0 
)

Set value of current field as unsigned integer.

Parameters
vthe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 1059 of file field_iterator.cpp.

References fawkes::IFT_UINT16, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

Referenced by fawkes::gpp::ValueToFieldVisitor::operator()().

◆ set_uint16s()

void fawkes::InterfaceFieldIterator::set_uint16s ( uint16_t *  v)

Set value of current field as unsigned integer array.

Parameters
van array of unsigned ints
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int or field is not an array (length is 1)

Definition at line 1398 of file field_iterator.cpp.

References fawkes::IFT_UINT16, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_uint32()

void fawkes::InterfaceFieldIterator::set_uint32 ( uint32_t  v,
unsigned int  index = 0 
)

Set value of current field as unsigned integer.

Parameters
vthe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 1107 of file field_iterator.cpp.

References fawkes::IFT_UINT32, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

Referenced by fawkes::gpp::ValueToFieldVisitor::operator()().

◆ set_uint32s()

void fawkes::InterfaceFieldIterator::set_uint32s ( uint32_t *  v)

Set value of current field as unsigned integer array.

Parameters
van array of unsigned ints
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int or field is not an array (length is 1)

Definition at line 1442 of file field_iterator.cpp.

References fawkes::IFT_UINT32, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_uint64()

void fawkes::InterfaceFieldIterator::set_uint64 ( uint64_t  v,
unsigned int  index = 0 
)

Set value of current field as unsigned integer.

Parameters
vthe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 1155 of file field_iterator.cpp.

References fawkes::IFT_UINT64, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

Referenced by fawkes::gpp::ValueToFieldVisitor::operator()().

◆ set_uint64s()

void fawkes::InterfaceFieldIterator::set_uint64s ( uint64_t *  v)

Set value of current field as unsigned integer array.

Parameters
van array of unsigned ints
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int or field is not an array (length is 1)

Definition at line 1486 of file field_iterator.cpp.

References fawkes::IFT_UINT64, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_uint8()

void fawkes::InterfaceFieldIterator::set_uint8 ( uint8_t  v,
unsigned int  index = 0 
)

Set value of current field as unsigned integer.

Parameters
vthe new value
indexarray index (only use if field is an array)
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int
OutOfBoundsExceptionthrown if index is out of bounds

Definition at line 1011 of file field_iterator.cpp.

References fawkes::IFT_UINT8, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.

◆ set_uint8s()

void fawkes::InterfaceFieldIterator::set_uint8s ( uint8_t *  v)

Set value of current field as unsigned integer array.

Parameters
van array of unsigned ints
Exceptions
NullPointerExceptioninvalid iterator, possibly end iterator
TypeMismatchExceptionthrown if field is not of type unsigned int or field is not an array (length is 1)

Definition at line 1354 of file field_iterator.cpp.

References fawkes::IFT_UINT8, fawkes::interface_fieldinfo_t::length, fawkes::Interface::mark_data_changed(), fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::type, and fawkes::interface_fieldinfo_t::value.


The documentation for this class was generated from the following files: