Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9561


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

OrxonoxClass now takes a 'Context' object as constructor argument. Not yet enforced nor used

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

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/libraries/core/CorePrereqs.h

    r8351 r9561  
    141141    class ConfigFileSection;
    142142    class ConfigValueContainer;
     143    class Context;
    143144    class Core;
    144145    class DestructionListener;
  • code/branches/core6/src/libraries/core/OrxonoxClass.cc

    r9557 r9561  
    3636#include <cassert>
    3737#include "object/MetaObjectList.h"
     38#include "object/Context.h"
    3839#include "Identifier.h"
    3940
     
    4344        @brief Constructor: Sets the default values.
    4445    */
    45     OrxonoxClass::OrxonoxClass()
     46    OrxonoxClass::OrxonoxClass(Context* context) : context_(context)
    4647    {
     48        //assert(context);
     49        if (!this->context_)
     50            this->context_ = Context::getRootContext();
     51
    4752        this->identifier_ = 0;
    4853        this->parents_ = 0;
  • code/branches/core6/src/libraries/core/OrxonoxClass.h

    r8866 r9561  
    7070
    7171        public:
    72             OrxonoxClass();
     72            OrxonoxClass(Context* context = NULL);
    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_; }
    8386
    8487            bool isA(const Identifier* identifier);
     
    167170
    168171            Identifier* identifier_;                                //!< The Identifier of the object
     172            Context* context_;                                      //!< The object's context
    169173            std::set<const Identifier*>* parents_;                  //!< List of all parents of the object
    170174            MetaObjectList* metaList_;                              //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in
  • code/branches/core6/src/libraries/core/object/CMakeLists.txt

    r9557 r9561  
    11ADD_SOURCE_FILES(CORE_SRC_FILES
     2  Context.cc
    23  MetaObjectList.cc
    34  ObjectListBase.cc
Note: See TracChangeset for help on using the changeset viewer.