1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>QOF: Objects</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6-20040222 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<h1>Objects<br>
<small>
[<a class="el" href="group__Object.html">Object: Dynamic Object Class Framework</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
QOF Objects provide the means for associating a storage backend to a set of QOF Entities. While an entity can be though of as an identified instance of some thing, the QOF Object provides for a way to associate instances with a storage backend. Storage might be file or SQL storage.<p>
QOF Objects are also used by the query system ....<p>
XXX todo, we should split out the storage aspects of this thing from the 'foreach' that query depends on. These are kinad unrelated concepts.
<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>file </td><td class="memItemRight" valign=bottom><a class="el" href="qofobject_8h.html">qofobject.h</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">the Core Object Registration/Lookup Interface <br><br></td></tr>
<p>
<tr><td colspan=2><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>struct </td><td class="memItemRight" valign=bottom><a class="el" href="struct__QofObject.html">_QofObject</a></td></tr>
<tr><td colspan=2><br><h2>Initialize the object registration subsystem</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga4" doxytag="Objects::qof_object_initialize" ></a>
void </td><td class="memItemRight" valign=bottom><b>qof_object_initialize</b> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga5" doxytag="Objects::qof_object_shutdown" ></a>
void </td><td class="memItemRight" valign=bottom><b>qof_object_shutdown</b> (void)</td></tr>
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__Objects.html#ga16">QOF_OBJECT_VERSION</a> 1</td></tr>
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga0" doxytag="Objects::QofObject" ></a>
typedef <a class="el" href="struct__QofObject.html">_QofObject</a> </td><td class="memItemRight" valign=bottom><b>QofObject</b></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga1" doxytag="Objects::QofForeachCB" ></a>
typedef void(* </td><td class="memItemRight" valign=bottom><b>QofForeachCB</b> )(gpointer obj, gpointer user_data)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga2" doxytag="Objects::QofForeachTypeCB" ></a>
typedef void(* </td><td class="memItemRight" valign=bottom><b>QofForeachTypeCB</b> )(<a class="el" href="struct__QofObject.html">QofObject</a> *type, gpointer user_data)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga3" doxytag="Objects::QofForeachBackendTypeCB" ></a>
typedef void(* </td><td class="memItemRight" valign=bottom><b>QofForeachBackendTypeCB</b> )(QofIdTypeConst type, gpointer backend_data, gpointer user_data)</td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>gboolean </td><td class="memItemRight" valign=bottom><a class="el" href="group__Objects.html#ga6">qof_object_register</a> (const <a class="el" href="struct__QofObject.html">QofObject</a> *object)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="struct__QofObject.html">QofObject</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Objects.html#ga7">qof_object_lookup</a> (QofIdTypeConst type_name)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>gpointer </td><td class="memItemRight" valign=bottom><a class="el" href="group__Objects.html#ga8">qof_object_new_instance</a> (QofIdTypeConst type_name, <a class="el" href="struct__QofBook.html">QofBook</a> *book)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const char * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Objects.html#ga9">qof_object_get_type_label</a> (QofIdTypeConst type_name)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const char * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Objects.html#ga10">qof_object_printable</a> (QofIdTypeConst type_name, gpointer instance)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Objects.html#ga11">qof_object_foreach_type</a> (QofForeachTypeCB cb, gpointer user_data)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Objects.html#ga12">qof_object_foreach</a> (QofIdTypeConst type_name, <a class="el" href="struct__QofBook.html">QofBook</a> *book, <a class="el" href="group__Entities.html#ga4">QofEntityForeachCB</a> cb, gpointer user_data)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>gboolean </td><td class="memItemRight" valign=bottom><a class="el" href="group__Objects.html#ga13">qof_object_register_backend</a> (QofIdTypeConst type_name, const char *backend_name, gpointer be_data)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga14" doxytag="Objects::qof_object_lookup_backend" ></a>
gpointer </td><td class="memItemRight" valign=bottom><b>qof_object_lookup_backend</b> (QofIdTypeConst type_name, const char *backend_name)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga15" doxytag="Objects::qof_object_foreach_backend" ></a>
void </td><td class="memItemRight" valign=bottom><b>qof_object_foreach_backend</b> (const char *backend_name, QofForeachBackendTypeCB cb, gpointer user_data)</td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="ga16" doxytag="qofobject.h::QOF_OBJECT_VERSION" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define QOF_OBJECT_VERSION 1
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Defines the version of the core object object registration interface. Only object modules compiled against this version of the interface will load properly </td>
</tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga12" doxytag="qofobject.h::qof_object_foreach" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_object_foreach </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">QofIdTypeConst </td>
<td class="mdname" nowrap> <em>type_name</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname" nowrap> <em>book</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__Entities.html#ga4">QofEntityForeachCB</a> </td>
<td class="mdname" nowrap> <em>cb</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>gpointer </td>
<td class="mdname" nowrap> <em>user_data</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Invoke the callback 'cb' on every instance ov a particular object type. It is presumed that the 'book' stores or somehow identifies a colllection of instances; thus the callback will be invoked only for those instances stored in the book. </td>
</tr>
</table>
<a class="anchor" name="ga11" doxytag="qofobject.h::qof_object_foreach_type" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_object_foreach_type </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">QofForeachTypeCB </td>
<td class="mdname" nowrap> <em>cb</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>gpointer </td>
<td class="mdname" nowrap> <em>user_data</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Invoke the callback 'cb' on every object class definition. The user_data pointer is passed back to the callback. </td>
</tr>
</table>
<a class="anchor" name="ga9" doxytag="qofobject.h::qof_object_get_type_label" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const char* qof_object_get_type_label </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">QofIdTypeConst </td>
<td class="mdname1" valign="top" nowrap> <em>type_name</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Get the printable label for a type. This label is *not* translated; you must use _() on it if you want a translated version. </td>
</tr>
</table>
<a class="anchor" name="ga7" doxytag="qofobject.h::qof_object_lookup" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const <a class="el" href="struct__QofObject.html">QofObject</a>* qof_object_lookup </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">QofIdTypeConst </td>
<td class="mdname1" valign="top" nowrap> <em>type_name</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Lookup an object definition </td>
</tr>
</table>
<a class="anchor" name="ga8" doxytag="qofobject.h::qof_object_new_instance" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> gpointer qof_object_new_instance </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">QofIdTypeConst </td>
<td class="mdname" nowrap> <em>type_name</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname" nowrap> <em>book</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Create an instance of the indicated type, returning a pointer to that instance. This routine just calls the (*new) callback on the object definition. </td>
</tr>
</table>
<a class="anchor" name="ga10" doxytag="qofobject.h::qof_object_printable" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const char* qof_object_printable </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">QofIdTypeConst </td>
<td class="mdname" nowrap> <em>type_name</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>gpointer </td>
<td class="mdname" nowrap> <em>instance</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<dl compact><dt><b>Returns:</b></dt><dd>a Human-readable string name for an instance </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga6" doxytag="qofobject.h::qof_object_register" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> gboolean qof_object_register </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="struct__QofObject.html">QofObject</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>object</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Register new types of object objects </td>
</tr>
</table>
<a class="anchor" name="ga13" doxytag="qofobject.h::qof_object_register_backend" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> gboolean qof_object_register_backend </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">QofIdTypeConst </td>
<td class="mdname" nowrap> <em>type_name</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const char * </td>
<td class="mdname" nowrap> <em>backend_name</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>gpointer </td>
<td class="mdname" nowrap> <em>be_data</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Register and lookup backend-specific data for this particular object </td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun May 23 15:41:48 2004 for QOF by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.6-20040222 </small></address>
</body>
</html>
|