Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9562


Ignore:
Timestamp:
Mar 24, 2013, 4:16:01 PM (12 years ago)
Author:
landauf
Message:

it's probably better to store the context in a seaprate interface instead of adding a constructor argument to OrxonoxClass

Location:
code/branches/core6/src/libraries/core
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/libraries/core/OrxonoxClass.cc

    r9561 r9562  
    4444        @brief Constructor: Sets the default values.
    4545    */
    46     OrxonoxClass::OrxonoxClass(Context* context) : context_(context)
     46    OrxonoxClass::OrxonoxClass()
    4747    {
    48         //assert(context);
    49         if (!this->context_)
    50             this->context_ = Context::getRootContext();
    51 
    5248        this->identifier_ = 0;
    5349        this->parents_ = 0;
  • code/branches/core6/src/libraries/core/OrxonoxClass.h

    r9561 r9562  
    7070
    7171        public:
    72             OrxonoxClass(Context* context = NULL);
     72            OrxonoxClass();
    7373            virtual ~OrxonoxClass();
    7474
     
    8181            /// Returns the Identifier of the object.
    8282            inline Identifier* getIdentifier() const { return this->identifier_; }
    83 
    84             /// Returns the object's Context.
    85             inline Context* getContext() const { return this->context_; }
    8683
    8784            bool isA(const Identifier* identifier);
     
    170167
    171168            Identifier* identifier_;                                //!< The Identifier of the object
    172             Context* context_;                                      //!< The object's context
    173169            std::set<const Identifier*>* parents_;                  //!< List of all parents of the object
    174170            MetaObjectList* metaList_;                              //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in
  • code/branches/core6/src/libraries/core/object/CMakeLists.txt

    r9561 r9562  
    11ADD_SOURCE_FILES(CORE_SRC_FILES
    22  Context.cc
     3  ContextObject.cc
    34  MetaObjectList.cc
    45  ObjectListBase.cc
  • code/branches/core6/src/libraries/core/object/Context.cc

    r9561 r9562  
    3737namespace orxonox
    3838{
    39     Context::Context(Context* context) : OrxonoxClass(this), parentContext_(context)
     39    Context::Context(Context* context) : ContextObject(this), parentContext_(context)
    4040    {
    4141        RegisterRootObject(Context);
  • code/branches/core6/src/libraries/core/object/Context.h

    r9561 r9562  
    3737#include "core/CorePrereqs.h"
    3838
    39 #include "core/OrxonoxClass.h"
     39#include "ContextObject.h"
    4040
    4141namespace orxonox
    4242{
    43     class _CoreExport Context : virtual public OrxonoxClass
     43    class _CoreExport Context : public ContextObject
    4444    {
    4545        public:
Note: See TracChangeset for help on using the changeset viewer.