VisualIB
1.0
IBExpress library for making use of Borland IBExpress outside of C++Builder
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
classVIBDataSet.h
Go to the documentation of this file.
1
7
#ifndef CLASSVIBDATASET_H__
8
#define CLASSVIBDATASET_H__
9
10
#include <string>
11
#include "
VIBProperties.h
"
12
13
struct
VIBDataSet
;
14
struct
VIBDatabase
;
15
struct
VIBTransaction
;
16
17
namespace
VIB
18
{
19
class
Database;
20
class
Transaction;
21
26
class
DataSet
27
{
28
protected
:
29
VIBDataSet
*
vds
;
30
31
public
:
37
DataSet
(
VIBDataSet
*pvds = NULL);
41
virtual
~DataSet
();
42
43
// Methods
49
void
Open
();
55
void
First
();
63
void
Next
();
69
void
Close
();
74
void
Prepare
();
79
bool
Eof
();
84
std::string
Plan
();
85
86
// Property classes
87
91
class
FieldByNameClass
92
{
93
protected
:
94
friend
class
DataSet
;
95
DataSet
*
parent
;
96
std::string
fieldname
;
97
public
:
102
FieldByNameClass
(
DataSet
*pParent);
103
109
Property<std::string>
AsString
;
110
};
111
friend
class
FieldByNameClass
;
112
113
114
class
FieldProp
;
115
120
class
FieldClass
121
{
122
protected
:
123
friend
class
FieldProp
;
124
int
index
;
125
DataSet
*
ds
;
126
127
public
:
132
FieldClass
(
DataSet
*pds);
133
138
Property<std::string>
AsString
;
144
Property<VIBFieldType>
DataType
;
150
Property<VIBFieldKind>
FieldKind
;
155
Property<std::string>
FieldName
;
156
};
157
friend
class
FieldClass
;
158
163
class
FieldProp
164
{
165
protected
:
166
FieldClass
fc
;
167
DataSet
*
ds
;
168
169
public
:
174
FieldProp
(
DataSet
*pds) :
ds
(pds),
fc
(pds) {}
175
181
FieldClass
*
operator []
(
int
i)
182
{
183
fc
.
index
= i;
184
fc
.
ds
=
ds
;
185
return
&
fc
;
186
}
187
};
188
192
class
FieldsClass
193
{
194
protected
:
195
DataSet
*
parent
;
196
FieldProp
fp
;
197
198
public
:
199
FieldsClass
(
DataSet
*pParent);
200
206
Property<int>
Count
;
212
ArrayProperty<FieldProp *, FieldClass *>
Fields
;
213
};
214
218
class
SelectSQLClass
219
{
220
protected
:
221
DataSet
*
parent
;
222
223
public
:
228
SelectSQLClass
(
DataSet
*pParent);
229
234
void
Clear
();
240
void
Add
(
const
std::string &str);
241
248
Property<std::string>
Text
;
249
};
250
friend
class
SelectSQLClass
;
251
252
protected
:
253
// Property class instances
254
FieldByNameClass
fbnc
;
255
FieldsClass
fc
;
256
SelectSQLClass
sql
;
257
258
public
:
269
FieldByNameClass
*
FieldByName
(
const
std::string &fieldname);
270
271
// Properties
280
Property<VIBDatabase *>
Database
;
289
Property<int>
FieldCount
;
296
Property<FieldsClass *>
Fields
;
302
Property<SelectSQLClass *>
SelectSQL
;
310
Property<VIBTransaction *>
Transaction
;
315
Property<bool>
UniDirectional
;
316
};
317
}
318
319
#endif
320
321
// EOF
322
VIB
classVIBDataSet.h
Generated on Thu Jun 20 2013 10:46:26 for VisualIB by
1.8.2