VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
IO
SQL
vtkSQLiteDatabase.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkSQLiteDatabase.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
15
/*-------------------------------------------------------------------------
16
Copyright 2008 Sandia Corporation.
17
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18
the U.S. Government retains certain rights in this software.
19
-------------------------------------------------------------------------*/
51
#ifndef __vtkSQLiteDatabase_h
52
#define __vtkSQLiteDatabase_h
53
54
#include "vtkIOSQLModule.h"
// For export macro
55
#include "
vtkSQLDatabase.h
"
56
57
class
vtkSQLQuery
;
58
class
vtkSQLiteQuery
;
59
class
vtkStringArray
;
60
struct
vtk_sqlite3;
61
62
class
VTKIOSQL_EXPORT
vtkSQLiteDatabase
:
public
vtkSQLDatabase
63
{
64
//BTX
65
friend
class
vtkSQLiteQuery
;
66
//ETX
67
68
public
:
69
vtkTypeMacro(
vtkSQLiteDatabase
,
vtkSQLDatabase
);
70
void
PrintSelf
(ostream& os,
vtkIndent
indent);
71
static
vtkSQLiteDatabase
*
New
();
72
73
//BTX
74
enum
{
75
USE_EXISTING
,
76
USE_EXISTING_OR_CREATE
,
77
CREATE_OR_CLEAR
,
78
CREATE
79
};
80
//ETX
81
83
89
bool
Open
(
const
char
* password);
90
bool
Open
(
const
char
* password,
int
mode
);
92
94
void
Close
();
95
97
bool
IsOpen
();
98
100
vtkSQLQuery
*
GetQueryInstance
();
101
103
vtkStringArray
*
GetTables
();
104
106
vtkStringArray
*
GetRecord
(
const
char
*table);
107
109
bool
IsSupported
(
int
feature);
110
112
bool
HasError
();
113
115
const
char
*
GetLastErrorText
();
116
118
119
vtkGetStringMacro
(DatabaseType);
121
123
124
vtkGetStringMacro
(DatabaseFileName);
125
vtkSetStringMacro(DatabaseFileName);
127
129
virtual
vtkStdString
GetURL
();
130
132
136
virtual
vtkStdString
GetColumnSpecification
(
vtkSQLDatabaseSchema
* schema,
137
int
tblHandle,
138
int
colHandle );
140
141
protected
:
142
vtkSQLiteDatabase
();
143
~
vtkSQLiteDatabase
();
144
148
virtual
bool
ParseURL
(
const
char
*
url
);
149
150
private
:
151
vtk_sqlite3 *SQLiteInstance;
152
153
// We want this to be private, a user of this class
154
// should not be setting this for any reason
155
vtkSetStringMacro(DatabaseType);
156
157
vtkStringArray
*Tables;
158
159
char
* DatabaseType;
160
char
* DatabaseFileName;
161
162
vtkStdString
TempURL;
163
164
vtkSQLiteDatabase
(
const
vtkSQLiteDatabase
&);
// Not implemented.
165
void
operator=(
const
vtkSQLiteDatabase
&);
// Not implemented.
166
};
167
168
#endif // __vtkSQLiteDatabase_h
169
Generated on Thu May 24 2012 22:22:32 for VTK by
1.8.1