MySQL++ Reference Manual

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | List of all members
mysqlpp::ssqlsxlat::CommandLine Class Reference

Command line parser for MySQL++'s ssqlsxlat tool. More...

`#include <cmdline.h>`

Inheritance diagram for mysqlpp::ssqlsxlat::CommandLine:
[legend]
Collaboration diagram for mysqlpp::ssqlsxlat::CommandLine:
[legend]

## Public Types
enum | SourceSink { ss_unknown, ss_ssqls1, ss_ssqls2, ss_table }
| Types of inputs that ssqlsxlat will accept. More...
Public Types inherited from mysqlpp::CommandLineBase
typedef std::vector< std::string > | ArgumentList
| Type for a list of arguments. More...
typedef ArgumentList::const_iterator | ArgumentListIt
| Iterator into ArgumentList.

## Public Member Functions
| CommandLine (int argc, char *const argv[])
| Constructor. More...
void | print_usage () const
| Show a message explaining the program's proper usage.
const char * | input () const
| Return the name of the input source. More...
SourceSink | input_source () const
| The input source type.
SourceSink | output_sink () const
| The output sink (destination) type.
const char * | output () const
| The base name of the output file.
const char * | pass () const
| DB password, when input type is is_table.
const char * | server () const
| DB server name, when input type is is_table.
const char * | user () const
| DB user name, when input type is is_table.
Public Member Functions inherited from mysqlpp::CommandLineBase
const ArgumentList & | extra_args () const
| Get reference to list of command line arguments past the last flag and its possible argument. More...
| operator void * () const
| Return truthy value if command line was parsed successfully.

## Additional Inherited Members
Protected Member Functions inherited from mysqlpp::CommandLineBase
| CommandLineBase (int argc, char *const argv[], const char *opts)
| Hidden ctor to prevent instantiation. More...
virtual | ~CommandLineBase ()
| Hidden dtor to prevent instantiation.
void | finish_parse ()
| If object is still marked as "successful", save non-option arguments to extra_args_ list. Subclass ctor should call this after the parse_next() loop gets EOF.
const char * | option_argument () const
| Accessor for getopt()'s optarg global.
int | option_index () const
| Accessor for getopt()'s optind global.
void | parse_error (const char *message=0)
| Called by a subclass when encountering a command line parsing error. More...
int | parse_next () const
| Wrapper for getopt()
const char * | program_name () const
| Get the file name of the program's executable.
bool | successful () const
| Returns true if nothing has gone wrong since calling the ctor.

## Detailed Description

Command line parser for MySQL++'s ssqlsxlat tool.

## Member Enumeration Documentation

enum mysqlpp::ssqlsxlat::CommandLine::SourceSink

Types of inputs that ssqlsxlat will accept.

Public types

Enumerator
ss_unknown | no known input type given yet
ss_ssqls1 | a C++ file containing an SSQLS v1 declaration
ss_ssqls2 | an SSQLS v2 file
ss_table | an existing DB table schema

## Constructor & Destructor Documentation

mysqlpp::ssqlsxlat::CommandLine::CommandLine | ( | int | argc,
|  | char *const | argv[]
| ) |  |

Constructor.

Public interface

References mysqlpp::CommandLineBase::finish_parse(), mysqlpp::CommandLineBase::option_argument(), mysqlpp::CommandLineBase::parse_error(), mysqlpp::CommandLineBase::parse_next(), ss_ssqls1, ss_ssqls2, ss_table, ss_unknown, and mysqlpp::CommandLineBase::successful().

## Member Function Documentation

const char* mysqlpp::ssqlsxlat::CommandLine::input | ( |  | ) | const
| inline

Return the name of the input source.

This can be a file name, a table name, etc. Call input_source() to determine the proper interpretation.

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

- cmdline.h
- cmdline.cpp