Public Types | Public Member Functions
Typelib::Compound Class Reference

#include <typemodel.hh>

Inheritance diagram for Typelib::Compound:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::list< FieldFieldList

Public Member Functions

 Compound (std::string const &name)
FieldList const & getFields () const

field, or the Field object

Get a field by its name

Returns:
0 if there is no
FieldList m_fields
Field const * getField (const std::string &name) const
void addField (const Field &field, size_t offset)
void addField (const std::string &name, const Type &type, size_t offset)
unsigned int getTrailingPadding () const
virtual std::set< Type const * > dependsOn () const
virtual bool do_compare (Type const &other, bool equality, RecursionStack &stack) const
virtual Typedo_merge (Registry &registry, RecursionStack &stack) const
bool do_resize (Registry &registry, std::map< std::string, std::pair< size_t, size_t > > &new_sizes)

Detailed Description

Base class for types that are composed of other types (structures and enums)

Definition at line 314 of file typemodel.hh.


Member Typedef Documentation

typedef std::list<Field> Typelib::Compound::FieldList

Definition at line 317 of file typemodel.hh.


Constructor & Destructor Documentation

Compound::Compound ( std::string const &  name)

Definition at line 209 of file typemodel.cc.


Member Function Documentation

void Compound::addField ( const Field field,
size_t  offset 
)

Add a new field

Definition at line 271 of file typemodel.cc.

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.

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.

bool Compound::do_compare ( Type const &  other,
bool  equality,
RecursionStack stack 
) const [private, virtual]

Definition at line 239 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 280 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 305 of file typemodel.cc.

Field const * Compound::getField ( const std::string &  name) const

Definition at line 213 of file typemodel.cc.

The list of all fields

Definition at line 212 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 222 of file typemodel.cc.


Member Data Documentation

Definition at line 342 of file typemodel.hh.


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


typelib
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Mon Oct 6 2014 03:17:12