Last change
on this file since 2335 was
1704,
checked in by yushan, 5 years ago
|
Introducing the new graph functionality. Attribute build_workflow_graph=.TRUE. is used in the field definition section in the xml file to enable the workflow graph of the field and other fields referecing to it. A more detailed document will be available soon on the graph fuctionality.
|
File size:
1.3 KB
|
Line | |
---|
1 | #ifndef __XIOS_CUnaryArithmeticFilter__ |
---|
2 | #define __XIOS_CUnaryArithmeticFilter__ |
---|
3 | |
---|
4 | #include "filter.hpp" |
---|
5 | #include <string> |
---|
6 | #include "operator_expr.hpp" |
---|
7 | |
---|
8 | namespace xios |
---|
9 | { |
---|
10 | /*! |
---|
11 | * A generic unary arithmetic filter wrapping any type of unary operator |
---|
12 | * which can be applied on fields. |
---|
13 | */ |
---|
14 | class CUnaryArithmeticFilter : public CFilter, public IFilterEngine |
---|
15 | { |
---|
16 | public: |
---|
17 | /*! |
---|
18 | * Constructs an unary arithmetic filter wrapping the specified operator. |
---|
19 | * |
---|
20 | * \param gc the associated garbage collector |
---|
21 | * \param op the string identifing the unary operator |
---|
22 | */ |
---|
23 | CUnaryArithmeticFilter(CGarbageCollector& gc, const std::string& op); |
---|
24 | |
---|
25 | protected: |
---|
26 | COperatorExpr::functionField op; //!< The unary operator attached to the unary arithmeric filter |
---|
27 | |
---|
28 | |
---|
29 | /*! |
---|
30 | * Applies the unary operator to the input data and returns the result. |
---|
31 | * |
---|
32 | * \param data a vector of packets corresponding to each slot (one in this case) |
---|
33 | * \return the result of the unary operation |
---|
34 | */ |
---|
35 | CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); |
---|
36 | std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); |
---|
37 | }; // class CUnaryArithmeticFilter |
---|
38 | } // namespace xios |
---|
39 | |
---|
40 | #endif //__XIOS_CUnaryArithmeticFilter__ |
---|
Note: See
TracBrowser
for help on using the repository browser.