Exemplo n.º 1
0
//----------------------------------------------------------------------------------------------------------------------
void FileList::load(const std::string & _fname)
{
  std::ifstream input;
  std::string line;
  input.open(_fname);

  if(!input.is_open())
  {
    std::cerr<<"Problem Opening File"<<_fname<<"\n";
    exit(EXIT_FAILURE);
  }

  while(!input.eof())
  {
     input>>line;
     if(trim(line)=="HIERARCHY")
      loadStructure(input);
     break;
  }

     input.close();

     Node temp;

}
Exemplo n.º 2
0
void CTownHandler::loadStructures(CTown &town, const JsonNode & source)
{
	BOOST_FOREACH(const JsonNode &node, source.Vector())
	{
		loadStructure(town, node);
	}
}
Exemplo n.º 3
0
 DocumentStructure(Index & index, const indri::utility::greedy_vector<indri::index::FieldExtent> & fields) 
   : _index( &index ) ,
     _numNodes( 0 ),
     _nodes( ),
     _childrenBuff( )
 {     
   loadStructure(fields);
 }
Exemplo n.º 4
0
void CTownHandler::loadStructures(CTown &town, const JsonNode & source)
{
	if (source.getType() == JsonNode::DATA_VECTOR)
	{
		for(auto &node : source.Vector())
		{
			if (!node.isNull())
				loadStructure(town, node);
		}
	}
	else
	{
		for(auto &node : source.Struct())
		{
			if (!node.second.isNull())
				loadStructure(town, node.second);
		}
	}
}