BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
ObserverAdapter< T, Y > Class Template Reference

#include <Observer.h>

+ Inheritance diagram for ObserverAdapter< T, Y >:

Public Member Functions

 ObserverAdapter (Adapter< Y > *anAdapter=0)
 
virtual ~ObserverAdapter ()
 
void setAdapter (Adapter< Y > *anAdapter=0)
 
Adapter< Y > * getAdapter ()
 
void update ()
 
 ObserverAdapter (Adapter< Y > *anAdapter=0)
 
virtual ~ObserverAdapter ()
 
void setAdapter (Adapter< Y > *anAdapter=0)
 
Adapter< Y > * getAdapter ()
 
void update ()
 
- Public Member Functions inherited from Observer
 Observer ()
 
virtual void update ()=0
 
 Observer ()
 
virtual void update ()=0
 

Detailed Description

template<class T, class Y = int>
class ObserverAdapter< T, Y >

Definition at line 138 of file Calibration/facilities/facilities-00-00-04/facilities/Observer.h.

Constructor & Destructor Documentation

◆ ObserverAdapter() [1/2]

template<class T , class Y = int>
ObserverAdapter< T, Y >::ObserverAdapter ( Adapter< Y > *  anAdapter = 0)
inline

Definition at line 144 of file Calibration/facilities/facilities-00-00-04/facilities/Observer.h.

146 : itsAdapter(anAdapter)
147 //## end ObserverAdapter::ObserverAdapter%894312604.initialization
148 {
149 //## begin ObserverAdapter::ObserverAdapter%894312604.body preserve=yes
150 //## end ObserverAdapter::ObserverAdapter%894312604.body
151 }

◆ ~ObserverAdapter() [1/2]

template<class T , class Y = int>
virtual ObserverAdapter< T, Y >::~ObserverAdapter ( )
inlinevirtual

Definition at line 153 of file Calibration/facilities/facilities-00-00-04/facilities/Observer.h.

154 {
155 delete itsAdapter;
156 itsAdapter = 0;
157 }

◆ ObserverAdapter() [2/2]

template<class T , class Y = int>
ObserverAdapter< T, Y >::ObserverAdapter ( Adapter< Y > *  anAdapter = 0)
inline

Definition at line 144 of file InstallArea/include/facilities/facilities/Observer.h.

146 : itsAdapter(anAdapter)
147 //## end ObserverAdapter::ObserverAdapter%894312604.initialization
148 {
149 //## begin ObserverAdapter::ObserverAdapter%894312604.body preserve=yes
150 //## end ObserverAdapter::ObserverAdapter%894312604.body
151 }

◆ ~ObserverAdapter() [2/2]

template<class T , class Y = int>
virtual ObserverAdapter< T, Y >::~ObserverAdapter ( )
inlinevirtual

Definition at line 153 of file InstallArea/include/facilities/facilities/Observer.h.

154 {
155 delete itsAdapter;
156 itsAdapter = 0;
157 }

Member Function Documentation

◆ getAdapter() [1/2]

template<class T , class Y = int>
Adapter< Y > * ObserverAdapter< T, Y >::getAdapter ( )
inline

Definition at line 173 of file Calibration/facilities/facilities-00-00-04/facilities/Observer.h.

174 {
175 //## begin ObserverAdapter::getAdapter%894312606.body preserve=yes
176 return itsAdapter;
177 //## end ObserverAdapter::getAdapter%894312606.body
178 }

◆ getAdapter() [2/2]

template<class T , class Y = int>
Adapter< Y > * ObserverAdapter< T, Y >::getAdapter ( )
inline

Definition at line 173 of file InstallArea/include/facilities/facilities/Observer.h.

174 {
175 //## begin ObserverAdapter::getAdapter%894312606.body preserve=yes
176 return itsAdapter;
177 //## end ObserverAdapter::getAdapter%894312606.body
178 }

◆ setAdapter() [1/2]

template<class T , class Y = int>
void ObserverAdapter< T, Y >::setAdapter ( Adapter< Y > *  anAdapter = 0)
inline

Definition at line 163 of file Calibration/facilities/facilities-00-00-04/facilities/Observer.h.

164 {
165 //## begin ObserverAdapter::setAdapter%894312605.body preserve=yes
166 delete itsAdapter;
167 itsAdapter = anAdapter;
168 //## end ObserverAdapter::setAdapter%894312605.body
169 }

◆ setAdapter() [2/2]

template<class T , class Y = int>
void ObserverAdapter< T, Y >::setAdapter ( Adapter< Y > *  anAdapter = 0)
inline

Definition at line 163 of file InstallArea/include/facilities/facilities/Observer.h.

164 {
165 //## begin ObserverAdapter::setAdapter%894312605.body preserve=yes
166 delete itsAdapter;
167 itsAdapter = anAdapter;
168 //## end ObserverAdapter::setAdapter%894312605.body
169 }

◆ update() [1/2]

template<class T , class Y = int>
void ObserverAdapter< T, Y >::update ( )
inlinevirtual

Implements Observer.

Definition at line 183 of file Calibration/facilities/facilities-00-00-04/facilities/Observer.h.

184 {
185 //## begin ObserverAdapter::update%894312607.body preserve=yes
186 if (itsAdapter) (*itsAdapter)();
187 //## end ObserverAdapter::update%894312607.body
188 }

◆ update() [2/2]

template<class T , class Y = int>
void ObserverAdapter< T, Y >::update ( )
inlinevirtual

Implements Observer.

Definition at line 183 of file InstallArea/include/facilities/facilities/Observer.h.

184 {
185 //## begin ObserverAdapter::update%894312607.body preserve=yes
186 if (itsAdapter) (*itsAdapter)();
187 //## end ObserverAdapter::update%894312607.body
188 }

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