From 702a31b06ec0b19c1bd41fbc1d3c88efd3e05a69 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 25 Feb 2008 22:06:14 +0100 Subject: [PATCH] add a few public methods for the Config code --- src/core/object.cc | 6 ++++++ src/core/object.h | 25 ++++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/core/object.cc b/src/core/object.cc index d164ca675..874ada6d3 100644 --- a/src/core/object.cc +++ b/src/core/object.cc @@ -1165,6 +1165,12 @@ Object::TraceSourceDisconnect (std::string name, const CallbackBase &cb) return ok; } +TypeId +Object::GetRealTypeId (void) const +{ + return m_tid; +} + Ptr Object::DoGetObject (TypeId tid) const diff --git a/src/core/object.h b/src/core/object.h index 795fd2197..f3ae57d96 100644 --- a/src/core/object.h +++ b/src/core/object.h @@ -240,6 +240,18 @@ public: std::string help, Ptr accessor); + struct AttributeInfo { + Ptr accessor; + Attribute initialValue; + uint32_t flags; + Ptr checker; + }; + /** + * \param name the name of the requested attribute + */ + bool LookupAttributeByName (std::string name, struct AttributeInfo *info) const; + + // construct an invalid TypeId. TypeId (); ~TypeId (); @@ -249,20 +261,9 @@ private: friend bool operator == (TypeId a, TypeId b); friend bool operator != (TypeId a, TypeId b); - struct AttributeInfo { - Ptr accessor; - Attribute initialValue; - uint32_t flags; - Ptr checker; - }; Ptr LookupTraceSourceByName (std::string name) const; - /** - * \param name the name of the requested attribute - * \returns the Accessor associated to the requested attribute - */ - bool LookupAttributeByName (std::string name, struct AttributeInfo *info) const; /** * \param i the position of the requested attribute * \returns the Accessor associated to the requested attribute @@ -387,6 +388,8 @@ public: bool TraceSourceConnect (std::string name, const CallbackBase &cb); bool TraceSourceDisconnect (std::string name, const CallbackBase &cb); + TypeId GetRealTypeId (void) const; + /** * Increment the reference count. This method should not be called * by user code. Object instances are expected to be used in conjunction