当前位置: 首页>>代码示例>>C++>>正文


C++ To::get_directory方法代码示例

本文整理汇总了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);
    }
  }
}
开发者ID:lbaehren,项目名称:lofarsoft,代码行数:61,代码来源:psradd.C


注:本文中的reference::To::get_directory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。