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:
NULL if there is no
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 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 393 of file typemodel.hh.


Member Typedef Documentation

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

Definition at line 396 of file typemodel.hh.


Constructor & Destructor Documentation

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

Definition at line 295 of file typemodel.cc.


Member Function Documentation

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.

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.


Member Data Documentation

Definition at line 426 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 Sat Jun 8 2019 18:49:22