#include <typelib/typemodel.hh>
Public Member Functions | |
Field (const std::string &name, Type const &base_type) | |
std::string | getName () const |
const Type & | getType () const |
size_t | getOffset () const |
bool | operator== (Field const &field) const |
Protected Member Functions | |
void | setOffset (size_t offset) |
Friends | |
class | Compound |
void Typelib::Field::setOffset | ( | size_t | offset | ) | [protected] |
std::string Typelib::Field::getName | ( | ) | const |
The field name
Type const & Typelib::Field::getType | ( | ) | const |
The field type
Referenced by Typelib::Compound::addField(), Typelib::ValueVisitor::TypeDispatch::visit_(), and Typelib::TypeVisitor::visit_().
size_t Typelib::Field::getOffset | ( | ) | const |
The offset, in bytes, of this field w.r.t. the begginning of the parent value
Referenced by Typelib::ValueVisitor::TypeDispatch::visit_(), and Typelib::TypeDisplayVisitor::visit_().
bool Typelib::Field::operator== | ( | Field const & | field | ) | const |
References Typelib::Type::isSame(), m_name, m_offset, and m_type.
friend class Compound [friend] |