7 #ifndef _QI_TYPE_DETAIL_ANYREFERENCE_HPP_
8 #define _QI_TYPE_DETAIL_ANYREFERENCE_HPP_
19 #include <boost/type_traits/remove_const.hpp>
72 std::pair<AnyReference, bool> convert(
TypeInterface* targetType)
const;
89 T* ptr(
bool check =
true);
108 template <
typename T>
111 template <
typename T>
132 T to(
const T&)
const;
136 float toFloat()
const;
137 double toDouble()
const;
138 std::string toString()
const;
141 std::vector<T> toList()
const;
143 template<
typename K,
typename V>
144 std::map<K, V> toMap()
const;
155 AnyValue toTuple(
bool homogeneous)
const;
192 std::string&
asString() {
return as<std::string>();}
195 std::pair<char*, size_t> asRaw()
const;
212 std::map<AnyReference, AnyReference> asMapValuePtr();
221 void set(
const T& val);
227 void set(
float v) { setFloat(v); }
228 void set(
double v) { setDouble(v); }
229 void set(
const std::string& v) { setString(v); }
233 void setFloat(
float v);
234 void setDouble(
double v);
235 void setString(
const std::string& v);
240 void setRaw(
const char *buffer,
size_t size);
265 template<
typename E,
typename K>
266 E& element(
const K& key);
285 void append(
const T& element);
288 template<
typename K,
typename V>
289 void insert(
const K& key,
const V& val);
312 std::vector<TypeInterface*> membersType()
const;
329 : AnyReferenceBase(rhs)
333 : AnyReferenceBase(type)
337 : AnyReferenceBase(type, value)
346 throw std::runtime_error(
"invalid internal operation.");
360 const std::vector<TypeInterface*>& types,
361 const std::vector<void*>& values);
AnyReference(TypeInterface *type)
void destroy()
Stop and flush the logging system.
AutoAnyReference(const AutoAnyReference &b)
void set(const std::string &v)
dll import/export and compiler message
AutoAnyReference(const T &ptr)
AutoAnyReference(const AnyReference &self)
AnyReference makeGenericTuplePtr(const std::vector< TypeInterface * > &types, const std::vector< void * > &values)
AnyReference makeGenericTuple(const AnyReferenceVector &values)
AutoAnyReference(const detail::AnyReferenceBase &self)
std::vector< AnyReference > AnyReferenceVector
bool operator==(const Signature &lhs, const Signature &rhs)
TypeInterface * type() const
AnyReferenceBase(TypeInterface *type, void *value)
QI_NO_TYPE(qi::AnyReference)
AnyReference(const AnyReferenceBase &rhs)
static AnyReference from(const T &ref)
bool operator<(const AnyReference &a, const AnyReference &b)
AnyReference(TypeInterface *type, void *value)
bool operator!=(const Signature &lhs, const Signature &rhs)