Kexi API Documentation (2.0 alpha)

KexiDB::SimpleCommandLineApp Class Reference

#include <simplecommandlineapp.h>

Inheritance diagram for KexiDB::SimpleCommandLineApp:

KexiDB::Object List of all members.

Detailed Description

A skeleton for creating a simple command line database application.

This class creates a KInstance object and automatically handles the following command line options:

You can use this helper class to create test applications or small tools that open a KexiDB-compatible database using command line arguments, do some data processing and close the database.

Definition at line 46 of file simplecommandlineapp.h.

Public Member Functions

 SimpleCommandLineApp (int argc, char **argv, KCmdLineOptions *options, const char *programName, const char *version, const char *shortDescription=0, int licenseType=KAboutData::License_Unknown, const char *copyrightStatement=0, const char *text=0, const char *homePageAddress=0, const char *bugsEmailAddress="submit@bugs.kde.org")
 ~SimpleCommandLineApp ()
KInstance * instance () const
bool openDatabase (const QString &databaseName)
bool closeDatabase ()
KexiDB::ConnectionDataconnectionData () const
KexiDB::Connectionconnection () const

Protected Attributes

Private *const d
 for future extensions


Constructor & Destructor Documentation

KexiDB::SimpleCommandLineApp::SimpleCommandLineApp int  argc,
char **  argv,
KCmdLineOptions *  options,
const char *  programName,
const char *  version,
const char *  shortDescription = 0,
int  licenseType = KAboutData::License_Unknown,
const char *  copyrightStatement = 0,
const char *  text = 0,
const char *  homePageAddress = 0,
const char *  bugsEmailAddress = "submit@bugs.kde.org"
 

KexiDB::SimpleCommandLineApp::~SimpleCommandLineApp  ) 
 


Member Function Documentation

bool KexiDB::SimpleCommandLineApp::closeDatabase  ) 
 

Closes database connection previously opened using openDatabase()

Returns:
true on success. This method is called on destruction. Use KexiDB::Object methods to get status of the operation on failure.

Referenced by SimpleCommandLineApp::openDatabase(), and SimpleCommandLineApp::~SimpleCommandLineApp().

KexiDB::Connection* KexiDB::SimpleCommandLineApp::connection  )  const
 

Returns:
connection object for this application or 0 if there is no properly opened connection.

KexiDB::ConnectionData* KexiDB::SimpleCommandLineApp::connectionData  )  const
 

Returns:
connection data for this application.

KInstance* KexiDB::SimpleCommandLineApp::instance  )  const
 

Returns:
program instance

bool KexiDB::SimpleCommandLineApp::openDatabase const QString databaseName  ) 
 

Opens database databaseName for connection data specified via the command line.

Returns:
true in success. In details: the database driver is loaded, the connection is opened and the database is used. Use KexiDB::Object methods to get status of the operation on failure.


Member Data Documentation

Private* const KexiDB::SimpleCommandLineApp::d [protected]
 

for future extensions

Reimplemented from KexiDB::Object.

Definition at line 81 of file simplecommandlineapp.h.

Referenced by SimpleCommandLineApp::closeDatabase(), SimpleCommandLineApp::connection(), SimpleCommandLineApp::connectionData(), SimpleCommandLineApp::instance(), SimpleCommandLineApp::openDatabase(), and SimpleCommandLineApp::~SimpleCommandLineApp().


The documentation for this class was generated from the following file:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:48 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003