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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/object/Destroyable.h

    r10419 r10555  
    3030    @file
    3131    @ingroup Object
    32     @brief Declaration of Destroyable, the base class of all objects which can be used with SmartPtr and WeakPtr.
     32    @brief Declaration of Destroyable, the base class of all objects which can be used with StrongPtr and WeakPtr.
    3333*/
    3434
     
    4343{
    4444    /**
    45         @brief Classes must inherit from this class if they should be used with SmartPtr or WeakPtr.
     45        @brief Classes must inherit from this class if they should be used with StrongPtr or WeakPtr.
    4646    */
    4747    class _CoreExport Destroyable
    4848    {
    4949        template <class T>
    50         friend class SmartPtr;
     50        friend class StrongPtr;
    5151
    5252        friend class DestructionListener;
     
    5959            void destroyLater();
    6060
    61             /// Returns the number of @ref orxonox::SmartPtr "smart pointers" that point to this object.
     61            /// Returns the number of @ref orxonox::StrongPtr "strong pointers" that point to this object.
    6262            inline unsigned int getReferenceCount() const
    6363                { return this->referenceCount_; }
    6464
    6565        protected:
    66             /// This virtual function is called if destroy() is called and no SmartPtr points to this object. Used in some cases to create a new SmartPtr to
     66            /// This virtual function is called if destroy() is called and no StrongPtr points to this object. Used in some cases to create a new StrongPtr to
    6767            /// prevent destruction. Don't call this function directly - use destroy() instead.
    6868            virtual void preDestroy() {}
    6969
    7070        private:
    71             /// Increments the reference counter (for smart pointers).
     71            /// Increments the reference counter (for strong pointers).
    7272            inline void incrementReferenceCount()
    7373                { ++this->referenceCount_; }
    74             /// Decrements the reference counter (for smart pointers).
     74            /// Decrements the reference counter (for strong pointers).
    7575            inline void decrementReferenceCount()
    7676            {
     
    8787                { this->destructionListeners_.erase(pointer); }
    8888
    89             int referenceCount_;                                    //!< Counts the references from smart pointers to this object
     89            int referenceCount_;                                    //!< Counts the references from strong pointers to this object
    9090            bool requestedDestruction_;                             //!< Becomes true after someone called delete on this object
    9191            std::set<DestructionListener*> destructionListeners_;   //!< All destruction listeners (for example weak pointers which point to this object and like to get notified if it dies)
Note: See TracChangeset for help on using the changeset viewer.