Pothos  0.2.1-g9f04573d
The Pothos dataflow programming software suite
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Connectable.hpp
Go to the documentation of this file.
1 
11 #pragma once
12 #include <Pothos/Config.hpp>
14 #include <Pothos/Util/UID.hpp>
18 #include <string>
19 #include <vector>
20 
21 namespace Pothos {
22 
25 {
26 public:
27  PortInfo(void);
28 
29  std::string name;
30 
31  bool isSigSlot;
32 
34 };
35 
39 class POTHOS_API Connectable : protected CallRegistry, public CallInterface, public Util::UID, public Util::RefHolder
40 {
41 public:
42 
44  virtual ~Connectable(void);
45 
51  void setName(const std::string &name);
52 
57  const std::string &getName(void) const;
58 
62  virtual std::vector<PortInfo> inputPortInfo(void) = 0;
63 
67  virtual std::vector<PortInfo> outputPortInfo(void) = 0;
68 
72  std::vector<std::string> inputPortNames(void);
73 
77  std::vector<std::string> outputPortNames(void);
78 
86  virtual Object opaqueCallMethod(const std::string &name, const Object *inputArgs, const size_t numArgs) const = 0;
87 
88 private:
89  Object opaqueCall(const Object *inputArgs, const size_t numArgs) const;
90  std::string _name;
91 };
92 
93 } //namespace Pothos
Information about an IO port.
Definition: Connectable.hpp:24
Definition: Connectable.hpp:39
DType dtype
The data type.
Definition: Connectable.hpp:33
#define POTHOS_API
Definition: Config.hpp:41
Definition: CallRegistry.tmpl.hpp:21
Definition: RefHolder.hpp:24
Definition: CallInterface.tmpl.hpp:21
Definition: Object.hpp:55
Definition: UID.hpp:21
std::string name
The port name.
Definition: Connectable.hpp:29
Definition: DType.hpp:38
bool isSigSlot
Is signal or slot?
Definition: Connectable.hpp:31