12 template<
typename TypeDispatcher>
16 throw std::runtime_error(
"NULL type");
23 v.visitUnknown(value);
42 v.visitString(content.first.first, content.first.second);
44 content.second(content.first);
49 v.visitList(value.
begin(), value.
end());
54 v.visitMap(value.
begin(), value.
end());
70 qiLogDebug(
"qitype.typedispatcher") <<
"Detected object shared ptr";
77 v.visitPointer(pointee);
89 if (value.
type()->
info() == typeOf<AnyObject>()->info())
95 v.visitDynamic(value.
content());
105 v.visitIterator(value);
109 v.visitVarArgs(value.
begin(), value.
end());
112 v.visitOptional(value);
118 qiLogError(
"qitype.typedispatcher") <<
"Signal and Property not handled";
virtual std::string className()
Get the type name of the struct.
virtual unsigned int size()=0
Return the size in bytes.
virtual bool isSigned()=0
Return true if the integer is signed.
TypeDispatcher & typeDispatch(TypeDispatcher &v, AnyReference value)
AnyReferenceVector values(void *storage)
Get all the fields of the structure.
std::pair< RawString, Deleter > ManagedRawString
void destroy()
Deletes storage.
#define qiLogError(...)
Log in error mode.
virtual unsigned int size()=0
Return the size in bytes.
AnyIterator begin() const
Return an iterator on the beginning of the container.
std::vector< AnyReference > AnyReferenceVector
TypeInterface * type() const
virtual ManagedRawString get(void *storage)=0
virtual const TypeInfo & info()=0
Get the TypeInfo corresponding to this type.
virtual std::vector< std::string > elementsName()
Get the names of the fields of the struct.
AnyReference content() const
AnyIterator end() const
Return an iterator on the end of the container.
AnyReference clone() const
virtual PointerKind pointerKind()=0
Return whether the pointer has raw or shared semantics.
std::enable_if< std::is_function< RF >::value, boost::function< RF > >::type bind(AF &&fun, Arg0 &&arg0, Args &&...args)
static void deleteCustomDeleter(GenericObject *obj, boost::function< void(Empty *)> deleter)