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/network/synchronisable/Serialise.h

    r9667 r10555  
    7878    }
    7979
    80     // These functions implement loading / saving / etc. for SmartPtr<T>
     80    // These functions implement loading / saving / etc. for StrongPtr<T>
    8181
    8282    /** @brief returns the size of the objectID needed to synchronise the pointer */
    83     template <class T> inline uint32_t returnSize( const SmartPtr<T>& )
     83    template <class T> inline uint32_t returnSize( const StrongPtr<T>& )
    8484    {
    8585        return sizeof(uint32_t);
     
    8787
    8888    /** @brief reads the objectID of a pointer out of the bytestream and increases the mem pointer */
    89     template <class T> inline void loadAndIncrease( const SmartPtr<T>& variable, uint8_t*& mem )
     89    template <class T> inline void loadAndIncrease( const StrongPtr<T>& variable, uint8_t*& mem )
    9090    {
    9191//         *const_cast<typename Loki::TypeTraits<T*>::UnqualifiedType*>(&variable) = dynamic_cast<T*>(variable->getSynchronisable( *(uint32_t*)(mem) ));
    92         *const_cast<typename Loki::TypeTraits<SmartPtr<T> >::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem)));
     92        *const_cast<typename Loki::TypeTraits<StrongPtr<T> >::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem)));
    9393        mem += returnSize( variable );
    9494    }
    9595
    9696    /** @brief saves the objectID of a pointer into the bytestream and increases the mem pointer */
    97     template <class T> inline void saveAndIncrease( const SmartPtr<T>& variable, uint8_t*& mem )
     97    template <class T> inline void saveAndIncrease( const StrongPtr<T>& variable, uint8_t*& mem )
    9898    {
    9999        if ( variable.get() )
     
    105105
    106106    /** @brief checks whether the objectID of the variable is the same as in the bytestream */
    107     template <class T> inline  bool checkEquality( const SmartPtr<T>& variable, uint8_t* mem )
     107    template <class T> inline  bool checkEquality( const StrongPtr<T>& variable, uint8_t* mem )
    108108    {
    109109        if ( variable.get() )
     
    125125    {
    126126        //         *const_cast<typename Loki::TypeTraits<T*>::UnqualifiedType*>(&variable) = dynamic_cast<T*>(variable->getSynchronisable( *(uint32_t*)(mem) ));
    127         *const_cast<typename Loki::TypeTraits<SmartPtr<T> >::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem)));
     127        *const_cast<typename Loki::TypeTraits<StrongPtr<T> >::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem)));
    128128        mem += returnSize( variable );
    129129    }
Note: See TracChangeset for help on using the changeset viewer.