GAMS  1.4.0
gams::elections::ElectionFactory Class Referenceabstract

Base class for an auction factory. More...

#include <ElectionFactory.h>

Inheritance diagram for gams::elections::ElectionFactory:
gams::elections::ElectionCumulativeFactory gams::elections::ElectionPluralityFactory

Public Member Functions

 ElectionFactory ()
 Constructor. More...
 
virtual ~ElectionFactory ()
 Destructor. More...
 
virtual ElectionBasecreate (const std::string &auction_prefix, const std::string &agent_prefix, madara::knowledge::KnowledgeBase *knowledge)=0
 Creates a auction. More...
 
void set_agent_prefix (const std::string &prefix)
 Sets the prefix for the current bidding agent. More...
 
void set_knowledge (madara::knowledge::KnowledgeBase *knowledge)
 Sets the knowledge base. More...
 

Protected Attributes

std::string agent_prefix_
 self prefix of the agent More...
 
madara::knowledge::KnowledgeBase * knowledge_
 knowledge base containing variables More...
 

Detailed Description

Base class for an auction factory.

Definition at line 71 of file ElectionFactory.h.

Constructor & Destructor Documentation

◆ ElectionFactory()

gams::elections::ElectionFactory::ElectionFactory ( )

Constructor.

◆ ~ElectionFactory()

virtual gams::elections::ElectionFactory::~ElectionFactory ( )
virtual

Destructor.

Member Function Documentation

◆ create()

virtual ElectionBase* gams::elections::ElectionFactory::create ( const std::string &  auction_prefix,
const std::string &  agent_prefix,
madara::knowledge::KnowledgeBase *  knowledge 
)
pure virtual

Creates a auction.

Parameters
auction_prefixthe name of the auction(e.g. auction.position)
agent_prefixthe name of this bidder(e.g. agent.0)
knowledgethe knowledge base to use for syncing
Returns
the new auction

Implemented in gams::elections::ElectionPluralityFactory, and gams::elections::ElectionCumulativeFactory.

◆ set_agent_prefix()

void gams::elections::ElectionFactory::set_agent_prefix ( const std::string &  prefix)

Sets the prefix for the current bidding agent.

Parameters
prefixthe name of the agent(e.g. agent.0)

◆ set_knowledge()

void gams::elections::ElectionFactory::set_knowledge ( madara::knowledge::KnowledgeBase *  knowledge)

Sets the knowledge base.

Parameters
knowledgethe knowledge base to use

Member Data Documentation

◆ agent_prefix_

std::string gams::elections::ElectionFactory::agent_prefix_
protected

self prefix of the agent

Definition at line 112 of file ElectionFactory.h.

◆ knowledge_

madara::knowledge::KnowledgeBase* gams::elections::ElectionFactory::knowledge_
protected

knowledge base containing variables

Definition at line 115 of file ElectionFactory.h.


The documentation for this class was generated from the following file: