diff options
Diffstat (limited to 'src/core/managed')
-rw-r--r-- | src/core/managed/Managed.cpp | 8 | ||||
-rw-r--r-- | src/core/managed/Managed.hpp | 6 | ||||
-rw-r--r-- | src/core/managed/Manager.cpp | 14 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/core/managed/Managed.cpp b/src/core/managed/Managed.cpp index b282427..64e287d 100644 --- a/src/core/managed/Managed.cpp +++ b/src/core/managed/Managed.cpp @@ -76,12 +76,12 @@ bool Managed::unregisterEvent(EventType type, EventHandler handler, bool Managed::triggerEvent(Event &ev) { return mgr.triggerEvent(this, ev); } -const Rtti &Managed::type() const { return typeOf(*this); } +const Rtti *Managed::type() const { return typeOf(*this); } -bool Managed::isa(const Rtti &t) const { return type().isa(t); } +bool Managed::isa(const Rtti *t) const { return type()->isa(t); } -bool Managed::composedOf(const Rtti &t) const +bool Managed::composedOf(const Rtti *t) const { - return type().composedOf(t); + return type()->composedOf(t); } } diff --git a/src/core/managed/Managed.hpp b/src/core/managed/Managed.hpp index 7c43527..4784e46 100644 --- a/src/core/managed/Managed.hpp +++ b/src/core/managed/Managed.hpp @@ -245,7 +245,7 @@ public: * @return a reference to the registered Rtti for this particular * Managed class. */ - const Rtti &type() const; + const Rtti *type() const; /** * Returns true if this Managed instance is of the type described by the @@ -255,7 +255,7 @@ public: * class is of the given type or one of the registered parent types is of * the given type. */ - bool isa(const Rtti &t) const; + bool isa(const Rtti *t) const; /** * Returns true if this Managed instance may contain instances of the type @@ -264,7 +264,7 @@ public: * @param true if the Rtti registered for this particular Managed class * may contain instance of the given type. */ - bool composedOf(const Rtti &t) const; + bool composedOf(const Rtti *t) const; }; /** diff --git a/src/core/managed/Manager.cpp b/src/core/managed/Manager.cpp index 2e0b882..ee4da5f 100644 --- a/src/core/managed/Manager.cpp +++ b/src/core/managed/Manager.cpp @@ -199,7 +199,7 @@ void Manager::deleteRef(Managed *tar, Managed *src, bool all) std::cerr << "\x1b[41;30mManager:\x1b[0m A managed object contains a rooted reference, " "this may cause memory leaks!" << std::endl; std::cerr << "\x1b[41;30mManager:\x1b[0m Referenced object is " << tar << " of type " - << tar->type().name << std::endl; + << tar->type()->name << std::endl; } #endif @@ -595,13 +595,13 @@ void Manager::exportGraphviz(const char *filename) : std::vector<EventHandlerDescriptor>{}; // Read type information and Node name (if available) - const Rtti &type = objectPtr->type(); - const std::string &typeName = type.name; + const Rtti *type = objectPtr->type(); + const std::string &typeName = type->name; // Fetch the name of the object if the object has a "name" property std::string name; - if (type.hasProperty("name")) { - name = type.getProperty("name")->get(objectPtr).toString(); + if (type->hasProperty("name")) { + name = type->getProperty("name")->get(objectPtr).toString(); } // Print the node @@ -662,7 +662,7 @@ void Manager::exportGraphviz(const char *filename) while (edgeCount > 0) { // Get the type of the target element uintptr_t pTar = reinterpret_cast<uintptr_t>(e.first); - const Rtti &typeTar = e.first->type(); + const Rtti *typeTar = e.first->type(); // Get some information about the edge std::string port = ""; @@ -679,7 +679,7 @@ void Manager::exportGraphviz(const char *filename) } } } - if (et == EdgeType::NORMAL && type.composedOf(typeTar)) { + if (et == EdgeType::NORMAL && type->composedOf(typeTar)) { et = EdgeType::AGGREGATE; } |