Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes
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 430 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 252 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 259 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 256 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 289 of file typemodel.cc.

Definition at line 255 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 265 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 276 of file typemodel.cc.


Member Data Documentation

Definition at line 459 of file typemodel.hh.

Definition at line 433 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:23