#include <typemodel.hh>
Public Member Functions | |
virtual std::set< Type const * > | dependsOn () const |
virtual bool | do_compare (Type const &other, bool equality, std::map< Type const *, Type const * > &stack) const |
virtual Type * | do_merge (Registry ®istry, RecursionStack &stack) const |
OpaqueType (std::string const &name, size_t size) |
This type is to be used when we want a field to be completely ignored, while being able to handle the rest of the system. Endianness swapping will for instance completely ignore this type.
Definition at line 268 of file typemodel.hh.
Typelib::OpaqueType::OpaqueType | ( | std::string const & | name, |
size_t | size | ||
) | [inline] |
Definition at line 271 of file typemodel.hh.
virtual std::set<Type const*> Typelib::OpaqueType::dependsOn | ( | ) | const [inline, 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 272 of file typemodel.hh.
bool Typelib::OpaqueType::do_compare | ( | Type const & | other, |
bool | equality, | ||
std::map< Type const *, Type const * > & | stack | ||
) | const [virtual] |
Method that is implemented by type definitions to compare *this with other
.
If equality
is true, the method must check for strict equality. If it is false, it must check if other
can be used to manipulate values of type *this
.
For instance, let's consider a compound that has padding bytes, and assume that *this and other
have different padding (but are the same on every other aspects). do_compare should then return true if equality is false, and false if equality is true.
It must use rec_compare to check for indirections (i.e. for recursive calls).
The base definition compares the name, size and category of the types.
Reimplemented from Typelib::Type.
Definition at line 240 of file typemodel.cc.
virtual Type* Typelib::OpaqueType::do_merge | ( | Registry & | registry, |
RecursionStack & | stack | ||
) | const [inline, 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 274 of file typemodel.hh.