CYCLUS
Public Member Functions | Static Public Member Functions | List of all members
cyclus::Bid< T > Class Template Reference

Detailed Description

template<class T>
class cyclus::Bid< T >

A Bid encapsulates all the information required to communicate a bid response to a request for a resource, including the resource bid and the bidder.

Definition at line 20 of file bid.h.

#include <bid.h>

Public Member Functions

Traderbidder () const
 
bool exclusive () const
 
boost::shared_ptr< T > offer () const
 
BidPortfolio< T >::Ptr portfolio ()
 
double preference () const
 
Request< T > * request () const
 

Static Public Member Functions

static Bid< T > * Create (Request< T > *request, boost::shared_ptr< T > offer, Trader *bidder, typename BidPortfolio< T >::Ptr portfolio, bool exclusive, double preference)
 
static Bid< T > * Create (Request< T > *request, boost::shared_ptr< T > offer, Trader *bidder, typename BidPortfolio< T >::Ptr portfolio, bool exclusive=false)
 
static Bid< T > * Create (Request< T > *request, boost::shared_ptr< T > offer, Trader *bidder, bool exclusive, double preference)
 
static Bid< T > * Create (Request< T > *request, boost::shared_ptr< T > offer, Trader *bidder, bool exclusive=false)
 

Member Function Documentation

◆ bidder()

template<class T>
Trader* cyclus::Bid< T >::bidder ( ) const
inline
Returns
the agent responding the request

Definition at line 80 of file bid.h.

◆ Create() [1/4]

template<class T>
static Bid<T>* cyclus::Bid< T >::Create ( Request< T > *  request,
boost::shared_ptr< T >  offer,
Trader bidder,
typename BidPortfolio< T >::Ptr  portfolio,
bool  exclusive,
double  preference 
)
inlinestatic

a factory method for a bid

Parameters
requestthe request being responded to by this bid
offerthe resource being offered in response to the request
bidderthe bidder
portfoliothe porftolio of which this bid is a part
exclusiveflag for whether the bid is exclusive
preferencespecifies the preference of a bid in a request to bid arc. If NaN the request preference is used. WARNING: This should only be set by the bidder using the requests callback cost function. Bidders should not arbitrarily set this preference.

Definition at line 33 of file bid.h.

◆ Create() [2/4]

template<class T>
static Bid<T>* cyclus::Bid< T >::Create ( Request< T > *  request,
boost::shared_ptr< T >  offer,
Trader bidder,
typename BidPortfolio< T >::Ptr  portfolio,
bool  exclusive = false 
)
inlinestatic

a factory method for a bid

Parameters
requestthe request being responded to by this bid
offerthe resource being offered in response to the request
bidderthe bidder
portfoliothe porftolio of which this bid is a part
exclusiveflag for whether the bid is exclusive

Definition at line 49 of file bid.h.

◆ Create() [3/4]

template<class T>
static Bid<T>* cyclus::Bid< T >::Create ( Request< T > *  request,
boost::shared_ptr< T >  offer,
Trader bidder,
bool  exclusive,
double  preference 
)
inlinestatic

a factory method for a bid for a bid without a portfolio

Warning
this factory should generally only be used for testing

Definition at line 60 of file bid.h.

◆ Create() [4/4]

template<class T>
static Bid<T>* cyclus::Bid< T >::Create ( Request< T > *  request,
boost::shared_ptr< T >  offer,
Trader bidder,
bool  exclusive = false 
)
inlinestatic

a factory method for a bid for a bid without a portfolio

Warning
this factory should generally only be used for testing

Definition at line 67 of file bid.h.

◆ exclusive()

template<class T>
bool cyclus::Bid< T >::exclusive ( ) const
inline
Returns
whether or not this an exclusive bid

Definition at line 86 of file bid.h.

◆ offer()

template<class T>
boost::shared_ptr<T> cyclus::Bid< T >::offer ( ) const
inline
Returns
the bid object for the request

Definition at line 77 of file bid.h.

◆ portfolio()

template<class T>
BidPortfolio<T>::Ptr cyclus::Bid< T >::portfolio ( )
inline
Returns
the portfolio of which this bid is a part

Definition at line 83 of file bid.h.

◆ preference()

template<class T>
double cyclus::Bid< T >::preference ( ) const
inline
Returns
the preference of this bid

Definition at line 89 of file bid.h.

◆ request()

template<class T>
Request<T>* cyclus::Bid< T >::request ( ) const
inline
Returns
the request being responded to

Definition at line 74 of file bid.h.


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