nndeploy C++ API  0.2.0
nndeploy C++ API
const_node.h
Go to the documentation of this file.
1 #ifndef _NNDEPLOY_DAG_CONST_NODE_H_
2 #define _NNDEPLOY_DAG_CONST_NODE_H_
3 
4 #include "nndeploy/dag/node.h"
5 
6 namespace nndeploy {
7 namespace dag {
8 
9 class NNDEPLOY_CC_API ConstNode : public Node {
10  public:
11  ConstNode(const std::string &name) : dag::Node(name) {
12  key_ = "nndeploy::dag::ConstNode";
13  node_type_ = dag::NodeType::kNodeTypeInput;
14  }
15  ConstNode(const std::string &name, const std::vector<Edge *> &inputs,
16  const std::vector<Edge *> &outputs)
17  : dag::Node(name) {
18  key_ = "nndeploy::dag::ConstNode";
19  node_type_ = dag::NodeType::kNodeTypeInput;
20  inputs_ = inputs;
21  outputs_ = outputs;
22  }
23  virtual ~ConstNode() {}
24 
31 
32  virtual base::Status init();
33  virtual base::Status deinit();
34 
35  virtual base::Status run() = 0;
36 };
37 
38 } // namespace dag
39 } // namespace nndeploy
40 
41 #endif /* _NNDEPLOY_DAG_CONST_NODE_H_ */
ConstNode(const std::string &name, const std::vector< Edge * > &inputs, const std::vector< Edge * > &outputs)
Definition: const_node.h:15
virtual base::EdgeUpdateFlag updateInput()=0
virtual base::Status run()=0
Run node (pure virtual function)
virtual base::Status init()
Initialize node.
ConstNode(const std::string &name)
Definition: const_node.h:11
virtual base::Status deinit()
Deinitialize node.
Node base class.
Definition: node.h:171
#define NNDEPLOY_CC_API
api
Definition: macro.h:29