RoodyXML.h

Go to the documentation of this file.
00001 /********************************************************************
00002   RoodyXML.h, J. Chuma, TRIUMF
00003   $Id$
00004 ********************************************************************/
00005 #ifndef RoodyXML_H
00006 #define RoodyXML_H
00007 
00008 #include <fstream>
00009 #include <sstream>
00010 #include <string>
00011 #include <vector>
00012 
00013 #ifdef __cplusplus
00014 extern "C" {
00015 #endif
00016 #include "mxml.h"
00017 #ifdef __cplusplus
00018 }
00019 #endif
00020 
00021 class RoodyXML
00022 {
00023 public:
00024   unsigned int level_;
00025   bool elementIsOpen_;
00026   std::vector<std::string> names_;
00027   std::ofstream outputFile_;
00028   char const *encoding_;
00029   char const *version_;
00030   PMXML_NODE documentNode_, roodyNode_, histParent_;
00031 
00032   int FindNode(PMXML_NODE parent, int startIndex, const char* name);
00033   PMXML_NODE  GetNode(PMXML_NODE parent, int index);
00034   std::string GetNodeString(PMXML_NODE node, int index);
00035   //void PrintTree( int, PMXML_NODE );
00036 
00037 public:
00038   RoodyXML();
00039   virtual ~RoodyXML();
00040   //
00041   // write
00042   //
00043   std::ofstream &OpenFileForWrite( char const * );
00044   std::string Encode( std::string const & );
00045   //
00046   // read
00047   //
00048   bool OpenFileForRead( char const * );
00049 
00050   //void PrintTree( int );
00051 };
00052 
00053 #endif   // RoodyXML_H
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends

Generated on 15 Nov 2016 for Roody by  doxygen 1.6.1