MultiAgentDecisionProcess  Release 0.2.1
JointPolicy.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _JOINTPOLICY_H_
30 #define _JOINTPOLICY_H_ 1
31 
32 /* the include directives */
33 #include <iostream>
34 #include "Globals.h"
35 
37 
43 {
44 private:
45 
55  size_t _m_depth;
56 
57 protected:
59  size_t _m_nrAgents;
60 
61 public:
62  // Constructor, destructor and copy assignment.
63 
65  JointPolicy(size_t nrAg) :
67  _m_nrAgents(nrAg)
68  {};
72  {};
74  virtual JointPolicy& operator= (const JointPolicy& o)
75  {
76  if (this == &o) return *this; // Gracefully handle self assignment
77  _m_depth = o._m_depth;
79  return *this;
80  }
81 
83  size_t GetDepth() const {return _m_depth;}
85  virtual void SetDepth(size_t d) {_m_depth = d;}
86 
88  size_t GetNrAgents() const
89  { return _m_nrAgents; }
90 
92  virtual ~JointPolicy(){}
93 
95  virtual JointPolicy* Clone() const = 0;
96 
98  virtual std::string SoftPrint() const = 0;
100  virtual void Print() const
101  { std::cout << SoftPrint();}
102 };
103 
104 
105 #endif /* !_JOINTPOLICY_H_ */
106 
107 // Local Variables: ***
108 // mode:c++ ***
109 // End: ***