Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10245 in orxonox.OLD for branches/mount_points


Ignore:
Timestamp:
Jan 17, 2007, 1:08:54 AM (18 years ago)
Author:
patrick
Message:

now it works:D

Location:
branches/mount_points/src/lib/graphics/importer/oif
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/mount_points/src/lib/graphics/importer/oif/object_information_file.cc

    r10243 r10245  
    4141OIFData::OIFData(const std::string& fileName)
    4242{
    43   PRINTF(0)("OIFDATA NEW\n");
     43  PRINTF(0)("OIFDATA NEW %s\n", fileName.c_str());
     44  this->_root = NULL;
    4445  this->load(fileName);
     46}
     47
     48
     49OIFData::~OIFData()
     50{
     51  if( this->_root)
     52    delete this->_root;
    4553}
    4654
     
    5260void OIFData::load(const std::string& fileName)
    5361{
    54   this->_root = NULL;
    55 
    5662  if( fileName.empty())
    5763  {
     
    6066  }
    6167
    62   TiXmlDocument XMLDoc(fileName);
     68  TiXmlDocument* XMLDoc = new TiXmlDocument(fileName);
    6369  // load the campaign document
    64   if( !XMLDoc.LoadFile(fileName))
     70  if( !XMLDoc->LoadFile(fileName))
    6571  {
    6672    // report an error
    67     PRINTF(3)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc.ErrorDesc(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol());
     73    PRINTF(3)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());
    6874    return;
    6975  }
    7076
    7177  // check basic validity
    72   this->_root = XMLDoc.RootElement();
     78  this->_root = XMLDoc->RootElement();
    7379  assert( this->_root != NULL);
    7480
    75   PRINTF(0)("%s\n\n\n", this->_root->Value());
    7681  if( strcmp( this->_root->Value(), "ObjectInformationFile"))
    7782  {
     
    8085    return;
    8186  }
     87
     88//   this->initMountPoint( this->_root);
    8289}
    8390
     
    8895 */
    8996ObjectInformationFile::ObjectInformationFile()
    90   : data(new OIFData())
     97  : data(new OIFData)
    9198{
    9299  this->init();
     
    142149void ObjectInformationFile::load(const std::string& fileName)
    143150{
     151  PRINTF(0)("loading\n");
    144152  this->data = OIFData::Pointer(new OIFData(fileName));
    145153}
  • branches/mount_points/src/lib/graphics/importer/oif/object_information_file.h

    r10243 r10245  
    2222  OIFData();
    2323  OIFData(const std::string& fileName);
    24   virtual ~OIFData() {}
     24  virtual ~OIFData();
    2525
    2626  void load(const std::string& fileName);
     27  void initMountPoint(const TiXmlElement* root);
    2728
    2829  inline const TiXmlElement* root() { return this->_root; }
Note: See TracChangeset for help on using the changeset viewer.