Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4827 in orxonox.OLD for orxonox/trunk/src/util/state.cc


Ignore:
Timestamp:
Jul 9, 2005, 12:48:50 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: state is no more singleton, but static class.
This is faster, and easier to handle, because one can just say State::getBLA() and not State::getInstance()→getBLA(); ——→>> less redundant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/state.cc

    r4597 r4827  
    2525
    2626
    27 /**
    28    \brief standard constructor
    29 */
    30 State::State ()
    31 {
    32    this->setClassID(CL_STATE, "State");
    33    this->setName("State");
    3427
    35    this->camera = NULL;
    36    this->cameraTarget = NULL;
    37 }
     28const PNode* State::camera = NULL;
     29const PNode* State::cameraTarget = NULL;
    3830
    39 /**
    40    \brief the singleton reference to this class
    41 */
    42 State* State::singletonRef = NULL;
    43 
    44 /**
    45    \brief standard deconstructor
    46 */
    47 State::~State ()
    48 {
    49   State::singletonRef = NULL;
    50 
    51 }
     31tList<WorldEntity>* State::worldEntityList = NULL;
    5232
    5333/**
     
    5636void State::setCamera(const PNode* camera, const PNode* cameraTarget)
    5737{
    58   this->camera = camera;
    59   this->cameraTarget = cameraTarget;
     38  State::camera = camera;
     39  State::cameraTarget = cameraTarget;
    6040}
Note: See TracChangeset for help on using the changeset viewer.