-
Notifications
You must be signed in to change notification settings - Fork 3
/
SynchrotronComponentEnable.hpp
55 lines (46 loc) · 1.66 KB
/
SynchrotronComponentEnable.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef SYNCHROTRONCOMPONENTENABLE_HPP
#define SYNCHROTRONCOMPONENTENABLE_HPP
#include "SynchrotronComponentFixedInput.hpp"
#include "Exceptions.hpp"
using namespace Synchrotron;
namespace Synchrotron {
class SynchrotronComponentEnable : public SynchrotronComponentFixedInput<1u, 1u> {
public:
/**
* Default constructor
*/
SynchrotronComponentEnable(size_t initial_value = 0) : SynchrotronComponentFixedInput<1u, 1u>(initial_value) {}
/** Copy constructor
* \param other
* SynchrotronComponent to copy from
* \param duplicateAll_IO
* Specifies whether to only copy inputs (false) or outputs as well (true).
*/
SynchrotronComponentEnable(const SynchrotronComponent<1u>& other, bool duplicateAll_IO = false)
: SynchrotronComponentFixedInput<1u, 1u>(other, duplicateAll_IO) {}
/** \brief
* Connection constructor
* * Adds signal subscriptions from inputList
* * Optionally adds slot subscribers from outputList
*
* \param inputList
* The list of SynchrotronComponents to connect as input.
* \param outputList
* The list of SynchrotronComponents to connect as output.
*/
SynchrotronComponentEnable( std::initializer_list<SynchrotronComponent<1u>*> inputList,
std::initializer_list<SynchrotronComponent<1u>*> outputList = {} )
: SynchrotronComponentFixedInput<1u, 1u>(inputList, outputList) {}
/**
* Default destructor
*/
~SynchrotronComponentEnable() {}
void setEnable(SynchrotronComponent& input) {
this->enable = &input;
}
// void setEnable(SynchrotronComponent& input) {
// this->enable = &input;
// }
};
}
#endif // SYNCHROTRONCOMPONENTENABLE_HPP