#include <typelib/typevisitor.hh>
Public Member Functions | |
virtual | ~TypeVisitor () |
void | apply (Type const &type) |
Protected Member Functions | |
bool | dispatch (Type const &type) |
virtual bool | visit_ (NullType const &type) |
virtual bool | visit_ (OpaqueType const &type) |
virtual bool | visit_ (Numeric const &type) |
virtual bool | visit_ (Enum const &type) |
virtual bool | visit_ (Pointer const &type) |
virtual bool | visit_ (Array const &type) |
virtual bool | visit_ (Container const &type) |
virtual bool | visit_ (Compound const &type) |
virtual bool | visit_ (Compound const &type, Field const &field) |
The default visit_ methods either do nothing or visits the types recursively (for arrays, pointers and compound types)
virtual Typelib::TypeVisitor::~TypeVisitor | ( | ) | [inline, virtual] |
bool Typelib::TypeVisitor::dispatch | ( | Type const & | type | ) | [protected] |
References Typelib::Type::Array, Typelib::Type::Compound, Typelib::Type::Container, Typelib::Type::Enum, Typelib::Type::getCategory(), Typelib::Type::NullType, Typelib::Type::Numeric, Typelib::Type::Opaque, Typelib::Type::Pointer, and visit_().
Referenced by apply(), visit_(), Typelib::MemLayout::Visitor::visit_(), and Typelib::CompileEndianSwapVisitor::visit_().
bool Typelib::TypeVisitor::visit_ | ( | NullType const & | type | ) | [protected, virtual] |
Reimplemented in Typelib::TypeDisplayVisitor.
Referenced by dispatch(), visit_(), Typelib::TypeDisplayVisitor::visit_(), and Typelib::CompileEndianSwapVisitor::visit_().
bool Typelib::TypeVisitor::visit_ | ( | OpaqueType const & | type | ) | [protected, virtual] |
bool Typelib::TypeVisitor::visit_ | ( | Numeric const & | type | ) | [protected, virtual] |
bool Typelib::TypeVisitor::visit_ | ( | Enum const & | type | ) | [protected, virtual] |
bool Typelib::TypeVisitor::visit_ | ( | Pointer const & | type | ) | [protected, virtual] |
Reimplemented in Typelib::CompileEndianSwapVisitor, Typelib::MemLayout::Visitor, Typelib::TypeDisplayVisitor, and Typelib::ValueVisitor::TypeDispatch.
References dispatch(), and Typelib::Indirect::getIndirection().
bool Typelib::TypeVisitor::visit_ | ( | Array const & | type | ) | [protected, virtual] |
Reimplemented in Typelib::CompileEndianSwapVisitor, Typelib::MemLayout::Visitor, Typelib::TypeDisplayVisitor, and Typelib::ValueVisitor::TypeDispatch.
References dispatch(), and Typelib::Indirect::getIndirection().
bool Typelib::TypeVisitor::visit_ | ( | Container const & | type | ) | [protected, virtual] |
Reimplemented in Typelib::CompileEndianSwapVisitor, Typelib::MemLayout::Visitor, and Typelib::ValueVisitor::TypeDispatch.
References dispatch(), and Typelib::Indirect::getIndirection().
bool Typelib::TypeVisitor::visit_ | ( | Compound const & | type | ) | [protected, virtual] |
Reimplemented in Typelib::CompileEndianSwapVisitor, Typelib::MemLayout::Visitor, Typelib::TypeDisplayVisitor, and Typelib::ValueVisitor::TypeDispatch.
References Typelib::Compound::getFields(), and visit_().
bool Typelib::TypeVisitor::visit_ | ( | Compound const & | type, | |
Field const & | field | |||
) | [protected, virtual] |
Reimplemented in Typelib::TypeDisplayVisitor, and Typelib::ValueVisitor::TypeDispatch.
References dispatch(), and Typelib::Field::getType().
void Typelib::TypeVisitor::apply | ( | Type const & | type | ) |
Reimplemented in Typelib::CompileEndianSwapVisitor, and Typelib::MemLayout::Visitor.
References dispatch().
Referenced by Typelib::ValueVisitor::TypeDispatch::apply(), Typelib::MemLayout::Visitor::apply(), Typelib::CompileEndianSwapVisitor::apply(), Typelib::Registry::dump(), and Typelib::details::operator<<().