本文整理汇总了C++中bfs::path::native_file_string方法的典型用法代码示例。如果您正苦于以下问题:C++ path::native_file_string方法的具体用法?C++ path::native_file_string怎么用?C++ path::native_file_string使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bfs::path
的用法示例。
在下文中一共展示了path::native_file_string方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SgException
RlSemaphore::RlSemaphore(const bfs::path& semname, int index)
{
std::string filename = semname.native_file_string();
key_t key = ftok(filename.c_str(), index);
if (key == -1)
throw SgException("Semaphore " + filename + " doesn't exist");
m_id = semget(key, 1, 0644 | IPC_CREAT);
if (semctl(m_id, 0, SETVAL, 1) == -1)
throw SgException("Failed to initialise semaphore");
}
示例2: GoGtpEngine
RlEngine::RlEngine(istream& in, ostream& out,
const bfs::path& programPath,
const bfs::path& rlgoDir,
const bfs::path& settingsfile,
const vector<pair<string, string> >& overrides)
: GoGtpEngine(in, out, 0, programPath.native_file_string().c_str())
{
m_commands.Register(*this);
RlForceLink();
// Create a single player that is used by both sides
RlAgentPlayer* agentplayer = new RlAgentPlayer(Board());
m_player = agentplayer;
GoGtpEngine::SetPlayer(agentplayer);
SetOverrides(overrides);
m_setup = InitSettings(settingsfile, rlgoDir, m_player->Board());
// Set player to use newly created agent
m_player->SetAgent(m_setup->GetMainAgent());
m_setup->SetGame(&GetGame());
m_commands.Setup(m_setup);
}