CifParserBase.h

Go to the documentation of this file.
00001 //$$FILE$$
00002 //$$VERSION$$
00003 //$$DATE$$
00004 //$$LICENSE$$
00005 
00006 
00014 #ifndef CIF_PARSER_BASE_H
00015 #define CIF_PARSER_BASE_H
00016 
00017 
00018 #include <iostream>
00019 #include <stdio.h>
00020 #include <stdlib.h>
00021 #include <string.h>
00022 #include "ISTable.h"
00023 #include "CifFile.h"
00024 #include "CifScannerBase.h"
00025 #include "CifParserInt.h"
00026 #include "CifFileReadDef.h"
00027 
00028 
00029 #define  DATA_TAG "data_"
00030 
00031 
00041 class CifParser : public CifScanner
00042 {
00043     public:
00061         CifParser(CifFile* cifFileP, bool verbose = false);
00062 
00067         CifParser(CifFile* cifFileP, CifFileReadDef readDef,
00068           bool verbose = false);
00069 
00089         void Parse(const string& fileName, string& diagnostics,
00090           const std::string& parseLogFileName = std::string());
00091 
00109         void ParseString(const string& cifString, string& diagnostics);
00110 
00124         virtual ~CifParser();
00125 
00130         void Error(const char*);
00131 
00136         void Clear();
00137 
00142         void Reset();
00143 
00148         int ProcessLoopDeclaration(void);
00149 
00154         int ProcessItemNameList(void);
00155 
00160         int ProcessValueList(void);
00161 
00166         int ProcessItemValuePair(void);
00167 
00172         void ProcessAssignments(void);
00173 
00178         void ProcessLoop(void);
00179 
00184         void ProcessItemName(void);
00185 
00190         void ProcessItemValue(void);
00191 
00196         void ProcessLsItemValue(void);
00197 
00202         void ProcessUnknownValue(void);
00203 
00208         void ProcessMissingValue(void);
00209 
00214         void ProcessDataBlockName(void);
00215 
00216     private:
00217         CifFile *_fobj;
00218         CifFileReadDef _readDef;
00219         ISTable *_tbl;
00220         int _afterLoop;
00221         int _nTablesInBlock;
00222         int _curItemNo, _curValueNo, _numDataBlocks, _fieldListAlloc, _curRow;
00223         vector<string> _fieldList;
00224         string _pBufValue;
00225         string _tBufKeyword;
00226         string _curCategoryName;
00227         string _curDataBlockName;
00228         string _prevDataBlockName;
00229         void _ComplexWriteTable();
00230 
00231         int _err, _warn;
00232 };
00233  
00234 #endif /* CIF_PARSER_BASE_H */

Generated on Thu Sep 29 09:19:23 2011 for cif-parser-v7.1.0 by  doxygen 1.4.7