foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
pfc::instance_tracker_client_t< t_object, p_server >

#include <instance_tracker.h>

Public Member Functions

 instance_tracker_client_t (t_object *p_ptr)
 
 instance_tracker_client_t ()
 
 ~instance_tracker_client_t ()
 
void initialize (t_object *p_ptr)
 
void uninitialize ()
 

Private Attributes

bool m_added
 
t_object * m_ptr
 

Detailed Description

template<typename t_object, instance_tracker_server_t< t_object > & p_server>
class pfc::instance_tracker_client_t< t_object, p_server >

Definition at line 22 of file instance_tracker.h.

Constructor & Destructor Documentation

template<typename t_object , instance_tracker_server_t< t_object > & p_server>
pfc::instance_tracker_client_t< t_object, p_server >::instance_tracker_client_t ( t_object *  p_ptr)
inline

Definition at line 24 of file instance_tracker.h.

template<typename t_object , instance_tracker_server_t< t_object > & p_server>
pfc::instance_tracker_client_t< t_object, p_server >::instance_tracker_client_t ( )
inline

Definition at line 25 of file instance_tracker.h.

template<typename t_object , instance_tracker_server_t< t_object > & p_server>
pfc::instance_tracker_client_t< t_object, p_server >::~instance_tracker_client_t ( )
inline

Definition at line 42 of file instance_tracker.h.

42  {
43  uninitialize();
44  }

Member Function Documentation

template<typename t_object , instance_tracker_server_t< t_object > & p_server>
void pfc::instance_tracker_client_t< t_object, p_server >::initialize ( t_object *  p_ptr)
inline

Definition at line 27 of file instance_tracker.h.

27  {
28  uninitialize();
29  p_server.add(p_ptr);
30  m_ptr = p_ptr;
31  m_added = true;
32  }
template<typename t_object , instance_tracker_server_t< t_object > & p_server>
void pfc::instance_tracker_client_t< t_object, p_server >::uninitialize ( )
inline

Definition at line 34 of file instance_tracker.h.

34  {
35  if (m_added) {
36  p_server.remove(m_ptr);
37  m_ptr = NULL;
38  m_added = false;
39  }
40  }

Field Documentation

template<typename t_object , instance_tracker_server_t< t_object > & p_server>
bool pfc::instance_tracker_client_t< t_object, p_server >::m_added
private

Definition at line 46 of file instance_tracker.h.

template<typename t_object , instance_tracker_server_t< t_object > & p_server>
t_object* pfc::instance_tracker_client_t< t_object, p_server >::m_ptr
private

Definition at line 47 of file instance_tracker.h.


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