- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Macros | Functions
typeinterface.hpp File Reference
`#include <typeinfo>`
`#include <string>`
`#include <boost/preprocessor.hpp>`
`#include <boost/function.hpp>`
`#include <boost/type_traits/is_function.hpp>`
`#include <boost/mpl/if.hpp>`
`#include <qi/log.hpp>`
`#include <qi/api.hpp>`
`#include <qi/type/fwd.hpp>`
`#include <qi/signature.hpp>`
`#include <qi/type/detail/typeinterface.hpp>`
`#include <qi/type/detail/typeimpl.hxx>`
`#include <qi/type/detail/type.hxx>`
`#include <qi/type/detail/inttypeinterface.hxx>`
`#include <qi/type/detail/listtypeinterface.hxx>`
`#include <qi/type/detail/maptypeinterface.hxx>`
`#include <qi/type/detail/stringtypeinterface.hxx>`
`#include <qi/type/detail/pointertypeinterface.hxx>`
`#include <qi/type/detail/structtypeinterface.hxx>`
`#include <qi/type/detail/buffertypeinterface.hxx>`
`#include <qi/type/detail/dynamictypeinterface.hxx>`
`#include <qi/type/detail/optionaltypeinterface.hxx>`

Go to the source code of this file.

## Classes
class | qi::IntTypeInterface
class | qi::FloatTypeInterface
class | qi::StringTypeInterface
class | qi::RawTypeInterface
class | qi::PointerTypeInterface
class | qi::IteratorTypeInterface
class | qi::ListTypeInterface
class | qi::MapTypeInterface
class | qi::StructTypeInterface
class | qi::DynamicTypeInterface
class | qi::VarArgsTypeInterface
class | qi::OptionalTypeInterface
class | qi::TypeImpl< qi::TypeInterface >
class | qi::TypeImpl< qi::TypeInterface * >

## Namespaces
| qi
| Deprecated in 2.5. Use int8_t from <cstdint>.
| qi::detail

## Macros
#define | _QI_TYPE_TYPEINTERFACE_HPP_
#define | QI_TYPE_NOT_CONSTRUCTIBLE(T)
#define | QI_NO_TYPE(T) namespace qi {template<> class TypeImpl<T>: public detail::ForbiddenInTypeSystem {};}
#define | QI_TYPE_INTERFACE(T)
#define | QI_TYPE_CONCRETE(T)
#define | QI_TYPE_REGISTER(t) QI_TYPE_REGISTER_CUSTOM(t, qi::TypeImpl<t>)
#define | QI_TYPE_REGISTER_CUSTOM(type, typeimpl)
#define | QI_TEMPLATE_TYPE_DECLARE(n)
#define | QI_TEMPLATE_TYPE_GET(typeInst, templateName) dynamic_cast< ::qi::TypeOfTemplate<templateName>*>(typeInst)
#define | QI_TYPE_ENUM(Enum)
#define | QI_TYPE_ENUM_REGISTER(Enum)
#define | QI_TYPE_STRUCT_DECLARE(name) __QI_TYPE_STRUCT_DECLARE(name, )

## Functions
TypeInterface * | qi::makeTypeOfKind (const qi::TypeKind &kind)
TypeInterface * | qi::makeFloatType (int bytelen)
TypeInterface * | qi::makeIntType (bool issigned, int bytelen)
TypeInterface * | qi::makeVarArgsType (TypeInterface *elementType)
TypeInterface * | qi::makeListType (TypeInterface *elementType)
TypeInterface * | qi::makeMapType (TypeInterface *keyType, TypeInterface *ElementType)
TypeInterface * | qi::makeTupleType (const std::vector< TypeInterface * > &memberTypes, const std::string &name=std::string(), const std::vector< std::string > &elementNames=std::vector< std::string >())
TypeInterface * | qi::makeOptionalType (TypeInterface *valueType)
struct | qi::detail::QI_API_DEPRECATED_MSG (Use 'QI_TYPE_ENUM'instead) QI_TYPE_ENUM_REGISTER_

## Macro Definition Documentation

#define _QI_TYPE_TYPEINTERFACE_HPP_

Definition at line 8 of file typeinterface.hpp.

#define QI_NO_TYPE | ( |  | T | ) | namespace qi {template<> class TypeImpl<T>: public detail::ForbiddenInTypeSystem {};}

Declare that a type has no metatype and cannot be used in a Value

Warning
  Be careful to put the declaration outside any namespaces.

Definition at line 48 of file typeinterface.hpp.

#define QI_TEMPLATE_TYPE_DECLARE | ( |  | n | ) |

Value:
namespace qi \
{ \
template <typename T> \
class QITYPE_TEMPLATE_API TypeImpl<n<T> > : public TypeOfTemplateImpl<n, T> \
{ \
}; \
}
QITYPE_TEMPLATE_API
#define QITYPE_TEMPLATE_API
Definition: api.hpp:66

Declare a templated-type taking one type argument. Required to be able to use QI_TEMPLATE_TYPE_GET

Definition at line 382 of file typeinterface.hpp.

#define QI_TEMPLATE_TYPE_GET | ( |  | typeInst,
|  |  | templateName
| ) |  | dynamic_cast< ::qi::TypeOfTemplate<templateName>*>(typeInst)

Return a TypeOfTemplate<templateName> pointer if `typeInst` represents an instanciation of template type templateName, 0 otherwise

Definition at line 394 of file typeinterface.hpp.

#define QI_TYPE_CONCRETE | ( |  | T | ) |

Value:
namespace qi { namespace detail { \
template<> struct TypeManager<T>: public TypeManagerDefaultStruct<T> {}; }}

Declare that a type can be constructed and copied

Warning
  Be careful to put the declaration outside any namespaces.

Definition at line 58 of file typeinterface.hpp.

#define QI_TYPE_ENUM | ( |  | Enum | ) |

Value:
namespace qi \
{ \
template <> \
class TypeImpl<Enum> : public IntTypeInterfaceImpl<int> \
{ \
}; \
}

TODO: Find the right size of enum values

Definition at line 400 of file typeinterface.hpp.

#define QI_TYPE_ENUM_REGISTER | ( |  | Enum | ) |

Value:
namespace qi \
{ \
template <> \
class TypeImpl<Enum> : public IntTypeInterfaceImpl<int> \
{ \
static const detail::QI_TYPE_ENUM_REGISTER_ BLAH; \
}; \
}

Definition at line 414 of file typeinterface.hpp.

#define QI_TYPE_INTERFACE | ( |  | T | ) |

Value:
namespace qi { namespace detail { \
template<> struct TypeManager<T>: public TypeManagerDefaultInterface<T> {};}}

Declare that a type has no accessible constructor

Warning
  Be careful to put the declaration outside any namespaces.

Definition at line 52 of file typeinterface.hpp.

#define QI_TYPE_NOT_CONSTRUCTIBLE | ( |  | T | ) |

Value:
namespace qi { namespace detail { \
template<> struct TypeManager<T>: public TypeManagerNotConstructible<T> {};}}

Declare that a type has no accessible default constructor.

Warning
  Be careful to put the declaration outside any namespaces.

Definition at line 42 of file typeinterface.hpp.

#define QI_TYPE_REGISTER | ( |  | t | ) | QI_TYPE_REGISTER_CUSTOM(t, qi::TypeImpl<t>)

Register TypeImpl<t> in runtime type factory for 't'. Must be called from a .cpp file

Warning
  Be careful to put the declaration outside any namespaces.

Definition at line 64 of file typeinterface.hpp.

#define QI_TYPE_REGISTER_CUSTOM | ( |  | type,
|  |  | typeimpl
| ) |  |

Value:
static bool BOOST_PP_CAT(__qi_registration, __LINE__) QI_ATTR_UNUSED \
= qi::registerType(qi::typeId<type>(), new typeimpl)
qi::typeId
TypeIndex typeId()
Definition: typeinterface.hpp:33
qi::registerType
bool registerType(const TypeIndex &typeId, TypeInterface *type)
Runtime Type factory setter.
QI_ATTR_UNUSED
#define QI_ATTR_UNUSED
This macro tags a attribute as unused.
Definition: macro.hpp:262

Register 'typeimpl' in runtime type factory for 'type'.

Warning
  Be careful to put the declaration outside any namespaces.

Definition at line 69 of file typeinterface.hpp.

#define QI_TYPE_STRUCT_DECLARE | ( |  | name | ) | __QI_TYPE_STRUCT_DECLARE(name, )

Definition at line 424 of file typeinterface.hpp.