DVarListener.cpp
Go to the documentation of this file.
1 #include "DVarListener.hpp"
2 #include "DVarSystem.hpp"
3 
4 namespace iv
5 {
6 
8  inst( inst ),
9  dvs( inst->getSystemContainer()->getSystem< DVarSystem >() )
10 {
11 }
12 
14 {
15  if( this->dvs )
16  for( DVarId id : this->listenings )
17  this->dvs->remove_listener( this, id );
18 }
19 
21 {
22  return this->inst;
23 }
24 
26 {
27  if( this->dvs )
28  {
29  this->listenings.insert( id );
30  this->dvs->add_listener( this, id );
31  }
32 }
33 
35 {
36  if( this->dvs )
37  {
38  this->listenings.erase( id );
39  this->dvs->remove_listener( this, id );
40  }
41 }
42 
43 }