VTK
|
maintain a connection to an SQLite database More...
#include <vtkSQLiteDatabase.h>
Public Types | |
enum | { USE_EXISTING, USE_EXISTING_OR_CREATE, CREATE_OR_CLEAR, CREATE } |
typedef vtkSQLDatabase | Superclass |
![]() | |
typedef vtkObject | Superclass |
typedef vtkSQLDatabase *(* | CreateFunction) (const char *URL) |
![]() | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkSQLiteDatabase * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | Close () |
bool | IsOpen () |
vtkSQLQuery * | GetQueryInstance () |
vtkStringArray * | GetTables () |
vtkStringArray * | GetRecord (const char *table) |
bool | IsSupported (int feature) |
bool | HasError () |
const char * | GetLastErrorText () |
virtual vtkStdString | GetURL () |
bool | Open (const char *password) |
bool | Open (const char *password, int mode) |
virtual char * | GetDatabaseType () |
virtual char * | GetDatabaseFileName () |
virtual void | SetDatabaseFileName (const char *) |
virtual vtkStdString | GetColumnSpecification (vtkSQLDatabaseSchema *schema, int tblHandle, int colHandle) |
![]() | |
vtkSQLDatabase * | NewInstance () const |
virtual bool | IsSupported (int vtkNotUsed(feature)) |
virtual vtkStdString | GetTablePreamble (bool) |
virtual bool | EffectSchema (vtkSQLDatabaseSchema *, bool dropIfExists=false) |
virtual vtkStdString | GetIndexSpecification (vtkSQLDatabaseSchema *schema, int tblHandle, int idxHandle, bool &skipped) |
virtual vtkStdString | GetTriggerSpecification (vtkSQLDatabaseSchema *schema, int tblHandle, int trgHandle) |
![]() | |
vtkObject * | NewInstance () const |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkSQLiteDatabase * | SafeDownCast (vtkObjectBase *o) |
static vtkSQLiteDatabase * | New () |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkSQLDatabase * | SafeDownCast (vtkObjectBase *o) |
static vtkSQLDatabase * | CreateFromURL (const char *URL) |
static vtkInformationObjectBaseKey * | DATABASE () |
static void | RegisterCreateFromURLCallback (CreateFunction callback) |
static void | UnRegisterCreateFromURLCallback (CreateFunction callback) |
static void | UnRegisterAllCreateFromURLCallbacks () |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkSQLiteDatabase () | |
~vtkSQLiteDatabase () | |
virtual bool | ParseURL (const char *url) |
![]() | |
vtkSQLDatabase () | |
~vtkSQLDatabase () | |
![]() | |
vtkObject () | |
virtual | ~vtkObject () |
virtual void | RegisterInternal (vtkObjectBase *, int check) |
virtual void | UnRegisterInternal (vtkObjectBase *, int check) |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Friends | |
class | vtkSQLiteQuery |
Additional Inherited Members | |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
![]() | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
maintain a connection to an SQLite database
SQLite (http://www.sqlite.org) is a public-domain SQL database written in C++. It's small, fast, and can be easily embedded inside other applications. Its databases are stored in files.
This class provides a VTK interface to SQLite. You do not need to download any external libraries: we include a copy of SQLite 3.3.16 in VTK/Utilities/vtksqlite.
If you want to open a database that stays in memory and never gets written to disk, pass in the URL 'sqlite://:memory:'; otherwise, specifiy the file path by passing the URL 'sqlite://<file_path>'.
Definition at line 62 of file vtkSQLiteDatabase.h.
Definition at line 69 of file vtkSQLiteDatabase.h.
anonymous enum |
Enumerator | |
---|---|
USE_EXISTING | |
USE_EXISTING_OR_CREATE | |
CREATE_OR_CLEAR | |
CREATE |
Definition at line 74 of file vtkSQLiteDatabase.h.
|
protected |
|
protected |
|
static |
|
virtual |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkSQLDatabase.
|
static |
|
protectedvirtual |
Reimplemented from vtkSQLDatabase.
vtkSQLiteDatabase* vtkSQLiteDatabase::NewInstance | ( | ) | const |
|
virtual |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkSQLDatabase.
|
static |
|
virtual |
Open a new connection to the database. You need to set the filename before calling this function. Returns true if the database was opened successfully; false otherwise. - USE_EXISTING (default) - Fail if the file does not exist. - USE_EXISTING_OR_CREATE - Create a new file if necessary. - CREATE_OR_CLEAR - Create new or clear existing file. - CREATE - Create new, fail if file exists.
Implements vtkSQLDatabase.
bool vtkSQLiteDatabase::Open | ( | const char * | password, |
int | mode | ||
) |
Open a new connection to the database. You need to set the filename before calling this function. Returns true if the database was opened successfully; false otherwise. - USE_EXISTING (default) - Fail if the file does not exist. - USE_EXISTING_OR_CREATE - Create a new file if necessary. - CREATE_OR_CLEAR - Create new or clear existing file. - CREATE - Create new, fail if file exists.
|
virtual |
Close the connection to the database.
Implements vtkSQLDatabase.
|
virtual |
Return whether the database has an open connection
Implements vtkSQLDatabase.
|
virtual |
Return an empty query on this database.
Implements vtkSQLDatabase.
|
virtual |
Get the list of tables from the database
Implements vtkSQLDatabase.
|
virtual |
Get the list of fields for a particular table
Implements vtkSQLDatabase.
bool vtkSQLiteDatabase::IsSupported | ( | int | feature | ) |
Return whether a feature is supported by the database.
|
virtual |
Did the last operation generate an error
Implements vtkSQLDatabase.
|
virtual |
Get the last error text from the database
Implements vtkSQLDatabase.
|
virtual |
String representing database type (e.g. "sqlite").
Implements vtkSQLDatabase.
|
virtual |
String representing the database filename.
|
virtual |
String representing the database filename.
|
virtual |
Get the URL of the database.
Implements vtkSQLDatabase.
|
virtual |
Return the SQL string with the syntax to create a column inside a "CREATE TABLE" SQL statement. NB: this method implements the SQLite-specific syntax: <column name>=""> <column type>=""> <column attributes>="">
Reimplemented from vtkSQLDatabase.
|
protectedvirtual |
Overridden to determine connection parameters given the URL. This is called by CreateFromURL() to initialize the instance. Look at CreateFromURL() for details about the URL format.
Implements vtkSQLDatabase.
|
friend |
Definition at line 65 of file vtkSQLiteDatabase.h.