diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-07 02:31:51 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-07 02:31:51 +0100 |
commit | f6531b10353dacdcbab211a31926c165211cf3b3 (patch) | |
tree | b0c6508bb58b5a34e4b4f8007af5af44fd38aca1 /src/core/common/Property.hpp | |
parent | 6b3b2f5965e5dfb2000bb9c23f11a83e175741de (diff) |
Unified handling of references to Rtti instances: Now using pointers everywhere
Diffstat (limited to 'src/core/common/Property.hpp')
-rw-r--r-- | src/core/common/Property.hpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/common/Property.hpp b/src/core/common/Property.hpp index 10db869..546061c 100644 --- a/src/core/common/Property.hpp +++ b/src/core/common/Property.hpp @@ -67,21 +67,21 @@ struct PropertyType { * Outer type, may be any Rtti instance. If set to RttiTypes::None, any * outer type is acceptable. */ - const Rtti &type; + const Rtti *type; /** * Describes the inner type of the property used when the outer type is a * container type such as RttiTypes::Array or RttiTypes::Map. If set to * RttiTypes::None any inner type is acceptable. */ - const Rtti &innerType; + const Rtti *innerType; /** * Creates a new instance of the PropertyType class with both inner and * outer type being set to RttiTypes::None and thus allowing any type to be * represented by this property. */ - PropertyType() : type(RttiTypes::None), innerType(RttiTypes::None){}; + PropertyType() : type(&RttiTypes::None), innerType(&RttiTypes::None){}; /** * Creates a new instance of the PropertyType class with the given outer @@ -91,8 +91,8 @@ struct PropertyType { * be any Rtti instances or RttiTypes::None, in which case all types are * allowed. */ - PropertyType(const Rtti &type) - : type(type), innerType(RttiTypes::None){}; + PropertyType(const Rtti *type) + : type(type), innerType(&RttiTypes::None){}; /** * Creates a new instance of the PropertyType class with the given outer and @@ -105,7 +105,7 @@ struct PropertyType { * relevant if the outer type is set to a basic container type, namely * RttiTypes::Array or RttiTypes::Map. */ - PropertyType(const Rtti &type, const Rtti &innerType) + PropertyType(const Rtti *type, const Rtti *innerType) : type(type), innerType(innerType){}; }; @@ -396,7 +396,7 @@ public: * * @return the PropertyType instance describing the type of this property. */ - const PropertyType &getType() const { return *type; } + const PropertyType *getType() const { return type.get(); } /** * Returns the value of the property for the given object. @@ -454,7 +454,7 @@ public: * @param setter is a Setter for writing the described property for objects * of type T. */ - Property(const Rtti &type, const Getter<T> &getter, + Property(const Rtti *type, const Getter<T> &getter, const Setter<T> &setter = Setter<T>{}) : PropertyDescriptor( PropertyType{type}, @@ -477,7 +477,7 @@ public: * @param setter is a Setter for writing the described property for objects * of type T. */ - Property(const Rtti &type, const Rtti &innerType, + Property(const Rtti *type, const Rtti *innerType, const Getter<T> &getter, const Setter<T> &setter = Setter<T>{}) : PropertyDescriptor( PropertyType{type, innerType}, |