UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
dbtutil.h
1 /* dbtutil.h */
2 /* $Id: dbtutil.h,v 1.8 2003/02/14 16:20:08 vlad Exp $ */
3 
4 #ifndef __dbtutil_h
5 
6 #define __dbtutil_h
7 
16 #include <mix/Types.h>
17 #include <mix/ReportTools.h>
18 #include <ldb/dbtc.h>
19 
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 
26 /*************************************************************
27  *
28  * Report tools.
29  *
30  *************************************************************/
31 
32 /* For all columns. */
33 
38 int dbComposedLen (dbHandle db);
39 
44 void dbComposeTitle (dbHandle db, char* szTitle);
45 
50 void dbComposeLine (dbHandle db, int iLineNo, char* szLine);
51 
52 /* For selected columns. */
53 
57 typedef struct
58  {
59  char *column;
62  } dbRtItem;
63 
64 
68 typedef struct
69  {
70  dbHandle dbh;
72  int items_n;
73  int length;
75  } dbRtParams;
76 
77 
83 void dbRtComposedParams (dbRtParams* params, dbHandle db,
84  dbRtItem* items, int items_n);
85 
90 void dbRtComposeTitle (dbRtParams* params, char* szTitle);
91 
96 void dbRtComposeLine (dbRtParams* params, DbIndex line,
97  char* szLine);
98 
99 
100 /*************************************************************
101  *
102  * Search tools.
103  *
104  *************************************************************/
105 
111 Logic dbFFindFloat (dbHandle db, DbIndex* pStartIndex,
112  const char* szColumnName, double value);
113 Logic dbFFindInt (dbHandle db, DbIndex* pStartIndex,
114  const char* szColumnName, int value);
115 Logic dbFFindChar (dbHandle db, DbIndex* pStartIndex,
116  const char* szColumnName, char value);
117 /* Compare is performed by strcmp() */
118 Logic dbFFindString (dbHandle db, DbIndex* pStartIndex,
119  const char* szColumnName, const char* pValue);
120 
126 Logic dbBFindFloat (dbHandle db, DbIndex* pStartIndex,
127  const char* szColumnName, double value);
128 Logic dbBFindInt (dbHandle db, DbIndex* pStartIndex,
129  const char* szColumnName, int value);
130 Logic dbBFindChar (dbHandle db, DbIndex* pStartIndex,
131  const char* szColumnName, char value);
132 /* Compare is performed by strcmp() */
133 Logic dbBFindString (dbHandle db, DbIndex* pStartIndex,
134  const char* szColumnName, const char* pValue);
135 
144 Logic dbQFindFloat (dbHandle db, int* pResultIndex,
145  const char* szColumnName, float value);
146 
147 
152 int dbQFindClosestFloat (dbHandle dbh,
153  const char* szColumnName,
154  float value);
155 
162 float dbInterpolation (dbHandle dbh, const char* szArgument,
163  float fArgument, const char* szTarget);
164 
165 /*************************************************************
166  *
167  * Determines MAX and MIN element in pointed column.
168  * Works only with TV_INT or TV_FLOAT values.
169  *
170  *************************************************************/
171 
177 float dbFindMin (dbHandle dbh,
178  const char* szColumnName);
179 
185 float dbFindMax (dbHandle dbh,
186  const char* szColumnName);
187 
194 float dbFindLocalMin (dbHandle dbh,
195  const char* szColumnName,
196  int iLowIndex,
197  int iHighIndex);
198 
205 float dbFindLocalMax (dbHandle dbh,
206  const char* szColumnName,
207  int iLowIndex,
208  int iHighIndex);
209 
215 int dbFirstFreeNumber (dbHandle dbh,
216  const char* szColumnName);
217 
218 
219 #ifdef __cplusplus
220 };
221 #endif
222 
223 
224 #endif /* dbtutil.h */
int items_n
Definition: dbtutil.h:72
RtAtomField afpar
Definition: dbtutil.h:60
Definition: ReportTools.h:32
dbRtItem * items
Definition: dbtutil.h:71
int length
Definition: dbtutil.h:73
dbHandle dbh
Definition: dbtutil.h:70
Definition: dbtutil.h:57
char * column
Definition: dbtutil.h:59
Definition: dbtutil.h:68