Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / api / database / database_API.h
1
2 /*
3 MAN dtb_Load
4 CATEG gns
5 DESCRIPTION
6 dtb_Load(<database>) creates a new data base named <database>. If the database was already created, it will be cleaned.
7 RETURN VALUE
8 none.
9 ERRORS
10 none.
11 SEE ALSO
12 dtb_Save, dtb_Clean, dtb_Create
13 */
14 int dtb_Load(char *name);
15
16
17 /*
18 MAN dtb_Save
19 CATEG gns
20 DESCRIPTION
21 dtb_Save(<database>) saves the <database> to a file. The file name will be .<database>.dtb and can be found in the current directory.
22 RETURN VALUE
23 none.
24 ERRORS
25 none.
26 SEE ALSO
27 dtb_Clean, dtb_Load, dtb_Create
28 */
29 void dtb_Save(char *name);
30
31
32 /*
33 MAN dtb_Clean
34 CATEG gns
35 DESCRIPTION
36 dtb_Clean(<database>) removes of entries in the <database>.
37 RETURN VALUE
38 none.
39 ERRORS
40 none.
41 SEE ALSO
42 dtb_Save, dtb_Load, dtb_Create
43 */
44 void dtb_Clean(char *name);
45
46
47 /*
48 MAN dtb_SetChar
49 CATEG gns
50 DESCRIPTION
51 dtb_SetChar(<database>, <varname>, <value>) creates or updates the entry <varname> in the <database> with the value <value> expressed as a character. In case of type mismatch, the old type will be overriden.
52 RETURN VALUE
53 none.
54 ERRORS
55 none.
56 SEE ALSO
57 dtb_SetString, dtb_SetLong, dtb_SetDouble, dtb_SetInt
58 */
59 void dtb_SetChar(char *dbtname, char *name, char value);
60
61
62 /*
63 MAN dtb_SetString
64 CATEG gns
65 DESCRIPTION
66 dtb_SetString(<database>, <varname>, <value>) creates or updates the entry <varname> in the <database> with the value <value> expressed as a string. In case of type mismatch, the old type will be overriden.
67 RETURN VALUE
68 none.
69 ERRORS
70 none.
71 SEE ALSO
72 dtb_SetChar, dtb_SetLong, dtb_SetDouble, dtb_SetInt
73 */
74 void dtb_SetString(char *dbtname, char *name, char *value);
75
76
77 /*
78 MAN dtb_SetLong
79 CATEG gns
80 DESCRIPTION
81 dtb_SetLong(<database>, <varname>, <value>) creates or updates the entry <varname> in the <database> with the value <value> expressed as a long integer. In case of type mismatch, the old type will be overriden.
82 RETURN VALUE
83 none.
84 ERRORS
85 none.
86 SEE ALSO
87 dtb_SetChar, dtb_SetString, dtb_SetDouble, dtb_SetInt
88 */
89 void dtb_SetLong(char *dbtname, char *name, long value);
90
91
92 /*
93 MAN dtb_SetInt
94 CATEG gns
95 DESCRIPTION
96 dtb_SetInt(<database>, <varname>, <value>) creates or updates the entry <varname> in the <database> with the value <value> expressed as an integer. In case of type mismatch, the old type will be overriden.
97 RETURN VALUE
98 none.
99 ERRORS
100 none.
101 SEE ALSO
102 dtb_SetChar, dtb_SetString, dtb_SetLong, dtb_SetDouble
103 */
104 void dtb_SetInt(char *dbtname, char *name, int value);
105
106
107 /*
108 MAN dtb_SetDouble
109 CATEG gns
110 DESCRIPTION
111 dtb_SetDouble(<database>, <varname>, <value>) creates or updates the entry <varname> in the <database> with the value <value> expressed as a double. In case of type mismatch, the old type will be overriden.
112 RETURN VALUE
113 none.
114 ERRORS
115 none.
116 SEE ALSO
117 dtb_SetChar, dtb_SetString, dtb_SetLong, dtb_SetInt
118 */
119 void dtb_SetDouble(char *dtbname, char *name, double value);
120
121
122 /*
123 MAN dtb_GetDouble
124 CATEG gns
125 DESCRIPTION
126 dtb_GetDouble(<database>, <varname>) returns the double value of the entry <varname> in the <database>. If the entry does not exist or the type mismatchs, 0.0 is returned.
127 RETURN VALUE
128 resurns a double.
129 ERRORS
130 none.
131 SEE ALSO
132 dtb_GetChar, dtb_GetString, dtb_GetLong, dtb_GetInt
133 */
134 double dtb_GetDouble(char *dtbname, char *name);
135
136
137 /*
138 MAN dtb_GetInt
139 CATEG gns
140 DESCRIPTION
141 dtb_GetInt(<database>, <varname>) returns the integer value of the entry <varname> in the <database>. If the entry does not exist or the type mismatchs, 0 is returned.
142 RETURN VALUE
143 resurns an int.
144 ERRORS
145 none.
146 SEE ALSO
147 dtb_GetChar, dtb_GetString, dtb_GetLong, dtb_GetDouble
148 */
149 int dtb_GetInt(char *dtbname, char *name);
150
151
152 /*
153 MAN dtb_GetLong
154 CATEG gns
155 DESCRIPTION
156 dtb_GetLong(<database>, <varname>) returns the long integer value of the entry <varname> in the <database>. If the entry does not exist or the type mismatchs, 0 is returned.
157 RETURN VALUE
158 resurns a long int.
159 ERRORS
160 none.
161 SEE ALSO
162 dtb_GetChar, dtb_GetString, dtb_GetDouble, dtb_GetInt
163 */
164 long dtb_GetLong(char *dtbname, char *name);
165
166
167 /*
168 MAN dtb_GetString
169 CATEG gns
170 DESCRIPTION
171 dtb_GetString(<database>, <varname>) returns the string value of the entry <varname> in the <database>. If the entry does not exist or the type mismatchs, NULL is returned.
172 RETURN VALUE
173 resurns a string.
174 ERRORS
175 none.
176 SEE ALSO
177 dtb_GetChar, dtb_GetLong, dtb_GetDouble, dtb_GetInt
178 */
179 char *dtb_GetString(char *dtbname, char *name);
180
181
182 /*
183 MAN dtb_GetChar
184 CATEG gns
185 DESCRIPTION
186 dtb_Getchar(<database>, <varname>) returns the character value of the entry <varname> in the <database>. If the entry does not exist or the type mismatchs, ' ' is returned.
187 RETURN VALUE
188 resurns a char.
189 ERRORS
190 none.
191 SEE ALSO
192 dtb_GetString, dtb_GetLong, dtb_GetDouble, dtb_GetInt
193 */
194 char dtb_GetChar(char *dtbname, char *name);
195
196
197 /*
198 MAN dtb_RemoveEntry
199 CATEG gns
200 DESCRIPTION
201 dtb_RemoveEntry(<database>, <varname>) removes the entry <varname> from the <database>. If the entry does not exist, nothing is done.
202 RETURN VALUE
203 none.
204 ERRORS
205 none.
206 */
207 void dtb_RemoveEntry(char *dtbname, char *name);
208
209 /*
210 MAN dtb_Create
211 CATEG gns
212 DESCRIPTION
213 dtb_Create(<database>) creates a new database named <database>. If the database already exits, the function call has no effects.
214 RETURN VALUE
215 none.
216 ERRORS
217 none.
218 SEE ALSO
219 dtb_Load, dtb_Save, , dtb_Clean
220 */
221 void dtb_Create(char *name);
222
223 void database_API_AtLoad_Initialize();