Aldebaran documentation What's new in NAOqi 2.4.3?

qi::Signature

Reference

qi::Signature Class Reference

Introduction

More...

Enumerations

enum Type
Name Value Brief
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_Unknown X

Public 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

Public Static Functions

Signature fromType(Type t)

Detailed Description

Function Documentation

static Signature qi::Signature::fromType(Type t)
qi::Signature::Signature()
qi::Signature::Signature(const char* signature)
qi::Signature::Signature(const std::string& signature)
bool qi::Signature::isValid() const
bool qi::Signature::hasChildren() const
const SignatureVector& qi::Signature::children() const
Type qi::Signature::type() const
std::string qi::Signature::annotation() 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
float qi::Signature::isConvertibleTo(const Signature& b) const

Brief:

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

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

signatureSplit
makeTupleSignature(const std::vector<qi::AnyReference>& vgv, bool resolveDynamic = false, const std::string &name = std::string(), const std::vector<std::string>& names)
makeTupleSignature(const std::vector<TypeInterface*>& vgv, const std::string &name = std::string(), const std::vector<std::string>& names)
makeTupleSignature(const qi::Signature& element)
makeListSignature
makeVarArgsSignature
makeKwArgsSignature
makeMapSignature