8 #include <mxcomp/reflection.h>
28 virtual bool isConvertible(Type t)
const;
30 virtual Type getType()
const {
return Object; }
31 virtual void asString(std::string& str)
const {
throw UnsupportedCast(
""); };
32 virtual double asDouble()
const {
return asInt(); }
33 virtual bool asBool()
const {
return asInt() > 0; }
34 virtual int asInt()
const {
return asDouble(); };
36 virtual size_t size()
const;
37 virtual bool hasValue(
const std::string& name) {
return false; };
51 std::ostream& operator<<(std::ostream& stream,
const ViewModel& variant);
56 #include "viewModel.tcc"