#include <typemodel.hh>
Public Types | |
typedef std::list< Field > | FieldList |
typedef std::list< Field > | FieldList |
Public Member Functions | |
Compound (std::string const &name) | |
Compound (std::string const &name) | |
FieldList const & | getFields () const |
FieldList const & | getFields () const |
field, or the Field object | |
| |
FieldList | m_fields |
void | addField (const std::string &name, const Type &type, size_t offset) |
void | addField (const Field &field, size_t offset) |
void | addField (const std::string &name, const Type &type, size_t offset) |
void | addField (const Field &field, size_t offset) |
virtual std::set< Type const * > | dependsOn () const |
virtual std::set< Type const * > | dependsOn () const |
Field const * | getField (const std::string &name) const |
Field const * | getField (const std::string &name) const |
unsigned int | getTrailingPadding () const |
unsigned int | getTrailingPadding () const |
virtual bool | do_compare (Type const &other, bool equality, RecursionStack &stack) const |
virtual bool | do_compare (Type const &other, bool equality, RecursionStack &stack) const |
virtual Type * | do_merge (Registry ®istry, 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) |
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 319 of file install/include/typelib/typemodel.hh.
typedef std::list<Field> Typelib::Compound::FieldList |
Definition at line 322 of file typelib/typemodel.hh.
typedef std::list<Field> Typelib::Compound::FieldList |
Definition at line 322 of file install/include/typelib/typemodel.hh.
Compound::Compound | ( | std::string const & | name | ) |
Definition at line 209 of file typemodel.cc.
Typelib::Compound::Compound | ( | std::string const & | name | ) |
void Typelib::Compound::addField | ( | const std::string & | name, | |
const Type & | type, | |||
size_t | offset | |||
) |
Add a new field
void Typelib::Compound::addField | ( | const Field & | field, | |
size_t | offset | |||
) |
Add a new field
void Compound::addField | ( | const std::string & | name, | |
const Type & | type, | |||
size_t | offset | |||
) |
Add a new field
Definition at line 269 of file typemodel.cc.
void Compound::addField | ( | const Field & | field, | |
size_t | offset | |||
) |
Add a new field
Definition at line 271 of file typemodel.cc.
virtual std::set<Type const*> Typelib::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.
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 297 of file typemodel.cc.
virtual bool Typelib::Compound::do_compare | ( | Type const & | other, | |
bool | equality, | |||
RecursionStack & | stack | |||
) | const [private, virtual] |
bool Compound::do_compare | ( | Type const & | other, | |
bool | equality, | |||
RecursionStack & | stack | |||
) | const [private, virtual] |
Definition at line 239 of file typemodel.cc.
virtual Type* Typelib::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.
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 280 of file typemodel.cc.
bool Typelib::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.
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 305 of file typemodel.cc.
Field const* Typelib::Compound::getField | ( | const std::string & | name | ) | const |
Field const * Compound::getField | ( | const std::string & | name | ) | const |
Definition at line 213 of file typemodel.cc.
FieldList const& Typelib::Compound::getFields | ( | ) | const |
The list of all fields
Compound::FieldList const & Compound::getFields | ( | ) | const |
The list of all fields
Definition at line 212 of file typemodel.cc.
unsigned int Typelib::Compound::getTrailingPadding | ( | ) | const [virtual] |
Returns the number of bytes that are unused at the end of the compound
Reimplemented from Typelib::Type.
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 222 of file typemodel.cc.
FieldList Compound::m_fields [private] |
Definition at line 347 of file install/include/typelib/typemodel.hh.