$search

Typelib::Indirect Class Reference

#include <typemodel.hh>

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

List of all members.

Public Member Functions

virtual std::set< Type const * > dependsOn () const
Type const & getIndirection () const
 Indirect (std::string const &name, size_t size, Category category, Type const &on)
virtual Type const & merge (Registry &registry, RecursionStack &stack) const
void modifiedDependencyAliases (Registry &registry) const

Static Public Attributes

static const int ValidIDs = Type::Pointer | Type::Array

Protected Member Functions

virtual bool do_compare (Type const &other, bool equality, RecursionStack &stack) const
virtual bool do_resize (Registry &registry, std::map< std::string, std::pair< size_t, size_t > > &new_sizes)
virtual std::string getIndirectTypeName (std::string const &inside_name) const =0

Private Attributes

Type const & m_indirection

Detailed Description

Base class for types with indirection (pointer, array)

Definition at line 346 of file typemodel.hh.


Constructor & Destructor Documentation

Typelib::Indirect::Indirect ( std::string const &  name,
size_t  size,
Category  category,
Type const &  on 
)

Definition at line 166 of file typemodel.cc.


Member Function Documentation

std::set< Type const * > Typelib::Indirect::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 173 of file typemodel.cc.

bool Typelib::Indirect::do_compare ( Type const &  other,
bool  equality,
RecursionStack stack 
) const [protected, virtual]

Reimplemented in Typelib::Array, and Typelib::Container.

Definition at line 170 of file typemodel.cc.

bool Typelib::Indirect::do_resize ( Registry into,
std::map< std::string, std::pair< size_t, size_t > > &  new_sizes 
) [protected, virtual]

Implementation of the actual resizing. Called by resize()

Reimplemented from Typelib::Type.

Reimplemented in Typelib::Array.

Definition at line 203 of file typemodel.cc.

Type const & Typelib::Indirect::getIndirection (  )  const

Definition at line 169 of file typemodel.cc.

virtual std::string Typelib::Indirect::getIndirectTypeName ( std::string const &  inside_name  )  const [protected, pure virtual]

Overloaded in subclasses to return the name of this type based on the name of the indirection

This is solely used by modifiedDependencyAliases() to update the set of aliases for a given type

Implemented in Vector, String, Typelib::Array, and Typelib::Pointer.

Type const & Typelib::Indirect::merge ( Registry registry,
RecursionStack stack 
) const [virtual]

Base merge method. The default implementation should be fine for most types.

Call try_merge to check if a type equivalent to *this exists in registry, and do_merge to create a copy of *this in registry.

Reimplemented from Typelib::Type.

Definition at line 179 of file typemodel.cc.

void Typelib::Indirect::modifiedDependencyAliases ( Registry registry  )  const [virtual]

Called by the registry if one (or more) of this type's dependencies is aliased

The default implementation does nothing. It is reimplemented in types for which the name is built from the dependencies' name

Reimplemented from Typelib::Type.

Reimplemented in String.

Definition at line 190 of file typemodel.cc.


Member Data Documentation

Definition at line 375 of file typemodel.hh.

const int Typelib::Indirect::ValidIDs = Type::Pointer | Type::Array [static]

Definition at line 349 of file typemodel.hh.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


typelib
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Fri Mar 1 16:29:11 2013