BOSS 7.1.2
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 ()
 
- Public Member Functions inherited from Observer
 Observer ()
 

Detailed Description

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

Definition at line 138 of file Observer.h.

Constructor & Destructor Documentation

◆ ObserverAdapter()

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

Definition at line 144 of file 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()

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

Definition at line 153 of file Observer.h.

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

Member Function Documentation

◆ getAdapter()

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

Definition at line 173 of file Observer.h.

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

◆ setAdapter()

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

Definition at line 163 of file 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()

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

Implements Observer.

Definition at line 183 of file 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 file: