#include <typemodel.hh>

Public Types | |
| typedef std::list< Field > | FieldList |
Public Member Functions | |
| Compound (std::string const &name) | |
| FieldList const & | getFields () const |
field, or the Field object | |
| |
| FieldList | m_fields |
| Field const * | getField (const std::string &name) const |
| Field const & | addField (const Field &field, size_t offset) |
| Field const & | addField (const std::string &name, const Type &type, size_t offset) |
| unsigned int | getTrailingPadding () const |
| virtual std::set< Type const * > | dependsOn () const |
| void | mergeMetaData (Type const &other) const |
| virtual bool | do_compare (Type const &other, bool equality, RecursionStack &stack) const |
| virtual Type * | do_merge (Registry ®istry, RecursionStack &stack) const |
| bool | do_resize (Registry ®istry, std::map< std::string, std::pair< size_t, size_t > > &new_sizes) |
Base class for types that are composed of other types (structures and enums)
Definition at line 393 of file typemodel.hh.
| typedef std::list<Field> Typelib::Compound::FieldList |
Definition at line 396 of file typemodel.hh.
| Compound::Compound | ( | std::string const & | name | ) |
Definition at line 295 of file typemodel.cc.
| Field const & Compound::addField | ( | const Field & | field, |
| size_t | offset | ||
| ) |
Add a new field
Definition at line 356 of file typemodel.cc.
| Field const & Compound::addField | ( | const std::string & | name, |
| const Type & | type, | ||
| size_t | offset | ||
| ) |
Add a new field
Definition at line 354 of file typemodel.cc.
| std::set< Type const * > Compound::dependsOn | ( | ) | const [virtual] |
The set of types this type depends upon
This method returns the set of types that are directly depended-upon by this type
Implements Typelib::Type.
Definition at line 383 of file typemodel.cc.
| bool Compound::do_compare | ( | Type const & | other, |
| bool | equality, | ||
| RecursionStack & | stack | ||
| ) | const [private, virtual] |
Definition at line 325 of file typemodel.cc.
| Type * Compound::do_merge | ( | Registry & | registry, |
| RecursionStack & | stack | ||
| ) | const [private, virtual] |
Called by Type::merge when the type does not exist in registry already. This method has to create a new type in registry that matches the type definition of *this.
All types referenced by *this must be moved to their equivalent in registry.
Implements Typelib::Type.
Definition at line 366 of file typemodel.cc.
| bool Compound::do_resize | ( | Registry & | into, |
| std::map< std::string, std::pair< size_t, size_t > > & | new_sizes | ||
| ) | [private, virtual] |
Implementation of the actual resizing. Called by resize()
Reimplemented from Typelib::Type.
Definition at line 391 of file typemodel.cc.
| Field const * Compound::getField | ( | const std::string & | name | ) | const |
Definition at line 299 of file typemodel.cc.
| Compound::FieldList const & Compound::getFields | ( | ) | const |
The list of all fields
Definition at line 298 of file typemodel.cc.
| unsigned int Compound::getTrailingPadding | ( | ) | const [virtual] |
Returns the number of bytes that are unused at the end of the compound
Reimplemented from Typelib::Type.
Definition at line 308 of file typemodel.cc.
| void Compound::mergeMetaData | ( | Type const & | other | ) | const [virtual] |
Merge metadata from this other type, as well as the field metadata if applicable
Reimplemented from Typelib::Type.
Definition at line 413 of file typemodel.cc.
FieldList Typelib::Compound::m_fields [private] |
Definition at line 426 of file typemodel.hh.