12 template<
typename TypeDispatcher>
16 throw std::runtime_error(
"NULL type");
17 TypeDispatcher& v =
const_cast<TypeDispatcher&
>(vv);
24 v.visitUnknown(value);
43 v.visitString(content.first.first, content.first.second);
45 content.second(content.first);
50 v.visitList(value.
begin(), value.
end());
55 v.visitMap(value.
begin(), value.
end());
71 qiLogDebug(
"qitype.typedispatcher") <<
"Detected object shared ptr";
78 v.visitPointer(pointee);
90 if (value.
type()->
info() == typeOf<AnyObject>()->info())
96 v.visitDynamic(value.
content());
106 v.visitIterator(value);
110 v.visitVarArgs(value.
begin(), value.
end());
115 qiLogError(
"qitype.typedispatcher") <<
"Signal and Property not handled";
virtual std::string className()
Get the type name of the struct.
std::pair< RawString, Deleter > ManagedRawString
virtual unsigned int size()=0
Return the size in bytes.
boost::function< RF > bind(const AF &fun,...)
virtual bool isSigned()=0
Return true if the integer is signed.
TypeDispatcher & typeDispatch(const TypeDispatcher &vv, AnyReference value)
AnyReferenceVector values(void *storage)
Get all the fields of the structure.
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.
static void deleteCustomDeleter(GenericObject *obj, boost::function< void(Empty *)> deleter)