CifParserBase.h

Go to the documentation of this file.
00001 //$$FILE$$
00002 //$$VERSION$$
00003 //$$DATE$$
00004 //$$LICENSE$$
00005 /* 
00006   PURPOSE:    A DDL 2.1 compliant CIF file parser.
00007 */
00008 
00009 #ifndef CIF_PARSER_BASE_H
00010 #define CIF_PARSER_BASE_H
00011 
00012 #include <iostream>
00013 #include <stdio.h>
00014 #include <stdlib.h>
00015 #include <string.h>
00016 #include "CifScannerBase.h"
00017 #include "CifParserInt.h"
00018 #include "CifFileReadDef.h"
00019 #include "ISTable.h"
00020 
00021 #define  DATA_TAG "data_"
00022 
00023 class TableFile;
00024 
00025 
00026 class CifParser:public CifScanner
00027 {
00028     private:
00029         string _uString;
00030         string _mString;
00031         TableFile *_fobj;
00032         CifFileReadDef _readDef;
00033         ISTable *_tbl;
00034         int _afterLoop;
00035         int _nTablesInBlock;
00036         int _curItemNo, _curValueNo, _numDataBlocks, _fieldListAlloc, _curRow;
00037         string _curCol;
00038         vector<string> _fieldList;
00039         string _pBufValue;
00040         vector<string>  * _rowBuf;
00041         string _tBufKeyword;
00042         string _curCategoryName;
00043         string _curDataBlockName;
00044         string _prevDataBlockName;
00045         void _ComplexWriteTable();
00046     public:
00047         CifParser(TableFile *fo, int verbose, CifFileReadDef readDef);
00048         void Parse(const string& fileName, string& diagnostics);
00049         void Error(const char*);
00050         void Clear();
00051         void Reset();
00052         int ProcessLoopDeclaration(void);
00053         int ProcessItemNameList(void);
00054         int ProcessValueList(void);
00055         int ProcessItemValuePair(void);
00056         void ProcessAssignments(void);
00057         void ProcessLoop(void);
00058         void ProcessItemName(void);
00059         void ProcessItemValue(void);
00060         void ProcessLsItemValue(void);
00061         void ProcessUnknownValue(void);
00062         void ProcessMissingValue(void);
00063         void ProcessDataBlockName(void);
00064         string errorLog;
00065         int _err, _warn;
00066         virtual ~CifParser();
00067 };
00068  
00069 #endif /* CIF_PARSER_BASE_H */

Generated on Mon Apr 2 09:28:52 2007 for cifparse-obj-v7.0 by  doxygen 1.5.1