QtXMLController.cxx

Go to the documentation of this file.
00001 
00011 #include "QtXMLController.h"
00012 
00013 #include "QtXmlDocument.h"
00014 
00015 #include <qfile.h>
00016 
00017 using std::string;
00018 
00019 namespace hippodraw {
00020 
00021 QtXMLController * QtXMLController::s_instance = 0;
00022 
00023 QtXMLController::QtXMLController ( )
00024 {
00025 }
00026 
00027 QtXMLController * QtXMLController::instance ( )
00028 {
00029   if ( s_instance == 0 ) {
00030     s_instance = new QtXMLController ();
00031   }
00032   return s_instance;
00033 }
00034 
00035 bool
00036 QtXMLController::
00037 fileExists ( const std::string & filename ) const
00038 {
00039   QFile file ( filename.c_str() );
00040 
00041   return file.exists ();
00042 }
00043 
00044 void
00045 QtXMLController::
00046 newDocument ( const std::string & name )
00047 {
00048 //   if ( m_xml_doc != 0 ) delete m_xml_doc;
00049   m_xml_doc = new QtXmlDocument ( name );
00050 }
00051 
00052 } // namespace hippodraw
00053 

Generated for HippoDraw Class Library by doxygen