MultiAgentDecisionProcess  Release 0.2.1
SimulationAgent.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _SIMULATIONAGENT_H_
30 #define _SIMULATIONAGENT_H_ 1
31 
32 /* the include directives */
33 #include <iostream>
34 #include "Globals.h"
35 
38 {
39 private:
40 
43 
45  bool _m_verbose;
46 
47 protected:
48 
49 public:
50  // Constructor, destructor and copy assignment.
52  SimulationAgent(Index id, bool verbose=false) :
53  _m_id(id), _m_verbose(verbose){};
54 
56  virtual ~SimulationAgent(){};
57 
59  virtual Index GetIndex() const { return(_m_id); }
60 
62  virtual void SetIndex(Index id) { _m_id=id; }
63 
65  virtual void SetVerbose(bool verbose) { _m_verbose=verbose; }
66 
68  virtual bool GetVerbose() const { return(_m_verbose); }
69 
71  virtual void ResetEpisode() = 0;
72 
74  virtual std::string SoftPrint() const
75  {
76  std::stringstream ss;
77  ss << "SimulationAgent id " << GetIndex();
78  return(ss.str());
79  }
80 
82  void Print() const {std::cout << SoftPrint(); }
83 
84 };
85 
86 
87 #endif /* !_SIMULATIONAGENT_H_ */
88 
89 // Local Variables: ***
90 // mode:c++ ***
91 // End: ***