Noise Modeler Library  0.1
Library for procedurally generating noise-based terrains and other content
 All Classes Files Functions Variables Enumerations Enumerator Groups Pages
moduleoutput.hpp
1 #ifndef NM_MODULEOUTPUT_HPP
2 #define NM_MODULEOUTPUT_HPP
3 
4 #include <nmlib/model/signaltype.hpp>
5 #include <nmlib/util/userdataprovider.hpp>
6 
7 #include <nmlib/util/signals.hpp>
8 
9 #include <string>
10 
11 namespace nm {
12 
13 class ModuleType;
14 
20 {
21 public:
22  explicit ModuleOutput(std::string name, SignalType signalType, const ModuleType& moduleType):
23  c_name(name),
24  c_signalType(signalType),
25  c_moduleType(moduleType)
26  {}
27  ~ModuleOutput(){destroying(*this);}
28 // ModuleOutput(ModuleOutput&&) = default;
29 // ModuleOutput(ModuleOutput&) = default;
30 
31  std::string getName() const {return c_name;}
32  SignalType getSignalType() const {return c_signalType;}
33 
34  signal<void(ModuleOutput&)> destroying;
35 
36 private:
37  const std::string c_name;
38  const SignalType c_signalType;
39  const ModuleType &c_moduleType;
40 };
41 
42 } // namespace nm
43 
44 #endif // NM_MODULEOUTPUT_HPP
Base class for stuff that needs to provide user data in form of a void* pointer.
Definition: userdataprovider.hpp:10
Describes a recipe for a module and its inputs and outputs.
Definition: moduletype.hpp:37
Describes one of a ModuleType's outputs (name, SignalType)
Definition: moduleoutput.hpp:19
Describes a the dimensionality of a signal Can be extended to include other type information such as ...
Definition: signaltype.hpp:13