#include <typemodel.hh>
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 ®istry, RecursionStack &stack) const |
void | modifiedDependencyAliases (Registry ®istry) 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 ®istry, 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 |
Base class for types with indirection (pointer, array)
Definition at line 346 of file typemodel.hh.
Typelib::Indirect::Indirect | ( | std::string const & | name, |
size_t | size, | ||
Category | category, | ||
Type const & | on | ||
) |
Definition at line 166 of file typemodel.cc.
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::Container, and Typelib::Array.
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 Typelib::Pointer, Typelib::Array, String, and Vector.
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.
Type const& Typelib::Indirect::m_indirection [private] |
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.