MTK++ Latest version: 0.2.0

paramParser.h
Go to the documentation of this file.
00001 
00033 #ifndef PARAMPARSER_H
00034 #define PARAMPARSER_H
00035 
00036 #include <iostream>
00037 #include <string>
00038 #include <fstream>
00039 #include <iomanip>
00040 #include <stdlib.h>
00041 #include <stdio.h>
00042 #include <ctype.h>
00043 
00044 #include "baseParser.h"
00045 
00046 #ifdef USE_QT
00047 #include <QtCore>
00048 #include <QtXml>
00049 #elif defined(USE_XERCES)
00050 #include "domErrorHandler.h"
00051 #else // USE_TINYXML
00052 #include <sstream>
00053 #include "tinyxml/tinyxml.h"
00054 #endif
00055 
00056 namespace MTKpp
00057 {
00058 
00059 class parameters;
00060 struct atomType;
00061 struct bondParam;
00062 struct angleParam;
00063 struct torsionParam;
00064 struct improperParam;
00065 struct hBondParam;
00066 struct equivalentAtomsParam;
00067 
00068 // ============================================================
00069 // Class : paramParser()
00070 // ------------------------------------------------------------
00076 // ============================================================
00077 
00078 #ifdef USE_QT
00079 class paramParser : public QObject, public baseParser
00080 {
00081     Q_OBJECT
00082 
00083 #else // USE_XERCES or USE_TINYXML
00084 class paramParser : public baseParser
00085 {
00086 #endif
00087 
00088 public:
00089 
00094     paramParser(parameters* c);
00095 
00097     virtual ~paramParser();
00098 
00104     int Read(std::string fileName);
00105 
00111     int Write(std::string i, std::string g);
00112 
00113 protected:
00114 #ifdef USE_QT
00115 
00120     void typeFiller(QDomNode d);
00121 
00126     void bondFiller(QDomNode d);
00127 
00132     void angleFiller(QDomNode d);
00133 
00138     void torsionFiller(QDomNode d);
00139 
00144     void improperFiller(QDomNode d);
00145 
00150     void hBondFiller(QDomNode d);
00151 
00156     void equivalAtomFiller(QDomNode d);
00157 #endif // USE_QT
00158 
00159 #ifdef USE_XERCES
00160 
00165     void paramFiller(DOMNode* d);
00166 
00171     void typeFiller(DOMNode* d);
00172 
00177     void bondFiller(DOMNode* d);
00178 
00183     void angleFiller(DOMNode* d);
00184 
00189     void torsionFiller(DOMNode* d);
00190 
00195     void improperFiller(DOMNode* d);
00196 
00201     void hBondFiller(DOMNode* d);
00202 
00207     void equivalAtomFiller(DOMNode* d);
00208 #endif // USE_XERCES
00209 
00213     void updateEquivalentAtoms();
00214 
00215 protected:
00216 
00218     std::string              groupName;
00219 
00221     parameters*              pParameters;
00222 
00224     atomType*                pAtomType;
00225 
00227     bondParam*               pBondParam;
00228 
00230     angleParam*              pAngleParam;
00231 
00233     torsionParam*            pTorsionParam;
00234 
00236     improperParam*           pImproperParam;
00237 
00239     hBondParam*              pHBondParam;
00240 
00242     equivalentAtomsParam*    pEquivalentAtomsParam;
00243 };
00244 
00245 } // MTKpp namespace
00246 
00247 #endif // PARAMPARSER_H

Generated on Fri Dec 23 2011 09:28:51 for MTK++ by Doxygen 1.7.5.1