File: classAction_1_1TaskFactory.html

package info (click to toggle)
exiv2 0.10-1.4
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 13,124 kB
  • ctags: 5,665
  • sloc: cpp: 20,697; xml: 15,118; sh: 10,526; ansic: 1,887; makefile: 367; awk: 64; python: 36
file content (173 lines) | stat: -rw-r--r-- 9,795 bytes parent folder | download | duplicates (2)
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
<!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>Exiv2: Action::TaskFactory Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li id="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="examples.html"><span>Examples</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="namespaceAction.html">Action</a>::<a class="el" href="classAction_1_1TaskFactory.html">TaskFactory</a></div>
<h1>Action::TaskFactory Class Reference</h1><!-- doxytag: class="Action::TaskFactory" --><a class="el" href="classAction_1_1Task.html">Task</a> factory.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;actions.hpp&gt;</code>
<p>
Collaboration diagram for Action::TaskFactory:<p><center><img src="classAction_1_1TaskFactory__coll__graph.png" border="0" usemap="#Action_1_1TaskFactory__coll__map" alt="Collaboration graph"></center>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classAction_1_1TaskFactory-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ecfc2194d99c852300437ac2e96dc4b8"></a><!-- doxytag: member="Action::TaskFactory::cleanup" ref="ecfc2194d99c852300437ac2e96dc4b8" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAction_1_1TaskFactory.html#ecfc2194d99c852300437ac2e96dc4b8">cleanup</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classAction_1_1Task.html#76329f48810f8e555b233d9f699faadd">Task::AutoPtr</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAction_1_1TaskFactory.html#55ca06f5a6cf3dff1bb30fd5cad4286b">create</a> (<a class="el" href="namespaceAction.html#71af957ce05611bb128a23679e43b3d2">TaskType</a> type)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a task.  <a href="#55ca06f5a6cf3dff1bb30fd5cad4286b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAction_1_1TaskFactory.html#5ea557e379916fb47f0785022a8eab78">registerTask</a> (<a class="el" href="namespaceAction.html#71af957ce05611bb128a23679e43b3d2">TaskType</a> type, <a class="el" href="classAction_1_1Task.html#76329f48810f8e555b233d9f699faadd">Task::AutoPtr</a> task)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Register a task prototype together with its type.  <a href="#5ea557e379916fb47f0785022a8eab78"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classAction_1_1TaskFactory.html">TaskFactory</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAction_1_1TaskFactory.html#27c920b95806b9b18ebb58553d8b4fa4">instance</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get access to the task factory.  <a href="#27c920b95806b9b18ebb58553d8b4fa4"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classAction_1_1Task.html">Task</a> factory. 
<p>
Creates an instance of the task of the requested type. The factory is implemented as a singleton, which can be accessed only through the static member function <a class="el" href="classAction_1_1TaskFactory.html#27c920b95806b9b18ebb58553d8b4fa4">instance()</a>. 
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="55ca06f5a6cf3dff1bb30fd5cad4286b"></a><!-- doxytag: member="Action::TaskFactory::create" ref="55ca06f5a6cf3dff1bb30fd5cad4286b" args="(TaskType type)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classAction_1_1Task.html#76329f48810f8e555b233d9f699faadd">Task::AutoPtr</a> Action::TaskFactory::create           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="namespaceAction.html#71af957ce05611bb128a23679e43b3d2">TaskType</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>type</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a task. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>Identifies the type of task to create. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>An auto pointer that owns a task of the requested type. If the task type is not supported, the pointer is 0. </dd></dl>
<dl compact><dt><b>Remarks:</b></dt><dd>The caller of the function should check the content of the returned auto pointer and take appropriate action (e.g., throw an exception) if it is 0. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="27c920b95806b9b18ebb58553d8b4fa4"></a><!-- doxytag: member="Action::TaskFactory::instance" ref="27c920b95806b9b18ebb58553d8b4fa4" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classAction_1_1TaskFactory.html">TaskFactory</a> &amp; Action::TaskFactory::instance           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get access to the task factory. 
<p>
Clients access the task factory exclusively through this method.     </td>
  </tr>
</table>
<a class="anchor" name="5ea557e379916fb47f0785022a8eab78"></a><!-- doxytag: member="Action::TaskFactory::registerTask" ref="5ea557e379916fb47f0785022a8eab78" args="(TaskType type, Task::AutoPtr task)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void Action::TaskFactory::registerTask           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="namespaceAction.html#71af957ce05611bb128a23679e43b3d2">TaskType</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="classAction_1_1Task.html#76329f48810f8e555b233d9f699faadd">Task::AutoPtr</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>task</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Register a task prototype together with its type. 
<p>
The task factory creates new tasks of a given type by cloning its associated prototype. Additional tasks can be registered. If called for a type which already exists in the list, the corresponding prototype is replaced.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td><a class="el" href="classAction_1_1Task.html">Task</a> type. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>task</em>&nbsp;</td><td>Pointer to the prototype. Ownership is transfered to the task factory. That's what the auto pointer indicates. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="actions_8hpp.html">actions.hpp</a><li>actions.cpp</ul>
<hr size="1"><address style="align: right;"><small>Generated on Fri Jun 2 23:54:39 2006 for Exiv2 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>