本文整理汇总了C++中reference::To::get_directory方法的典型用法代码示例。如果您正苦于以下问题:C++ To::get_directory方法的具体用法?C++ To::get_directory怎么用?C++ To::get_directory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类reference::To
的用法示例。
在下文中一共展示了To::get_directory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setup
void psradd::setup ()
{
if (!auto_add && !unload_name.length() && inplace_name.empty())
throw Error (InvalidState, "psradd::setup",
"please specify the output filename (use -o)");
if (auto_add && !time_direction)
throw Error (InvalidState, "psradd::setup",
"cannot combine AUTO ADD features with -R option");
if (auto_add && tscrunch_total)
throw Error (InvalidState, "psradd::setup",
"cannot combine AUTO ADD features with -T option\n");
if (auto_add && unload_name.length())
cerr << "psradd ignores -o when AUTO ADD features are used\n";
if (unload->get_directory().length() && unload_name.length())
cerr << "psradd ignores -O when -o is used \n";
if (!parname.empty())
{
if (verbose)
cerr << "psradd: loading ephemeris from '"<< parname <<"'" << endl;
ephemeris = factory<Pulsar::Parameters> (parname);
if (very_verbose)
{
cerr << "psradd: ephemeris loaded=" << endl;
ephemeris->unload(stderr);
cerr << endl;
}
}
if (!patch_name.empty())
{
Pulsar::Contemporaneity* policy = 0;
if (patch_name == string("time"))
policy = new Pulsar::Contemporaneity::AtEarth;
else if (patch_name == string("phase"))
policy = new Pulsar::Contemporaneity::AtPulsar;
else
throw Error (InvalidParam, "psradd::setup",
"unknown contemporaneity policy '" + patch_name + "'");
patch = new Pulsar::PatchTime;
patch->set_contemporaneity_policy( policy );
}
if (!inplace_name.empty())
{
if (!unload_name.length())
{
unload_name = inplace_name;
Pulsar::Archive * inplace_archive = Pulsar::Application::load (unload_name);
set_total (inplace_archive);
}
}
}