CifParser Class Reference

Public class that respresents a CIF parser. More...

`#include <CifParserBase.h>`

Inheritance diagram for CifParser:
Collaboration diagram for CifParser:

## Public Member Functions

| 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)
Public Member Functions inherited from CifScanner
| CifScanner (std::istream *yyin)
| CifScanner ()
int | ProcessNone ()
void | ProcessWhiteSpace ()
int | ProcessData ()
int | ProcessLoopScanner ()
void | ProcessStop ()
int | ProcessDot ()
int | ProcessQuestion ()
void | ProcessComment ()
int | ProcessUnderscore ()
int | ProcessBadStrings ()
int | ProcessSQuotedStrings ()
int | ProcessDQuotedStrings ()
int | ProcessEof ()
void | Clear ()
void | Reset ()
virtual int | yylex ()
virtual | ~CifScanner ()

## Additional Inherited Members

Public Attributes inherited from CifScanner
int | NDBlineNo
Protected Member Functions inherited from CifScanner
void | alt_yymore (void)
void | OpenLog (const std::string &logName, bool verboseLevel)
Protected Attributes inherited from CifScanner
std::string * | _tBuf
int | _isText
int | _i
int | _j
int | _len
std::ofstream | log
std::string | errorLog
bool | _verbose

## Detailed Description

Public class that respresents a CIF parser.

This class represents a CIF parser. This class utilizes flex/bison for syntax/semantic processing and stores the parsed data (data blocks and tables) in a CifFile object.

## Constructor & Destructor Documentation

CifParser::CifParser | ( | CifFile * | cifFileP,
|  | bool | verbose = `false`
| ) |  |

Constructs a CIF parser.

Parameters

  [in] | cifFileP | - pointer to the CifFile object that the CIF parser is to use to store the parsed data
  [in] | verbose | - optional parameter that indicates whether parsing logging should be turned on (if true) or off (if false). If verbose is not specified, logging is turned off.

Returns
  Not applicable

Precondition
  cifFileP must not be NULL

Postcondition
  None

Exceptions

  EmptyValueException | - if cifFileP is NULL

CifParser::CifParser | ( | CifFile * | cifFileP,
|  | CifFileReadDef | readDef,
|  | bool | verbose = `false`
| ) |  |

Method, not currently part of users public API, and will soon be re-examined.

virtual CifParser::~CifParser | ( |  | ) |

virtual

Destructs a CIF parser by releasing all the used resources.

Parameters

## Member Function Documentation

void CifParser::Clear | ( |  | ) |

Method, not currently part of users public API, and will soon be re-examined.

void CifParser::Error | ( | const char * |  | ) |

Utility method, not part of users public API, and will soon be removed.

void CifParser::Parse | ( | const string & | fileName,
|  | string & | diagnostics,
|  | const std::string & | parseLogFileName = `std::string()`
| ) |  |

Parses the CIF file.

Parameters

  [in] | fileName | - relative or absolute name of the CIF file that is to be parsed.
  [in] | parseLogFileName | - relative or absolute name of the file where parsing log is to be stored. Defaults to "<input-file>-parser.log" if left empty. Use "/dev/null" to disable logging.
  [out] | diagnostics | - parsing result. If empty, parsing completed with no warnings or errors. If non-empty, there were parsing warnings and/or parsing errors.

Returns
  None

Precondition
  None

Postcondition
  None

Exceptions

void CifParser::ParseString | ( | const string & | cifString,
|  | string & | diagnostics
| ) |  |

Parses the CIF data in a string.

Parameters

  [in] | cifString | - a string that contains CIF data that is to be parsed.
  [out] | diagnostics | - parsing result. If empty, parsing completed with no warnings or errors. If non-empty, there were parsing warnings and/or parsing errors.

Returns
  None

Precondition
  None

Postcondition
  None

Exceptions

void CifParser::ProcessAssignments | ( | void |  | ) |

Utility method, not part of users public API, and will soon be removed.

void CifParser::ProcessDataBlockName | ( | void |  | ) |

Utility method, not part of users public API, and will soon be removed.

void CifParser::ProcessItemName | ( | void |  | ) |

Utility method, not part of users public API, and will soon be removed.

int CifParser::ProcessItemNameList | ( | void |  | ) |

Utility method, not part of users public API, and will soon be removed.

void CifParser::ProcessItemValue | ( | void |  | ) |

Utility method, not part of users public API, and will soon be removed.

int CifParser::ProcessItemValuePair | ( | void |  | ) |

Utility method, not part of users public API, and will soon be removed.

void CifParser::ProcessLoop | ( | void |  | ) |

Utility method, not part of users public API, and will soon be removed.

int CifParser::ProcessLoopDeclaration | ( | void |  | ) |

Utility method, not part of users public API, and will soon be removed.

void CifParser::ProcessLsItemValue | ( | void |  | ) |

Utility method, not part of users public API, and will soon be removed.

void CifParser::ProcessMissingValue | ( | void |  | ) |

Utility method, not part of users public API, and will soon be removed.

void CifParser::ProcessUnknownValue | ( | void |  | ) |

Utility method, not part of users public API, and will soon be removed.

int CifParser::ProcessValueList | ( | void |  | ) |

Utility method, not part of users public API, and will soon be removed.

void CifParser::Reset | ( |  | ) |

Method, not currently part of users public API, and will soon be re-examined.

The documentation for this class was generated from the following file:

- rcsb/CifParserBase.h