CYCLUS
Loading...
Searching...
No Matches
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 21 of file bid.h.

#include <bid.h>

Public Member Functions

Traderbidder () const
 
bool exclusive () const
 
boost::shared_ptr< Toffer () 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, bool exclusive, double preference, Package::Ptr package=Package::unpackaged())
 
static Bid< T > * Create (Request< T > *request, boost::shared_ptr< T > offer, Trader *bidder, bool exclusive=false, Package::Ptr package=Package::unpackaged())
 
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, Package::Ptr package=Package::unpackaged())
 

Member Function Documentation

◆ bidder()

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

Definition at line 84 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,
bool exclusive,
double preference,
Package::Ptr package = Package::unpackaged() )
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 62 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,
bool exclusive = false,
Package::Ptr package = Package::unpackaged() )
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 70 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,
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 34 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,
typename BidPortfolio< T >::Ptr portfolio,
bool exclusive = false,
Package::Ptr package = Package::unpackaged() )
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 50 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 90 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 81 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 87 of file bid.h.

◆ preference()

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

Definition at line 93 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 78 of file bid.h.


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