GAMS  1.4.0
ElectionFactory.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_ELECTIONS_ELECTION_FACTORY_H_
55 #define _GAMS_ELECTIONS_ELECTION_FACTORY_H_
56 
57 #include <vector>
58 #include <string>
59 #include <map>
60 
61 #include "madara/knowledge/KnowledgeBase.h"
62 #include "ElectionBase.h"
63 
64 namespace gams
65 {
66  namespace elections
67  {
72  {
73  public:
78 
82  virtual ~ElectionFactory();
83 
91  virtual ElectionBase * create(const std::string & auction_prefix,
92  const std::string & agent_prefix,
93  madara::knowledge::KnowledgeBase * knowledge) = 0;
94 
99  void set_knowledge(madara::knowledge::KnowledgeBase * knowledge);
100 
105  void set_agent_prefix(const std::string & prefix);
106 
107  protected:
108 
112  std::string agent_prefix_;
113 
115  madara::knowledge::KnowledgeBase * knowledge_;
116  };
117  }
118 }
119 
120 #endif // _GAMS_ELECTIONS_ELECTION_FACTORY_H_
Copyright(c) 2016 Carnegie Mellon University.
#define GAMS_EXPORT
Definition: GamsExport.h:20
Base class for an election.
Definition: ElectionBase.h:83
Base class for an auction factory.
void set_knowledge(madara::knowledge::KnowledgeBase *knowledge)
Sets the knowledge base.
void set_agent_prefix(const std::string &prefix)
Sets the prefix for the current bidding agent.
madara::knowledge::KnowledgeBase * knowledge_
knowledge base containing variables
virtual ~ElectionFactory()
Destructor.
std::string agent_prefix_
self prefix of the agent
virtual ElectionBase * create(const std::string &auction_prefix, const std::string &agent_prefix, madara::knowledge::KnowledgeBase *knowledge)=0
Creates a auction.
Contains all GAMS-related tools, classes and code.