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 */
CifParser::ProcessLsItemValue
void ProcessLsItemValue(void)
CifScannerBase.h
Header file for CifScanner class.
CifParser::ProcessItemValuePair
int ProcessItemValuePair(void)
ISTable
Public class that respresents a two-dimensional table of strings.
Definition: ISTable.h:53
CifParser::ProcessItemName
void ProcessItemName(void)
CifParser::Error
void Error(const char *)
ISTable.h
Header file for ISTable class.
CifFile.h
Header file for CifFile class.
CifParser::ProcessItemValue
void ProcessItemValue(void)
CifScanner
Private class that represents a CIF scanner.
Definition: CifScannerBase.h:48
CifParserInt.h
Header file for bison interfacing to CifParser class.
CifParser
Public class that respresents a CIF parser.
Definition: CifParserBase.h:41
CifParser::ProcessValueList
int ProcessValueList(void)
CifParser::ProcessMissingValue
void ProcessMissingValue(void)
CifParser::~CifParser
virtual ~CifParser()
CifParser::Reset
void Reset()
CifParser::ProcessUnknownValue
void ProcessUnknownValue(void)
CifParser::ProcessLoopDeclaration
int ProcessLoopDeclaration(void)
CifFile
Public class that represents a CIF file, composed of blocks with tables.
Definition: CifFile.h:47
CifParser::ProcessItemNameList
int ProcessItemNameList(void)
CifParser::ProcessDataBlockName
void ProcessDataBlockName(void)
CifParser::ProcessLoop
void ProcessLoop(void)
CifParser::ParseString
void ParseString(const string &cifString, string &diagnostics)
CifParser::Parse
void Parse(const string &fileName, string &diagnostics, const std::string &parseLogFileName=std::string())
CifParser::ProcessAssignments
void ProcessAssignments(void)
CifParser::CifParser
CifParser(CifFile *cifFileP, bool verbose=false)
CifParser::Clear
void Clear()
CifFileReadDef.h
Header file for CifFileReadDef class.
CifFileReadDef
Private class that represents a CIF parser controller.
Definition: CifFileReadDef.h:38