1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv=
"Content-Type" content=
"text/html;charset=UTF-8">
3 <title>Barry: Barry::DBDataBuilder Class Reference
</title>
4 <link href=
"doxygen.css" rel=
"stylesheet" type=
"text/css">
5 <link href=
"tabs.css" rel=
"stylesheet" type=
"text/css">
7 <!-- Generated by Doxygen 1.5.6 -->
8 <div class=
"navigation" id=
"top">
11 <li><a href=
"index.html"><span>Main
Page
</span></a></li>
12 <li><a href=
"modules.html"><span>Modules
</span></a></li>
13 <li><a href=
"namespaces.html"><span>Namespaces
</span></a></li>
14 <li class=
"current"><a href=
"classes.html"><span>Classes
</span></a></li>
15 <li><a href=
"files.html"><span>Files
</span></a></li>
16 <li><a href=
"dirs.html"><span>Directories
</span></a></li>
21 <li><a href=
"classes.html"><span>Alphabetical
List
</span></a></li>
22 <li><a href=
"annotated.html"><span>Class
List
</span></a></li>
23 <li><a href=
"hierarchy.html"><span>Class
Hierarchy
</span></a></li>
24 <li><a href=
"functions.html"><span>Class
Members
</span></a></li>
27 <div class=
"navpath"><a class=
"el" href=
"namespaceBarry.html">Barry
</a>::
<a class=
"el" href=
"classBarry_1_1DBDataBuilder.html">DBDataBuilder
</a>
30 <div class=
"contents">
31 <h1>Barry::DBDataBuilder Class Reference
</h1><!-- doxytag: class="Barry::DBDataBuilder" --><!-- doxytag: inherits="Barry::Builder" --><code>#include
<<a class=
"el" href=
"builder_8h-source.html">builder.h
</a>></code>
33 <div class=
"dynheader">
34 Inheritance diagram for Barry::DBDataBuilder:
</div>
35 <div class=
"dynsection">
36 <p><center><img src=
"classBarry_1_1DBDataBuilder__inherit__graph.png" border=
"0" usemap=
"#Barry_1_1DBDataBuilder__inherit__map" alt=
"Inheritance graph"></center>
37 <map name=
"Barry_1_1DBDataBuilder__inherit__map">
38 <area shape=
"rect" href=
"classBarry_1_1Builder.html" title=
"Base class for the builder functor hierarchy." alt=
"" coords=
"28,5,127,32"></map>
39 <center><font size=
"2">[
<a href=
"graph_legend.html">legend
</a>]
</font></center></div>
40 <div class=
"dynheader">
41 Collaboration diagram for Barry::DBDataBuilder:
</div>
42 <div class=
"dynsection">
43 <p><center><img src=
"classBarry_1_1DBDataBuilder__coll__graph.png" border=
"0" usemap=
"#Barry_1_1DBDataBuilder__coll__map" alt=
"Collaboration graph"></center>
44 <map name=
"Barry_1_1DBDataBuilder__coll__map">
45 <area shape=
"rect" href=
"classBarry_1_1Builder.html" title=
"Base class for the builder functor hierarchy." alt=
"" coords=
"5,189,104,216"><area shape=
"rect" href=
"classBarry_1_1DBData.html" title=
"Database record data class." alt=
"" coords=
"128,189,232,216"><area shape=
"rect" title=
"STL class." alt=
"" coords=
"195,83,275,109"><area shape=
"rect" title=
"STL class." alt=
"" coords=
"152,5,317,32"></map>
46 <center><font size=
"2">[
<a href=
"graph_legend.html">legend
</a>]
</font></center></div>
49 <a href=
"classBarry_1_1DBDataBuilder-members.html">List of all members.
</a><hr><a name=
"_details"></a><h2>Detailed Description
</h2>
50 Wrapper class around a
<a class=
"el" href=
"classBarry_1_1DBData.html" title=
"Database record data class.">DBData
</a> object, to make it easy to pass a
<a class=
"el" href=
"classBarry_1_1DBData.html" title=
"Database record data class.">DBData
</a> object into a function or API that requires a builder.
52 The main advantage to this is that the
<a class=
"el" href=
"classBarry_1_1Builder.html" title=
"Base class for the builder functor hierarchy.">Builder
</a> API allows for movement of data, depending on the required offsets.
53 <p>Definition at line
<a class=
"el" href=
"builder_8h-source.html#l00115">115</a> of file
<a class=
"el" href=
"builder_8h-source.html">builder.h
</a>.
</p>
54 <table border=
"0" cellpadding=
"0" cellspacing=
"0">
56 <tr><td colspan=
"2"><br><h2>Public Member Functions
</h2></td></tr>
57 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">virtual bool
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classBarry_1_1DBDataBuilder.html#9d7d0b399407ca2ff345e9ef011828ff">BuildRecord
</a> (
<a class=
"el" href=
"classBarry_1_1DBData.html">DBData
</a> &data, size_t
&offset, const
<a class=
"el" href=
"classBarry_1_1IConverter.html">IConverter
</a> *ic)
</td></tr>
59 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">Called to build the record field data.
<a href=
"#9d7d0b399407ca2ff345e9ef011828ff"></a><br></td></tr>
60 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">virtual bool
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classBarry_1_1DBDataBuilder.html#44aa9f78cdb4112f478ed36dca37b5f0">FetchRecord
</a> (
<a class=
"el" href=
"classBarry_1_1DBData.html">DBData
</a> &data, const
<a class=
"el" href=
"classBarry_1_1IConverter.html">IConverter
</a> *ic)
</td></tr>
62 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">Same as BuildRecord, but does not care about any offsets.
<a href=
"#44aa9f78cdb4112f478ed36dca37b5f0"></a><br></td></tr>
63 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">virtual bool
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classBarry_1_1DBDataBuilder.html#ca40d139b777c086699d58553a2e0646">EndOfFile
</a> () const
</td></tr>
65 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">Sometimes a builder can have multiple databases stored in it, so when Build/Fetch returns false, check if there is more data with this function.
<a href=
"#ca40d139b777c086699d58553a2e0646"></a><br></td></tr>
67 <hr><h2>Member Function Documentation
</h2>
68 <a class=
"anchor" name=
"9d7d0b399407ca2ff345e9ef011828ff"></a><!-- doxytag: member="Barry::DBDataBuilder::BuildRecord" ref="9d7d0b399407ca2ff345e9ef011828ff" args="(DBData &data, size_t &offset, const IConverter *ic)" -->
70 <div class=
"memproto">
71 <table class=
"memname">
73 <td class=
"memname">bool Barry::DBDataBuilder::BuildRecord
</td>
75 <td class=
"paramtype"><a class=
"el" href=
"classBarry_1_1DBData.html">DBData
</a> & </td>
76 <td class=
"paramname"> <em>data
</em>,
</td>
79 <td class=
"paramkey"></td>
81 <td class=
"paramtype">size_t
& </td>
82 <td class=
"paramname"> <em>offset
</em>,
</td>
85 <td class=
"paramkey"></td>
87 <td class=
"paramtype">const
<a class=
"el" href=
"classBarry_1_1IConverter.html">IConverter
</a> *
</td>
88 <td class=
"paramname"> <em>ic
</em></td><td> </td>
93 <td></td><td></td><td><code> [virtual]
</code></td>
100 Called to build the record field data.
102 Store the raw data in data, using offset to know where to write. Be sure to update offset, and be sure to adjust the size of the data packet (possibly with Data::ReleaseBuffer()).
<p>
103 Returns true if successful, and false if at the end of the series. Note that if
<a class=
"el" href=
"classBarry_1_1DBDataBuilder.html#ca40d139b777c086699d58553a2e0646" title=
"Sometimes a builder can have multiple databases stored in it, so when Build/Fetch...">EndOfFile()
</a> is false after this function returns false, then there may be another series available, which the next call to
<a class=
"el" href=
"classBarry_1_1DBDataBuilder.html#9d7d0b399407ca2ff345e9ef011828ff" title=
"Called to build the record field data.">BuildRecord()
</a> will determine.
104 <p>Implements
<a class=
"el" href=
"classBarry_1_1Builder.html#4a3d38061d957eb6dd0539b18d40e6ad">Barry::Builder
</a>.
</p>
106 <p>Definition at line
<a class=
"el" href=
"builder_8cc-source.html#l00041">41</a> of file
<a class=
"el" href=
"builder_8cc-source.html">builder.cc
</a>.
</p>
108 <p>References
<a class=
"el" href=
"data_8h-source.html#l00233">Barry::DBData::CopyMeta()
</a>,
<a class=
"el" href=
"data_8h-source.html#l00208">Barry::DBData::GetData()
</a>,
<a class=
"el" href=
"data_8h-source.html#l00206">Barry::DBData::GetOffset()
</a>,
<a class=
"el" href=
"data_8h-source.html#l00228">Barry::DBData::SetOffset()
</a>, and
<a class=
"el" href=
"data_8cc-source.html#l00467">Barry::DBData::UseData()
</a>.
</p>
111 <div class=
"dynheader">
112 Here is the call graph for this function:
</div>
113 <div class=
"dynsection">
114 <p><center><img src=
"classBarry_1_1DBDataBuilder_9d7d0b399407ca2ff345e9ef011828ff_cgraph.png" border=
"0" usemap=
"#classBarry_1_1DBDataBuilder_9d7d0b399407ca2ff345e9ef011828ff_cgraph_map" alt=
""></center>
115 <map name=
"classBarry_1_1DBDataBuilder_9d7d0b399407ca2ff345e9ef011828ff_cgraph_map">
116 <area shape=
"rect" href=
"classBarry_1_1DBData.html#789d1991e730ba431deb19cddd9801eb" title=
"Barry::DBData::CopyMeta" alt=
"" coords=
"279,5,449,32"><area shape=
"rect" href=
"classBarry_1_1DBData.html#a7cacc9655376447ffbf3aa4d664a03b" title=
"Barry::DBData::GetData" alt=
"" coords=
"284,56,444,83"><area shape=
"rect" href=
"classBarry_1_1DBData.html#5b301bfdcda5a74ccfd3f7e54fd69d99" title=
"Barry::DBData::GetOffset" alt=
"" coords=
"280,107,448,133"><area shape=
"rect" href=
"classBarry_1_1DBData.html#cb569139ee2d44442d4709ccf2a4ab3c" title=
"Barry::DBData::SetOffset" alt=
"" coords=
"280,157,448,184"><area shape=
"rect" href=
"classBarry_1_1DBData.html#3c1c4ad5ce85cef0ea85002a0fe07881" title=
"Barry::DBData::UseData" alt=
"" coords=
"283,208,445,235"></map>
121 <a class=
"anchor" name=
"44aa9f78cdb4112f478ed36dca37b5f0"></a><!-- doxytag: member="Barry::DBDataBuilder::FetchRecord" ref="44aa9f78cdb4112f478ed36dca37b5f0" args="(DBData &data, const IConverter *ic)" -->
122 <div class=
"memitem">
123 <div class=
"memproto">
124 <table class=
"memname">
126 <td class=
"memname">bool Barry::DBDataBuilder::FetchRecord
</td>
128 <td class=
"paramtype"><a class=
"el" href=
"classBarry_1_1DBData.html">DBData
</a> & </td>
129 <td class=
"paramname"> <em>data
</em>,
</td>
132 <td class=
"paramkey"></td>
134 <td class=
"paramtype">const
<a class=
"el" href=
"classBarry_1_1IConverter.html">IConverter
</a> *
</td>
135 <td class=
"paramname"> <em>ic
</em></td><td> </td>
140 <td></td><td></td><td><code> [virtual]
</code></td>
147 Same as BuildRecord, but does not care about any offsets.
149 The caller should call DBData::GetOffset() afterward to discover if there is an offset to the result.
<p>
150 This is usually the fastest of the two functions, since extra copying may be required if a specific offset is given. When building records from Record classes, both functions are the same speed. But when building records from the device, the device decides the offset, so
<a class=
"el" href=
"classBarry_1_1DBDataBuilder.html#44aa9f78cdb4112f478ed36dca37b5f0" title=
"Same as BuildRecord, but does not care about any offsets.">FetchRecord()
</a> is faster, since BuildRecord requires a copy to adjust to the right offset.
<p>
151 The caller should use the function that results in the least amount of copying for the caller. If the caller doesn't care about where the resulting record is in data, use
<a class=
"el" href=
"classBarry_1_1DBDataBuilder.html#44aa9f78cdb4112f478ed36dca37b5f0" title=
"Same as BuildRecord, but does not care about any offsets.">FetchRecord()
</a>.
152 <p>Implements
<a class=
"el" href=
"classBarry_1_1Builder.html#005a0269c1f96947d7a75c1cc09a4609">Barry::Builder
</a>.
</p>
154 <p>Definition at line
<a class=
"el" href=
"builder_8cc-source.html#l00068">68</a> of file
<a class=
"el" href=
"builder_8cc-source.html">builder.cc
</a>.
</p>
158 <a class=
"anchor" name=
"ca40d139b777c086699d58553a2e0646"></a><!-- doxytag: member="Barry::DBDataBuilder::EndOfFile" ref="ca40d139b777c086699d58553a2e0646" args="() const " -->
159 <div class=
"memitem">
160 <div class=
"memproto">
161 <table class=
"memname">
163 <td class=
"memname">bool Barry::DBDataBuilder::EndOfFile
</td>
165 <td class=
"paramname"> </td>
166 <td> )
</td>
167 <td> const
<code> [virtual]
</code></td>
174 Sometimes a builder can have multiple databases stored in it, so when Build/Fetch returns false, check if there is more data with this function.
176 This function is not used by database-oriented functions, but by pipe- oriented functions.
177 <p>Implements
<a class=
"el" href=
"classBarry_1_1Builder.html#0ecfa5788ddee814a2071c82c5734691">Barry::Builder
</a>.
</p>
179 <p>Definition at line
<a class=
"el" href=
"builder_8cc-source.html#l00074">74</a> of file
<a class=
"el" href=
"builder_8cc-source.html">builder.cc
</a>.
</p>
183 <hr>The documentation for this class was generated from the following files:
<ul>
184 <li><a class=
"el" href=
"builder_8h-source.html">builder.h
</a><li><a class=
"el" href=
"builder_8cc-source.html">builder.cc
</a></ul>
186 <hr size=
"1"><address style=
"text-align: right;"><small>Generated on Thu Feb
10 16:
14:
35 2011 for Barry by
187 <a href=
"http://www.doxygen.org/index.html">
188 <img src=
"doxygen.png" alt=
"doxygen" align=
"middle" border=
"0"></a> 1.5.6 </small></address>