Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10243 in orxonox.OLD for branches/mount_points/src/lib/graphics


Ignore:
Timestamp:
Jan 17, 2007, 12:26:26 AM (18 years ago)
Author:
patrick
Message:

still on this resource thingy

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

Legend:

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

    r10242 r10243  
    3030OIFData::OIFData()
    3131{
     32  PRINTF(0)("OIFDATA NEW (default)\n");
    3233  this->_root = NULL;
    3334}
     
    4041OIFData::OIFData(const std::string& fileName)
    4142{
    42   this->_root = NULL;
    43 
     43  PRINTF(0)("OIFDATA NEW\n");
    4444  this->load(fileName);
    4545}
     
    5252void OIFData::load(const std::string& fileName)
    5353{
    54   PRINTF(0)("loading |%s| as oif data\n", fileName.c_str());
     54  this->_root = NULL;
     55
    5556  if( fileName.empty())
    5657  {
    57     PRINTF(0)("No filename specified for object information loading");
     58    PRINTF(3)("No filename specified for object information loading");
    5859    return;
    5960  }
     
    6465  {
    6566    // report an error
    66     PRINTF(0)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc.ErrorDesc(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol());
     67    PRINTF(3)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc.ErrorDesc(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol());
    6768    return;
    6869  }
     
    7273  assert( this->_root != NULL);
    7374
     75  PRINTF(0)("%s\n\n\n", this->_root->Value());
    7476  if( strcmp( this->_root->Value(), "ObjectInformationFile"))
    7577  {
    7678    // report an error
    77     PRINTF(0)("Specified XML File is not an orxonox object information file (<ObjectInformationFile> element missing)\n");
     79    PRINTF(3)("Specified XML File is not an orxonox object information file (<ObjectInformationFile> element missing)\n");
    7880    return;
    7981  }
    80   PRINTF(0)("OIF loaded\n");
    81 
    8282}
    8383
  • branches/mount_points/src/lib/graphics/importer/oif/object_information_file.h

    r10241 r10243  
    2626  void load(const std::string& fileName);
    2727
    28   inline TiXmlElement* root() { return this->_root; }
     28  inline const TiXmlElement* root() { return this->_root; }
    2929
    3030
  • branches/mount_points/src/lib/graphics/importer/oif/resource_oif.cc

    r10242 r10243  
    2929  if (ptr)
    3030  {
    31     PRINTF(0)("FOUND OIF: %s\n", fileName.c_str());
     31    PRINTF(5)("FOUND OIF: %s\n", fileName.c_str());
    3232    this->acquireData(static_cast<ResourceOIF::OIFResourcePointer*>(ptr)->ptr());
    3333  }
    3434  else
    3535  {
    36     PRINTF(0)("NOT FOUND OIF: %s\n", fileName.c_str());
     36    PRINTF(5)("NOT FOUND OIF: %s\n", fileName.c_str());
    3737    std::string fullName = this->Resource::locateFile(fileName);
    38     PRINTF(0)("trying loading of: %s\n", fullName.c_str());
     38    PRINTF(5)("trying loading of: %s\n", fullName.c_str());
    3939    this->load(fullName);
    4040    this->Resource::addResource(new ResourceOIF::OIFResourcePointer(fileName, keepLevel, this->ObjectInformationFile::dataPointer()));
Note: See TracChangeset for help on using the changeset viewer.