CifParserBase.h
Go to the documentation of this file.
//$$FILE$$
//$$VERSION$$
//$$DATE$$
//$$LICENSE$$
#ifndef CIF_PARSER_BASE_H
#define CIF_PARSER_BASE_H
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <rcsb/ISTable.h>
#include <rcsb/CifFile.h>
#include <rcsb/CifScannerBase.h>
#include <rcsb/CifParserInt.h>
#include <rcsb/CifFileReadDef.h>
#define DATA_TAG "data_"
class CifParser : public CifScanner
{
public:
CifParser(CifFile* cifFileP, bool verbose = false);
CifParser(CifFile* cifFileP, CifFileReadDef readDef,
bool verbose = false);
void Parse(const string& fileName, string& diagnostics,
const std::string& parseLogFileName = std::string());
void ParseString(const string& cifString, string& diagnostics);
virtual ~CifParser();
void Error(const char*);
void Clear();
void Reset();
int ProcessLoopDeclaration(void);
int ProcessItemNameList(void);
int ProcessValueList(void);
int ProcessItemValuePair(void);
void ProcessAssignments(void);
void ProcessLoop(void);
void ProcessItemName(void);
void ProcessItemValue(void);
void ProcessLsItemValue(void);
void ProcessUnknownValue(void);
void ProcessMissingValue(void);
void ProcessDataBlockName(void);
private:
CifFile *_fobj;
CifFileReadDef _readDef;
ISTable *_tbl;
int _afterLoop;
int _nTablesInBlock;
int _curItemNo, _curValueNo, _numDataBlocks, _fieldListAlloc, _curRow;
vector<string> _fieldList;
string _pBufValue;
string _tBufKeyword;
string _curCategoryName;
string _curDataBlockName;
string _prevDataBlockName;
void _ComplexWriteTable();
int _err, _warn;
};
#endif /* CIF_PARSER_BASE_H */