本文整理汇总了C++中boost::shared_ptr::GetAssignPayoff方法的典型用法代码示例。如果您正苦于以下问题:C++ shared_ptr::GetAssignPayoff方法的具体用法?C++ shared_ptr::GetAssignPayoff怎么用?C++ shared_ptr::GetAssignPayoff使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boost::shared_ptr
的用法示例。
在下文中一共展示了shared_ptr::GetAssignPayoff方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ServerStateVoting
//---------------------------------------------------------------------------
ribi::gtst::ServerStates::ServerStates(
Server * const server,
boost::shared_ptr<const Parameters> parameters,
LogFile * const log)
: m_i(0),
m_log(log),
m_n_cycles{},
m_v{}
{
assert(parameters);
assert(m_log);
m_v.push_back(boost::shared_ptr<ServerState>(new ServerStateGroupAssign(server,0,0)));
const int n_periods = parameters->GetGroupReAssign()->GetNumberOfPeriods();
for (int period = 0; period!=n_periods; ++period)
{
m_v.push_back(boost::shared_ptr<ServerState>(new ServerStateChat(server,period,0,parameters->GetChat())));
const boost::shared_ptr<ServerState> voting(
new ServerStateVoting(server,period,0,parameters->GetVoting()));
m_v.push_back(voting);
const boost::shared_ptr<ServerStateViewResultsVoting> view_results_voting(
new ServerStateViewResultsVoting(server,period,0,parameters->GetViewResultsVoting()));
m_v.push_back(view_results_voting);
const int n_cycles = parameters->GetViewResultsGroup()->GetRepeatAssigner()->Assign();
///Store the number of IPGG cycles
m_n_cycles[period] = n_cycles;
for (int cycle = 0; cycle!=n_cycles; ++cycle)
{
m_v.push_back(boost::shared_ptr<ServerState>(
new ServerStateChooseAction(server,period,cycle,parameters->GetChooseAction())));
m_v.push_back(boost::shared_ptr<ServerState>(new ServerStateAssignPayoff(server,period,cycle,
parameters->GetAssignPayoff(),view_results_voting)));
m_v.push_back(boost::shared_ptr<ServerState>(
new ServerStateViewResultsGroup(server,period,cycle,parameters->GetViewResultsGroup())));
}
m_v.push_back(boost::shared_ptr<ServerState>(
new ServerStateGroupReAssign(server,period,0,parameters->GetGroupReAssign())));
}
m_v.push_back(boost::shared_ptr<ServerState>(new ServerStateFinished(server,n_periods,0)));
}