18 #ifndef BERRYOBJECTGENERIC_H_
19 #define BERRYOBJECTGENERIC_H_
55 if(
const Self* other = dynamic_cast<const Self*>(o))
56 return (this->m_Value == other->m_Value);
63 std::stringstream myStr;
64 std::locale originalLocale = myStr.getloc();
68 myStr.imbue(originalLocale);
74 return other.
Cast<
const Self>() != 0;
81 if (specOther && this->m_Value != specOther->m_Value)
83 this->m_Value = specOther->m_Value;
102 #define berrySpecializeGenericObject(ObjectName,Type,DefaultValue) \
103 class org_blueberry_core_runtime_EXPORT ObjectName: public ::berry::ObjectGeneric< Type > \
106 berryObjectMacro(ObjectName); \
107 ObjectName() : ::berry::ObjectGeneric< Type >(DefaultValue) { } \
108 ObjectName(Type x) : ::berry::ObjectGeneric<Type>(x) {} \
109 QString ToString() const { QString txt; QTextStream ts(&txt); ts << m_Value; return txt; } \
virtual void Assign(Object::ConstPointer other)
Light weight base class for most BlueBerry classes.
bool operator==(const Object *o) const override
virtual bool Assignable(Object::ConstPointer other) const
virtual std::string GetValueAsString() const
#define org_blueberry_core_runtime_EXPORT
#define berryObjectMacro(...)
ValueType
Type of the value held by a Value object.
SmartPointer< Other > Cast() const