MultiAgentDecisionProcess  Release 0.2.1
Referrer.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _REFERRER_H_
30 #define _REFERRER_H_ 1
31 
32 /* the include directives */
33 #include <iostream>
34 
35 
36 
38 
39 template <class T>
40 class Referrer
41 {
42  private:
44 
45  protected:
46 
47  public:
48  // Constructor, destructor and copy assignment.
49  // Referrer() {_m_referred = 0;}
51  Referrer(T* t_p = 0) : _m_referred(t_p){};
53  Referrer(T& t) : _m_referred(&t) {};
57  virtual ~Referrer(){};
58 
59  //operators:
60 
61  //data manipulation (set) functions:
63  void SetReferred(T* t_p) { _m_referred = t_p; }
64 
65 
66  //get (data) functions:
68  T* GetReferred() const { return(_m_referred); }
69 };
70 
71 
72 #endif /* !_REFERRER_H_ */
73 
74 // Local Variables: ***
75 // mode:c++ ***
76 // End: ***