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


C++ TextParser::remove方法代码示例

本文整理汇总了C++中TextParser::remove方法的典型用法代码示例。如果您正苦于以下问题:C++ TextParser::remove方法的具体用法?C++ TextParser::remove怎么用?C++ TextParser::remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TextParser的用法示例。


在下文中一共展示了TextParser::remove方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: TextParser_remove

static PyObject* TextParser_remove(PyObject* self, PyObject* args)
{
    PyObject* handle;
    if(!PyArg_ParseTuple(args, "O", &handle))
    {
        return NULL;
    }
    TextParser* tp = static_cast<TextParser*>(PyCObject_AsVoidPtr(handle));

    int         ret = tp->remove();
    return Py_BuildValue("i", ret);
}
开发者ID:s-tsutsumi,项目名称:TextParser,代码行数:12,代码来源:TextParser_python_api.cpp

示例2: ReadInit

// #################################################################
//
void COMB::ReadInit(string input_file)
{

    // ------------------------------------
    FILE* fp = NULL;

    // TPインスタンス生成
    TextParser tpCntl;

    // 入力ファイルをセット
    int ierror = tpCntl.read(input_file);

    // 入力ファイルの読み込み--->パラメータのセット
    ReadInputFile(&tpCntl);

    // TextParserの破棄
    tpCntl.remove();

    return;
}
开发者ID:,项目名称:,代码行数:22,代码来源:

示例3: ReadInit

// #################################################################
//
void LAYOUT::ReadInit()
{
  
  // ------------------------------------
  FILE* fp = NULL;
  
  // TPインスタンス生成
  TextParser tpCntl;

  
  //入力ファイルをセット
  int ierror = tpCntl.read(fname);
  
  //入力ファイルの読み込み--->パラメータのセット
  ReadInputFile(&tpCntl);
  
  //TextParserの破棄
  tpCntl.remove();
  
  return;
}
开发者ID:VisCore618,项目名称:FFVC,代码行数:23,代码来源:layout.C

示例4: ReadDfiFile


//.........这里部分代码省略.........
  }
  
  label_base = "/TimeSlice";
  for (int i=0; i<nnode; i++)
  {
    if ( !(tpCntl.getNodeStr(label_base, i+1, str)) )
    {
      printf("\tParsing error : No Elem name\n");
      Exit(0);
    }
    
    if( strcasecmp(str.substr(0,5).c_str(), "Slice") ) continue;
    
    //step
    label=label_base+"/"+str+"/Step";
    if ( !(tpCntl.getInspectedValue(label, ct )) )
    {
      Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
      Exit(0);
    }
    
    //time
    label=label_base+"/"+str+"/Time";
    if ( !(tpCntl.getInspectedValue(label, ct2 )) )
    {
      Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
      Exit(0);
    }
    
    SetSlice(ct,ct2);
  }
  
  //TextParserの破棄
  tpCntl.remove();
  
  //内部変数の計算
  SetValue();
  
  
#if 0
  cout << endl;
  cout << endl;
  //for(int i=0;i<ndfi;i++){
  cout << "" << endl;
  cout << "Prefix = " << this->Prefix << endl;
  //cout << "RankIDinMPIworld = " << this->RankID_in_MPIworld << endl;
  //cout << "GroupIDinMPIworld = " << this->GroupID_in_MPIworld << endl;
  cout << "NumberOfRankIn = " << this->NumberOfRank << endl;
  cout << "NumberOfGroup  = " << this->NumberOfGroup << endl;
  cout << "GlobalOrigin[0] = " << this->Global_Origin[0] << endl;
  cout << "GlobalOrigin[1] = " << this->Global_Origin[1] << endl;
  cout << "GlobalOrigin[2] = " << this->Global_Origin[2] << endl;
  cout << "GlobalRegion[0] = " << this->Global_Region[0] << endl;
  cout << "GlobalRegion[1] = " << this->Global_Region[1] << endl;
  cout << "GlobalRegion[2] = " << this->Global_Region[2] << endl;
  cout << "GlobalVoxel[0] = " << this->Global_Voxel[0] << endl;
  cout << "GlobalVoxel[1] = " << this->Global_Voxel[1] << endl;
  cout << "GlobalVoxel[2] = " << this->Global_Voxel[2] << endl;
  cout << "GlobalDivision[0] = " << this->Global_Division[0] << endl;
  cout << "GlobalDivision[1] = " << this->Global_Division[1] << endl;
  cout << "GlobalDivision[2] = " << this->Global_Division[2] << endl;
  cout << "FileFormat = " << this->FileFormat << endl;
  cout << "GuideCell = " << this->GuideCell << endl;
  cout << "" << endl;
  cout << "NodeInfoSize = " << this->NodeInfoSize << endl;
  for(int j=0; j< this->NodeInfoSize; j++ ) {
开发者ID:VisCore618,项目名称:FFVC,代码行数:67,代码来源:dfiinfo.C

示例5: ReadDfiProc


//.........这里部分代码省略.........
  //else {
  //  RankID_in_MPIworld = ct;
  //}
  
  ////GroupID_in_MPIworld
  //label = "/DistributedFileInfo/GroupIDinMPIworld";
  //if ( !(tpCntl.getInspectedValue(label, &ct )) ) {
  //  Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
  //  Exit(0);
  //}
  //else {
  //  GroupID_in_MPIworld = ct;
  //}
  
  
  //Process <--- NodeInfo
  
  nnode=0;
  //label_base = "/DistributedFileInfo/NodeInfo";
  label_base = "/Process";
  if ( tpCntl.chkNode(label_base) )  //nodeがあれば
  {
    nnode = tpCntl.countLabels(label_base);
  }
  NodeInfoSize=nnode;
  Node = new DfiInfo::NodeInfo[nnode];
  
  for (int i=0; i<NodeInfoSize; i++)
  {
    if ( !(tpCntl.getNodeStr(label_base, i+1, str)) )
    {
      printf("\tParsing error : No Elem name\n");
      Exit(0);
    }
    if( strcasecmp(str.substr(0,4).c_str(), "Rank") ) continue;
    label_leaf=label_base+"/"+str;
    
    //RankID
    label = label_leaf + "/ID";
    if ( !(tpCntl.getInspectedValue(label, ct )) )
    {
      Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
      Exit(0);
    }
    else {
      Node[i].RankID= ct;
    }
    
    //HostName
    label = label_leaf + "/HostName";
    if ( !(tpCntl.getInspectedValue(label, str )) )
    {
      Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n", label.c_str());
      Exit(0);
    }
    Node[i].HostName= str;
    
    //VoxelSize
    label = label_leaf + "/VoxelSize";
    for (int n=0; n<3; n++) v[n]=0.0;
    if ( !(tpCntl.getInspectedVector(label, v, 3 )) )
    {
      Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
      Exit(0);
    }
    Node[i].VoxelSize[0]=v[0];
    Node[i].VoxelSize[1]=v[1];
    Node[i].VoxelSize[2]=v[2];
    
    //HeadIndex
    label = label_leaf + "/HeadIndex";
    for (int n=0; n<3; n++) v[n]=0.0;
    if ( !(tpCntl.getInspectedVector(label, v, 3 )) )
    {
      Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
      Exit(0);
    }
    Node[i].HeadIndex[0]=v[0];
    Node[i].HeadIndex[1]=v[1];
    Node[i].HeadIndex[2]=v[2];
    
    //TailIndex
    label = label_leaf + "/TailIndex";
    for (int n=0; n<3; n++) v[n]=0.0;
    if ( !(tpCntl.getInspectedVector(label, v, 3 )) )
    {
      Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
      Exit(0);
    }
    Node[i].TailIndex[0]=v[0];
    Node[i].TailIndex[1]=v[1];
    Node[i].TailIndex[2]=v[2];
    
  }
  
  
  //TextParserの破棄
  tpCntl.remove();
  
}
开发者ID:VisCore618,项目名称:FFVC,代码行数:101,代码来源:dfiinfo.C


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