| 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>PamCut: Collections/SmartBlindCollection/SmartBlindCollection.cpp Source File</title> |
| 4 |
<link href="tabs.css" rel="stylesheet" type="text/css"> |
| 5 |
<link href="doxygen.css" rel="stylesheet" type="text/css"> |
| 6 |
</head><body> |
| 7 |
<!-- Generated by Doxygen 1.5.9 --> |
| 8 |
<div class="navigation" id="top"> |
| 9 |
<div class="tabs"> |
| 10 |
<ul> |
| 11 |
<li><a href="index.html"><span>Main Page</span></a></li> |
| 12 |
<li><a href="annotated.html"><span>Classes</span></a></li> |
| 13 |
<li class="current"><a href="files.html"><span>Files</span></a></li> |
| 14 |
</ul> |
| 15 |
</div> |
| 16 |
<div class="tabs"> |
| 17 |
<ul> |
| 18 |
<li><a href="files.html"><span>File List</span></a></li> |
| 19 |
<li><a href="globals.html"><span>File Members</span></a></li> |
| 20 |
</ul> |
| 21 |
</div> |
| 22 |
<h1>Collections/SmartBlindCollection/SmartBlindCollection.cpp</h1><a href="SmartBlindCollection_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> |
| 23 |
<a name="l00002"></a>00002 <span class="comment"> * SmartBlindCollection.cpp</span> |
| 24 |
<a name="l00003"></a>00003 <span class="comment"> *</span> |
| 25 |
<a name="l00004"></a>00004 <span class="comment"> * Created on: 16-mag-2009</span> |
| 26 |
<a name="l00005"></a>00005 <span class="comment"> * Author: Nicola Mori</span> |
| 27 |
<a name="l00006"></a>00006 <span class="comment"> */</span> |
| 28 |
<a name="l00007"></a>00007 |
| 29 |
<a name="l00010"></a>00010 <span class="preprocessor">#include "<a class="code" href="SmartBlindCollection_8h.html">SmartBlindCollection.h</a>"</span> |
| 30 |
<a name="l00011"></a>00011 |
| 31 |
<a name="l00012"></a><a class="code" href="classSmartBlindCollection.html#7b542909955a91fd5c5389ac45da4b95">00012</a> <span class="keywordtype">void</span> <a class="code" href="classSmartBlindCollection.html#7b542909955a91fd5c5389ac45da4b95" title="Adds an action to the SmartCollection.">SmartBlindCollection::AddAction</a>(<a class="code" href="classCollectionAction.html" title="An abstract class that defines the interface of a generic collection action.">CollectionAction</a>& action) { |
| 32 |
<a name="l00013"></a>00013 <a class="code" href="classSmartBlindCollection.html#9b4458101732d32cb9262bffcb075007">_actions</a>.push_back(&action); |
| 33 |
<a name="l00014"></a>00014 } |
| 34 |
<a name="l00015"></a>00015 |
| 35 |
<a name="l00016"></a><a class="code" href="classSmartBlindCollection.html#c0b0207c004fc4c04833a55e01535b8b">00016</a> <a class="code" href="classCollectionAction.html" title="An abstract class that defines the interface of a generic collection action.">CollectionAction</a> *<a class="code" href="classSmartBlindCollection.html#c0b0207c004fc4c04833a55e01535b8b" title="Returns the iAction-th action.">SmartBlindCollection::GetAction</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> iAction) { |
| 36 |
<a name="l00017"></a>00017 <span class="keywordflow">if</span> (<a class="code" href="classSmartBlindCollection.html#9b4458101732d32cb9262bffcb075007">_actions</a>.size() == 0) |
| 37 |
<a name="l00018"></a>00018 <span class="keywordflow">return</span> NULL; |
| 38 |
<a name="l00019"></a>00019 <span class="keywordflow">if</span> (iAction < 0 || iAction > <a class="code" href="classSmartBlindCollection.html#9b4458101732d32cb9262bffcb075007">_actions</a>.size() - 1) |
| 39 |
<a name="l00020"></a>00020 <span class="keywordflow">return</span> NULL; |
| 40 |
<a name="l00021"></a>00021 <span class="keywordflow">else</span> |
| 41 |
<a name="l00022"></a>00022 <span class="keywordflow">return</span> <a class="code" href="classSmartBlindCollection.html#9b4458101732d32cb9262bffcb075007">_actions</a>[iAction]; |
| 42 |
<a name="l00023"></a>00023 } |
| 43 |
<a name="l00024"></a>00024 |
| 44 |
<a name="l00025"></a><a class="code" href="classSmartBlindCollection.html#e59d373921df00a54a8a8401a1ae2baf">00025</a> <span class="keywordtype">void</span> <a class="code" href="classSmartBlindCollection.html#e59d373921df00a54a8a8401a1ae2baf" title="The pre-analysis task definition.">SmartBlindCollection::Setup</a>(PamLevel2 *events){ |
| 45 |
<a name="l00026"></a>00026 <a class="code" href="classSmartBlindCollection.html#e59d373921df00a54a8a8401a1ae2baf" title="The pre-analysis task definition.">BlindCutCollection::Setup</a>(events); |
| 46 |
<a name="l00027"></a>00027 |
| 47 |
<a name="l00028"></a>00028 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < <a class="code" href="classSmartBlindCollection.html#9b4458101732d32cb9262bffcb075007">_actions</a>.size(); i++){ |
| 48 |
<a name="l00029"></a>00029 <a class="code" href="classSmartBlindCollection.html#9b4458101732d32cb9262bffcb075007">_actions</a>[i]->Setup(events); |
| 49 |
<a name="l00030"></a>00030 } |
| 50 |
<a name="l00031"></a>00031 } |
| 51 |
<a name="l00032"></a>00032 |
| 52 |
<a name="l00033"></a><a class="code" href="classSmartBlindCollection.html#a78ee7b18b0913554e64b4e560453167">00033</a> <span class="keywordtype">void</span> <a class="code" href="classSmartBlindCollection.html#a78ee7b18b0913554e64b4e560453167" title="The post-analysis task definition.">SmartBlindCollection::Finalize</a>(){ |
| 53 |
<a name="l00034"></a>00034 <a class="code" href="classSmartBlindCollection.html#a78ee7b18b0913554e64b4e560453167" title="The post-analysis task definition.">BlindCutCollection::Finalize</a>(); |
| 54 |
<a name="l00035"></a>00035 |
| 55 |
<a name="l00036"></a>00036 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < <a class="code" href="classSmartBlindCollection.html#9b4458101732d32cb9262bffcb075007">_actions</a>.size(); i++){ |
| 56 |
<a name="l00037"></a>00037 <a class="code" href="classSmartBlindCollection.html#9b4458101732d32cb9262bffcb075007">_actions</a>[i]->Finalize(); |
| 57 |
<a name="l00038"></a>00038 } |
| 58 |
<a name="l00039"></a>00039 } |
| 59 |
<a name="l00040"></a>00040 |
| 60 |
<a name="l00041"></a><a class="code" href="classSmartBlindCollection.html#d56853747b6484dec74fef529388ea28">00041</a> <span class="keywordtype">void</span> <a class="code" href="classSmartBlindCollection.html#d56853747b6484dec74fef529388ea28" title="Post-selection tasks.">SmartBlindCollection::OnGood</a>(PamLevel2 *event){ |
| 61 |
<a name="l00042"></a>00042 <a class="code" href="classSmartBlindCollection.html#d56853747b6484dec74fef529388ea28" title="Post-selection tasks.">BlindCutCollection::OnGood</a>(event); |
| 62 |
<a name="l00043"></a>00043 |
| 63 |
<a name="l00044"></a>00044 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < <a class="code" href="classSmartBlindCollection.html#9b4458101732d32cb9262bffcb075007">_actions</a>.size(); i++){ |
| 64 |
<a name="l00045"></a>00045 <a class="code" href="classSmartBlindCollection.html#9b4458101732d32cb9262bffcb075007">_actions</a>[i]->OnGood(event); |
| 65 |
<a name="l00046"></a>00046 } |
| 66 |
<a name="l00047"></a>00047 } |
| 67 |
<a name="l00048"></a>00048 |
| 68 |
<a name="l00049"></a><a class="code" href="classSmartBlindCollection.html#f91282918f2ac3966b8ca491ef0ef634">00049</a> <span class="keywordtype">void</span> <a class="code" href="classSmartBlindCollection.html#f91282918f2ac3966b8ca491ef0ef634" title="Post-selection tasks.">SmartBlindCollection::OnBad</a>(PamLevel2 *event, <span class="keywordtype">int</span> selectionResult){ |
| 69 |
<a name="l00050"></a>00050 <a class="code" href="classSmartBlindCollection.html#f91282918f2ac3966b8ca491ef0ef634" title="Post-selection tasks.">BlindCutCollection::OnBad</a>(event, selectionResult); |
| 70 |
<a name="l00051"></a>00051 |
| 71 |
<a name="l00052"></a>00052 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < <a class="code" href="classSmartBlindCollection.html#9b4458101732d32cb9262bffcb075007">_actions</a>.size(); i++){ |
| 72 |
<a name="l00053"></a>00053 <a class="code" href="classSmartBlindCollection.html#9b4458101732d32cb9262bffcb075007">_actions</a>[i]->OnBad(event, selectionResult); |
| 73 |
<a name="l00054"></a>00054 } |
| 74 |
<a name="l00055"></a>00055 } |
| 75 |
</pre></div></div> |
| 76 |
<hr size="1"><address style="text-align: right;"><small>Generated on Wed May 27 15:21:27 2009 for PamCut by |
| 77 |
<a href="http://www.doxygen.org/index.html"> |
| 78 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> |
| 79 |
</body> |
| 80 |
</html> |