Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 29, 2015, 5:35:59 PM (9 years ago)
Author:
landauf
Message:

renamed SmartPtr to StrongPtr (now we have weak and strong pointers)

Location:
code/branches/core7/src/orxonox/worldentities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/orxonox/worldentities/ControllableEntity.cc

    r10478 r10555  
    108108                this->camera_->destroy();
    109109
    110             for (std::list<SmartPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
     110            for (std::list<StrongPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
    111111                (*it)->destroy();
    112112
     
    165165    {
    166166        unsigned int i = 0;
    167         for (std::list<SmartPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
     167        for (std::list<StrongPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
    168168        {
    169169            if (i == index)
     
    180180
    181181        unsigned int counter = 0;
    182         for (std::list<SmartPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
     182        for (std::list<StrongPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
    183183        {
    184184            if ((*it) == this->currentCameraPosition_)
     
    219219            else if (this->cameraPositions_.size() > 0)
    220220            {
    221                 for (std::list<SmartPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
     221                for (std::list<StrongPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
    222222                {
    223223                    if ((*it) == this->camera_->getParent())
     
    477477        if (parent)
    478478        {
    479             for (std::list<SmartPtr<CameraPosition> >::iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
     479            for (std::list<StrongPtr<CameraPosition> >::iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
    480480                if ((*it)->getIsAbsolute())
    481481                    parent->attach((*it));
  • code/branches/core7/src/orxonox/worldentities/ControllableEntity.h

    r9667 r10555  
    114114            void addCameraPosition(CameraPosition* position);
    115115            CameraPosition* getCameraPosition(unsigned int index) const;
    116             inline const std::list<SmartPtr<CameraPosition> >& getCameraPositions() const
     116            inline const std::list<StrongPtr<CameraPosition> >& getCameraPositions() const
    117117                { return this->cameraPositions_; }
    118118            unsigned int getCurrentCameraIndex() const;
     
    235235            bool bMouseLook_;
    236236            float mouseLookSpeed_;
    237             std::list<SmartPtr<CameraPosition> > cameraPositions_;
     237            std::list<StrongPtr<CameraPosition> > cameraPositions_;
    238238            CameraPosition* currentCameraPosition_;
    239239            std::string cameraPositionTemplate_;
  • code/branches/core7/src/orxonox/worldentities/WorldEntity.cc

    r10362 r10555  
    130130                WorldEntity* entity = *it;
    131131
    132                 // do this for all children, because even if getDeleteWithParent() returns true a child might still stay active due to smart pointers pointing to it
     132                // do this for all children, because even if getDeleteWithParent() returns true a child might still stay active due to strong pointers pointing to it
    133133                entity->setPosition(entity->getWorldPosition());
    134134                this->detach(entity); // detach also erases the element from the children set
Note: See TracChangeset for help on using the changeset viewer.