Pol  Revision:cb584c9
ref_ptr< T > Class Template Reference

#include <refptr.h>

+ Inheritance diagram for ref_ptr< T >:

Public Member Functions

 ref_ptr (T *ptr=0)
 
 ref_ptr (const ref_ptr &rptr)
 
 ref_ptr (ref_ptr &&rptr) POL_NOEXCEPT
 
 ~ref_ptr ()
 
void clear ()
 
T * get () const
 
bool operator! () const
 
bool operator!= (const ref_ptr &rptr) const
 
bool operator!= (T *ptr) const
 
T & operator* () const
 
T * operator-> () const
 
bool operator< (const ref_ptr &rptr) const
 
bool operator< (T *ptr) const
 
bool operator<= (const ref_ptr &rptr) const
 
bool operator<= (T *ptr) const
 
ref_ptroperator= (const ref_ptr &rptr)
 
ref_ptroperator= (ref_ptr &&rptr)
 
bool operator== (const ref_ptr &rptr) const
 
bool operator== (T *ptr) const
 
bool operator> (const ref_ptr &rptr) const
 
bool operator> (T *ptr) const
 
bool operator>= (const ref_ptr &rptr) const
 
bool operator>= (T *ptr) const
 
void set (T *ptr)
 

Protected Member Functions

void add_ref ()
 
void release ()
 

Private Attributes

std::atomic< T * > _ptr
 

Detailed Description

template<class T>
class ref_ptr< T >

Definition at line 65 of file refptr.h.

Constructor & Destructor Documentation

template<class T>
ref_ptr< T >::ref_ptr ( T *  ptr = 0)
explicit

Definition at line 142 of file refptr.h.

References ref_ptr< T >::add_ref().

template<class T>
ref_ptr< T >::ref_ptr ( const ref_ptr< T > &  rptr)

Definition at line 150 of file refptr.h.

References ref_ptr< T >::add_ref().

template<class T>
ref_ptr< T >::ref_ptr ( ref_ptr< T > &&  rptr)

Definition at line 159 of file refptr.h.

template<class T >
ref_ptr< T >::~ref_ptr ( )

Definition at line 167 of file refptr.h.

References ref_ptr< T >::release().

Member Function Documentation

template<class T >
void ref_ptr< T >::add_ref ( )
protected

Definition at line 289 of file refptr.h.

References ref_ptr< T >::_ptr, and REFERER_PARAM.

Referenced by ref_ptr< T >::operator=(), ref_ptr< T >::ref_ptr(), and ref_ptr< T >::set().

template<class T >
T * ref_ptr< T >::get ( ) const

Definition at line 176 of file refptr.h.

References ref_ptr< T >::_ptr.

Referenced by Pol::Bscript::ObjArray::array_assign(), Pol::Bscript::ArrayIterator::ArrayIterator(), Pol::Module::SQLExecutorModule::background_query(), Pol::Module::buyhandler(), Pol::Core::BXMLAttributeIterator::BXMLAttributeIterator(), Pol::Core::BXMLNodeIterator::BXMLNodeIterator(), Pol::Module::EPartyRefObjImp::call_method_id(), Pol::Module::EGuildRefObjImp::call_method_id(), Pol::Bscript::String::call_method_id(), Pol::Bscript::ObjArray::call_method_id(), Pol::Network::CallOutgoingPacketExportedFunction(), Pol::Core::USpell::cast(), Pol::Core::ClientCreateChar(), Pol::Core::ClientCreateChar70160(), Pol::Core::ClientCreateCharKR(), Pol::Core::DebugContext::cmd_localvarmembers(), Pol::Core::DebugContext::cmd_scriptins(), Pol::Core::DebugContext::cmd_scriptprofile(), Pol::Core::DebugContext::cmd_scriptsrc(), Pol::Core::DebugContext::cmd_setscript(), Pol::Module::commit_datastore(), Pol::Mobile::Character::create_trade_container(), Pol::Items::Item::double_click(), Pol::Core::doubleclick(), Pol::Clib::RunEclMain::dumpScript(), Pol::Module::DataStoreFile::estimateSize(), Pol::Core::ConsoleCommand::exec_console_cmd(), Pol::Network::ExportedPacketHookHandler(), Pol::Module::getGuildParam(), Pol::Core::getMultiParam(), Pol::Module::getPartyParam(), Pol::Core::getUBoatParam(), Pol::Module::gumpbutton_handler(), Pol::Core::handle_char_profile_request(), Pol::Core::handle_help(), Pol::Core::handle_msg_BF(), Pol::Bscript::ObjArray::imp_at(), Pol::Bscript::Executor::ins_initfor(), Pol::Bscript::Executor::ins_initforeach(), Pol::Bscript::Executor::ins_stepforeach(), Pol::Module::DataStoreFile::loaded(), Pol::Bscript::Executor::makeObj(), Pol::Module::FileAccessExecutorModule::mf_AppendToFile(), Pol::Module::UOExecutorModule::mf_ApplyConstraint(), Pol::Module::ConfigFileExecutorModule::mf_ConfigFile(), Pol::Module::UOExecutorModule::mf_CreateNpcFromTemplate(), Pol::Module::ConfigFileExecutorModule::mf_FindConfigElement(), Pol::Module::ConfigFileExecutorModule::mf_LoadTusScpFile(), Pol::Module::UOExecutorModule::mf_UseItem(), Pol::Module::FileAccessExecutorModule::mf_WriteFile(), Pol::Module::oldBuyHandler(), Pol::Module::oldSellHandler(), Pol::Core::OnChatButton(), Pol::Core::OnGuildButton(), Pol::Core::OnQuestButton(), ref_ptr< T >::operator!=(), operator!=(), Pol::Bscript::objref_cmp::operator()(), ref_ptr< T >::operator<(), ref_ptr< T >::operator<=(), ref_ptr< T >::operator=(), ref_ptr< T >::operator==(), operator==(), Pol::Bscript::ObjArray::operator==(), ref_ptr< T >::operator>(), operator>(), ref_ptr< T >::operator>=(), operator>=(), Pol::Module::EConfigFileRefObjImp::OperSubscript(), Pol::Bscript::ObjArray::OperSubscript(), Pol::Module::BIntHash::OperSubscript(), Pol::Core::read_npc(), Pol::Mobile::Character::realm_changed(), Pol::Core::run_executor_to_completion(), Pol::Mobile::Character::run_hit_script(), Pol::Core::run_script_to_completion(), Pol::Clib::RunEclMain::runeclScript(), Pol::Module::sellhandler(), Pol::Core::skillrequest(), Pol::Core::start_http_script(), Pol::Core::start_script(), Pol::Mobile::NPC::start_script(), Pol::Module::OSExecutorModule::start_skill_script(), Pol::Core::start_textcmd_script(), Pol::Core::StartSkillScript(), Pol::Bscript::BDictionaryIterator::step(), Pol::Bscript::BStructIterator::step(), Pol::Bscript::ArrayIterator::step(), Pol::Mobile::Character::trade_container(), Pol::Mobile::Character::unequip(), Pol::Items::Item::walk_on(), Pol::Multi::UHouse::walk_on(), Pol::Mobile::Character::weight(), Pol::Module::write_datastore(), Pol::Core::write_dirty_data(), Pol::Mobile::Character::~Character(), and Pol::Module::ItemGivenEvent::~ItemGivenEvent().

template<class T >
bool ref_ptr< T >::operator! ( ) const

Definition at line 192 of file refptr.h.

template<class T >
bool ref_ptr< T >::operator!= ( const ref_ptr< T > &  rptr) const

Definition at line 202 of file refptr.h.

References ref_ptr< T >::get().

template<class T>
bool ref_ptr< T >::operator!= ( T *  ptr) const

Definition at line 233 of file refptr.h.

template<class T >
T & ref_ptr< T >::operator* ( ) const

Definition at line 186 of file refptr.h.

References ref_ptr< T >::_ptr.

template<class T >
T * ref_ptr< T >::operator-> ( ) const

Definition at line 181 of file refptr.h.

References ref_ptr< T >::_ptr.

template<class T >
bool ref_ptr< T >::operator< ( const ref_ptr< T > &  rptr) const

Definition at line 207 of file refptr.h.

References ref_ptr< T >::get().

template<class T>
bool ref_ptr< T >::operator< ( T *  ptr) const

Definition at line 238 of file refptr.h.

template<class T >
bool ref_ptr< T >::operator<= ( const ref_ptr< T > &  rptr) const

Definition at line 212 of file refptr.h.

References ref_ptr< T >::get().

template<class T>
bool ref_ptr< T >::operator<= ( T *  ptr) const

Definition at line 243 of file refptr.h.

template<class T >
ref_ptr< T > & ref_ptr< T >::operator= ( const ref_ptr< T > &  rptr)
template<class T >
ref_ptr< T > & ref_ptr< T >::operator= ( ref_ptr< T > &&  rptr)

Definition at line 268 of file refptr.h.

References ref_ptr< T >::_ptr, and ref_ptr< T >::release().

template<class T >
bool ref_ptr< T >::operator== ( const ref_ptr< T > &  rptr) const

Definition at line 197 of file refptr.h.

References ref_ptr< T >::get().

template<class T>
bool ref_ptr< T >::operator== ( T *  ptr) const

Definition at line 228 of file refptr.h.

template<class T >
bool ref_ptr< T >::operator> ( const ref_ptr< T > &  rptr) const

Definition at line 217 of file refptr.h.

References ref_ptr< T >::get().

template<class T>
bool ref_ptr< T >::operator> ( T *  ptr) const

Definition at line 248 of file refptr.h.

template<class T >
bool ref_ptr< T >::operator>= ( const ref_ptr< T > &  rptr) const

Definition at line 222 of file refptr.h.

References ref_ptr< T >::get().

template<class T>
bool ref_ptr< T >::operator>= ( T *  ptr) const

Definition at line 253 of file refptr.h.

template<class T >
void ref_ptr< T >::release ( )
protected

Member Data Documentation


The documentation for this class was generated from the following file: