MySQL++ Reference Manual

MySQL++ SSQLS v2 Translator: ParseV2 Class Reference

MySQL++ SSQLS v2 Translator 3.3.0

Classes | Public Types | Public Member Functions | List of all members
ParseV2 Class Reference

Parses SSQLS v2 documents and holds the parse result. More...

`#include <parsev2.h>`

## Classes
class | AccessorStyleOption
| 'option accessor_style' directive line More...
class | ExceptionOnSchemaMismatchOption
| 'option exception_on_schema_mismatch' directive line More...
class | Field
| 'field' directive line More...
class | File
| Holds information about an SSQLS v2 file we're parsing. More...
class | FileException
| Exception object thrown to indicate a file I/O error. More...
class | HeaderExtensionOption
| 'option header_extension' directive line More...
class | ImplementationExtensionOption
| 'option implementation_extension' directive line More...
class | Include
| 'include' directive line More...
class | Line
| Base class for parsed SSQLS v2 declaration lines. More...
class | Option
| Base class for known SSQLS v2 'option' directives. More...
class | ParseException
| Exception object thrown by File::error() to report an SSQLS v2 parsing error. More...
class | Table
| 'table' directive line More...

## Public Types
typedef std::vector< std::string > | StringList
| List of tokens as returned by boost::algorithm::split.
typedef StringList::const_iterator | StringListIt
| Iterator into a StringList. More...
typedef std::vector< Line * > | LineList
| A list of pointers to Line objects. More...
typedef LineList::const_iterator | LineListIt
| Iterator into a LineList. More...

## Public Member Functions
| ParseV2 (const char *file_name)
| Constructor. More...
| ~ParseV2 ()
| Destructor.
LineListIt | begin () const
| Get an iterator pointing to the start of our LineList.
void | clear ()
| Dump our line list. More...
LineListIt | end () const
| Get an iterator pointing just past the end of our LineList.

## Detailed Description

Parses SSQLS v2 documents and holds the parse result.

Construct an object of this type from a file name, and you will get either a parse result or a thrown exception.

## Member Typedef Documentation

## ◆ LineList

typedef std::vector<Line*> ParseV2::LineList

A list of pointers to Line objects.

These are used for holding the results of the file parsing step

## ◆ LineListIt

typedef LineList::const_iterator ParseV2::LineListIt

Iterator into a LineList.

It's const because once the parse is completed, we switch into LineList traversal mode, which doesn't modify the list.

## ◆ StringListIt

typedef StringList::const_iterator ParseV2::StringListIt

Iterator into a StringList.

This is const because StringLists are never modified once created

## Constructor & Destructor Documentation

## ◆ ParseV2()

ParseV2::ParseV2 | ( | const char * | file_name | ) |

Constructor.

Given the name of an SSQLS v2 file, load it up and try to parse it, throwing one of our inner exception types if that fails.

Parameters

  file_name | path to an SSQLS v2 file to parse; may be in a different directory, given a relative or absolute path to the file

Exceptions

  FileException |
  ParseException |

References ParseV2::Include::begin(), ParseV2::Include::end(), ParseV2::Line::parse(), and ParseV2::File::read_line().

## Member Function Documentation

## ◆ clear()

void ParseV2::clear | ( |  | ) |
| inline

Dump our line list.

Doesn't delete the line objects. This is used by Include, because its creator will take over ownership of those objects.

Referenced by ParseV2::Include::~Include().

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

- parsev2.h
- parsev2.cpp