예제 #1
0
    XmlMeshLibraryLoader (const char* file_name, MeshLibrary& in_library) : parser (file_name, "xml"), library (in_library)
    {
      ParseLibrary (parser.Root ().First ("mesh_library"));

        //протоколирование

      Log log (LOG_NAME);

      parser.Log ().Print (xtl::bind (&Log::Print, xtl::ref (log), _1));
    }
예제 #2
0
void LibraryParser::ParseDocument(TiXmlNode* pParent) {
	if ( !pParent )
		return;

	int Type = pParent->Type() ;
	string Elem;

	if (Type == TiXmlNode::DOCUMENT ) {
		cout << "Parsing the library from file  "<< mFname << endl ;
		TiXmlNode* Child;
		for (Child = pParent->FirstChild() ; Child != 0; Child
				= Child->NextSibling() ) {
			Elem = Child->ValueStr() ;
			if (Elem == "Library")
				ParseLibrary(Child ) ;
		}
	} else {
		cout << "The document should be parsed..."<< endl ;
	}
	return;
}
예제 #3
0
void LibraryParser::Parse(TiXmlNode* pParent) {
	ParseLibrary(pParent) ;
}