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

libqi-api 2.8.7.4

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

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
qi::Signature Class Reference

`#include <signature.hpp>`

## Public Types
enum | Type { Type_None = '_', Type_Bool = 'b', Type_Int8 = 'c', Type_UInt8 = 'C', Type_Void = 'v', Type_Int16 = 'w', Type_UInt16 = 'W', Type_Int32 = 'i', Type_UInt32 = 'I', Type_Int64 = 'l', Type_UInt64 = 'L', Type_Float = 'f', Type_Double = 'd', Type_String = 's', Type_List = '[', Type_List_End = ']', Type_Map = '{', Type_Map_End = '}', Type_Tuple = '(', Type_Tuple_End = ')', Type_Dynamic = 'm', Type_Raw = 'r', Type_Pointer = '*', Type_Object = 'o', Type_VarArgs = '#', Type_KwArgs = '~', Type_Optional = '+', Type_Unknown = 'X' }

## Public Member Functions
| Signature ()
| Signature (const char *signature)
| Signature (const std::string &signature)
bool | isValid () const
bool | hasChildren () const
const SignatureVector & | children () const
Type | type () const
std::string | annotation () const
AnyValue | toData () const
std::string | toPrettySignature () const
const std::string & | toString () const
float | isConvertibleTo (const Signature &b) const

## Static Public Member Functions
static Signature | fromType (Type t)

## Protected Member Functions
| Signature (const std::string &signature, size_t begin, size_t end)

## Protected Attributes
boost::shared_ptr < SignaturePrivate > | _p

## Friends
class | SignaturePrivate
bool | operator== (const Signature &lhs, const Signature &rhs)

## Detailed Description

Definition at line 66 of file signature.hpp.

## Member Enumeration Documentation

enum qi::Signature::Type

Enumerator
Type_None |
Type_Bool |
Type_Int8 |
Type_UInt8 |
Type_Void |
Type_Int16 |
Type_UInt16 |
Type_Int32 |
Type_UInt32 |
Type_Int64 |
Type_UInt64 |
Type_Float |
Type_Double |
Type_String |
Type_List |
Type_List_End |
Type_Map |
Type_Map_End |
Type_Tuple |
Type_Tuple_End |
Type_Dynamic |
Type_Raw |
Type_Pointer |
Type_Object |
Type_VarArgs |
Type_KwArgs |
Type_Optional |
Type_Unknown |

Definition at line 83 of file signature.hpp.

## Constructor & Destructor Documentation

qi::Signature::Signature | ( | const std::string & | signature,
|  | size_t | begin,
|  | size_t | end
| ) |  |
| protected

qi::Signature::Signature | ( |  | ) |

qi::Signature::Signature | ( | const char * | signature | ) |

qi::Signature::Signature | ( | const std::string & | signature | ) |

## Member Function Documentation

std::string qi::Signature::annotation | ( |  | ) | const

const SignatureVector& qi::Signature::children | ( |  | ) | const

static Signature qi::Signature::fromType | ( | Type | t | ) |
| static

bool qi::Signature::hasChildren | ( |  | ) | const

float qi::Signature::isConvertibleTo | ( | const Signature & | b | ) | const

Tell if arguments with this signature can be converted to `b`.

Returns
  0 if conversion is impossible, or a score in ]0,1] indicating the amount of type mismatch (the closer signatures are the bigger)

bool qi::Signature::isValid | ( |  | ) | const

AnyValue qi::Signature::toData | ( |  | ) | const

Encode the signature in a plain struct, suitable for further serialization. [typeString, childrenList, annotationString ]

std::string qi::Signature::toPrettySignature | ( |  | ) | const

const std::string& qi::Signature::toString | ( |  | ) | const

Type qi::Signature::type | ( |  | ) | const

## Friends And Related Function Documentation

bool operator== | ( | const Signature & | lhs,
|  | const Signature & | rhs
| ) |  |
| friend

friend class SignaturePrivate
| friend

Definition at line 69 of file signature.hpp.

## Member Data Documentation

boost::shared_ptr<SignaturePrivate> qi::Signature::_p
| protected

Definition at line 151 of file signature.hpp.

The documentation for this class was generated from the following file:

- /home/opennao/work/release-2.8/sdk/libqi/qi/signature.hpp