SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DynamicPortTester.h
Go to the documentation of this file.
1 /*
2  For more information, please see: http://software.sci.utah.edu
3 
4  The MIT License
5 
6  Copyright (c) 2012 Scientific Computing and Imaging Institute,
7  University of Utah.
8 
9  License for the specific language governing rights and limitations under
10  Permission is hereby granted, free of charge, to any person obtaining a
11  copy of this software and associated documentation files (the "Software"),
12  to deal in the Software without restriction, including without limitation
13  the rights to use, copy, modify, merge, publish, distribute, sublicense,
14  and/or sell copies of the Software, and to permit persons to whom the
15  Software is furnished to do so, subject to the following conditions:
16 
17  The above copyright notice and this permission notice shall be included
18  in all copies or substantial portions of the Software.
19 
20  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26  DEALINGS IN THE SOFTWARE.
27 */
28 
29 /// @todo Documentation Modules/Basic/DynamicPortTester.h
30 
31 #ifndef MODULES_BASIC_DYNAMIC_PORT_TESTER_H
32 #define MODULES_BASIC_DYNAMIC_PORT_TESTER_H
33 
35 #include <Modules/Basic/share.h>
36 
37 namespace SCIRun {
38 namespace Modules {
39 namespace Basic {
40 
42  public Has3InputPorts<
43  DynamicPortTag<MatrixPortTag>,
44  DynamicPortTag<FieldPortTag>,
45  DynamicPortTag<StringPortTag>>,
46  public Has3OutputPorts<ScalarPortTag, ScalarPortTag, ScalarPortTag>
47  {
48  public:
50  virtual void execute();
51  virtual void setStateDefaults() {}
52  virtual bool hasDynamicPorts() const { return true; }
53 
54  INPUT_PORT_DYNAMIC(0, DynamicMatrix, Matrix);
55  INPUT_PORT_DYNAMIC(1, DynamicField, LegacyField);
56  INPUT_PORT_DYNAMIC(2, DynamicString, String);
57 
58  OUTPUT_PORT(0, NumMatrices, Int32);
59  OUTPUT_PORT(1, NumFields, Int32);
60  OUTPUT_PORT(2, NumStrings, Int32);
61  };
62 
63 }}}
64 
65 #endif
virtual bool hasDynamicPorts() const
Definition: DynamicPortTester.h:52
#define INPUT_PORT_DYNAMIC(index, name, type)
Definition: Module.h:668
Definition: DynamicPortTester.h:41
#define SCISHARE
Definition: share.h:39
Definition: Matrix.h:104
Definition: Module.h:525
SCIRun::Field LegacyField
Definition: FieldFwd.h:40
virtual void setStateDefaults()
Definition: DynamicPortTester.h:51
Definition: Module.h:53
#define OUTPUT_PORT(index, name, type)
Definition: Module.h:671
Definition: Module.h:445
Scalar< int > Int32
Definition: DatatypeFwd.h:50
Definition: String.h:60