GAMS  1.4.0
gams::auctions::AuctionFactoryRepository Class Reference

A repository for auction factories. More...

#include <AuctionFactoryRepository.h>

Public Member Functions

 AuctionFactoryRepository (const std::string &agent_prefix, madara::knowledge::KnowledgeBase *knowledge=0)
 Constructor. More...
 
virtual ~AuctionFactoryRepository ()
 Destructor. More...
 
void add (AuctionType type, AuctionFactory *factory)
 Adds an algorithm factory. More...
 
AuctionBasecreate (AuctionType type)
 Creates an auction based on type. More...
 
AuctionBasecreate (const std::string &auction_prefix)
 Creates an auction based on type. 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 Member Functions

void init (void)
 Initializes factories for all supported GAMS auctions. More...
 

Protected Attributes

std::string agent_prefix_
 self prefix of the agent More...
 
AuctionFactoryMap factory_map_
 a mapping of types to auction factories More...
 
madara::knowledge::KnowledgeBase * knowledge_
 knowledge base containing variables More...
 

Detailed Description

A repository for auction factories.

Definition at line 76 of file AuctionFactoryRepository.h.

Constructor & Destructor Documentation

◆ AuctionFactoryRepository()

gams::auctions::AuctionFactoryRepository::AuctionFactoryRepository ( const std::string &  agent_prefix,
madara::knowledge::KnowledgeBase *  knowledge = 0 
)

Constructor.

Parameters
agent_prefixthe name of this bidder(e.g. agent.0)
knowledgea knowledge base where auction info is

◆ ~AuctionFactoryRepository()

virtual gams::auctions::AuctionFactoryRepository::~AuctionFactoryRepository ( )
virtual

Destructor.

Member Function Documentation

◆ add()

void gams::auctions::AuctionFactoryRepository::add ( AuctionType  type,
AuctionFactory factory 
)

Adds an algorithm factory.

Parameters
typethe type for this factory
factorythe factory for creating an algorithm
Returns
the new algorithm

◆ create() [1/2]

AuctionBase* gams::auctions::AuctionFactoryRepository::create ( AuctionType  type)

Creates an auction based on type.

Parameters
typethe type of the auction(
See also
AuctionTypes)
Returns
the new auction

◆ create() [2/2]

AuctionBase* gams::auctions::AuctionFactoryRepository::create ( const std::string &  auction_prefix)

Creates an auction based on type.

Parameters
auction_prefixthe name of the auction(e.g. auction.position)
Returns
the new auction

◆ init()

void gams::auctions::AuctionFactoryRepository::init ( void  )
protected

Initializes factories for all supported GAMS auctions.

◆ set_agent_prefix()

void gams::auctions::AuctionFactoryRepository::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::auctions::AuctionFactoryRepository::set_knowledge ( madara::knowledge::KnowledgeBase *  knowledge)

Sets the knowledge base.

Parameters
knowledgethe knowledge base to use

Member Data Documentation

◆ agent_prefix_

std::string gams::auctions::AuctionFactoryRepository::agent_prefix_
protected

self prefix of the agent

Definition at line 141 of file AuctionFactoryRepository.h.

◆ factory_map_

AuctionFactoryMap gams::auctions::AuctionFactoryRepository::factory_map_
protected

a mapping of types to auction factories

Definition at line 144 of file AuctionFactoryRepository.h.

◆ knowledge_

madara::knowledge::KnowledgeBase* gams::auctions::AuctionFactoryRepository::knowledge_
protected

knowledge base containing variables

Definition at line 136 of file AuctionFactoryRepository.h.


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