Pothos  0.4.0-gd11861cd
The Pothos dataflow programming software suite
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
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  std::string alias;
32 
33  bool isSigSlot;
34 
36 };
37 
41 class POTHOS_API Connectable : protected CallRegistry, public CallInterface, public Util::UID, public Util::RefHolder
42 {
43 public:
44 
46  virtual ~Connectable(void);
47 
53  void setName(const std::string &name);
54 
59  const std::string &getName(void) const;
60 
64  virtual std::vector<PortInfo> inputPortInfo(void) = 0;
65 
69  virtual std::vector<PortInfo> outputPortInfo(void) = 0;
70 
74  std::vector<std::string> inputPortNames(void);
75 
79  std::vector<std::string> outputPortNames(void);
80 
88  virtual Object opaqueCallMethod(const std::string &name, const Object *inputArgs, const size_t numArgs) const = 0;
89 
90 private:
91  Object opaqueCall(const Object *inputArgs, const size_t numArgs) const;
92  std::string _name;
93 };
94 
95 } //namespace Pothos
Information about an IO port.
Definition: Connectable.hpp:24
Definition: Connectable.hpp:41
DType dtype
The data type.
Definition: Connectable.hpp:35
#define POTHOS_API
Definition: Config.hpp:41
Definition: CallRegistry.hpp:21
Definition: RefHolder.hpp:24
Definition: CallInterface.hpp:21
Definition: Object.hpp:55
Definition: UID.hpp:21
std::string alias
A displayable name.
Definition: Connectable.hpp:31
std::string name
The port name.
Definition: Connectable.hpp:29
Definition: DType.hpp:38
bool isSigSlot
Is signal or slot?
Definition: Connectable.hpp:33