[147] | 1 | // %pacpus:license{
|
---|
| 2 | // This file is part of the PACPUS framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
| 4 | // %pacpus:license}
|
---|
| 5 |
|
---|
| 6 | #include "@PACPUS_COMPONENT_NAME@.h"
|
---|
[216] | 7 | #include "@PACPUS_COMPONENT_NAME@Impl.h"
|
---|
[147] | 8 |
|
---|
[192] | 9 | #include <Pacpus/kernel/ComponentFactory.h>
|
---|
[147] | 10 | #include <Pacpus/kernel/Log.h>
|
---|
| 11 |
|
---|
| 12 | using namespace pacpus;
|
---|
| 13 | using namespace std;
|
---|
| 14 |
|
---|
[216] | 15 | DECLARE_STATIC_LOGGER("pacpus.@PACPUS_COMPONENT_NAME@");
|
---|
[147] | 16 |
|
---|
| 17 | /// Constructs a static component factory
|
---|
| 18 | static ComponentFactory<@PACPUS_COMPONENT_NAME@> sFactory("@PACPUS_COMPONENT_NAME@");
|
---|
| 19 |
|
---|
| 20 | //////////////////////////////////////////////////////////////////////////
|
---|
| 21 | @PACPUS_COMPONENT_NAME@::@PACPUS_COMPONENT_NAME@(QString name)
|
---|
| 22 | : ComponentBase(name)
|
---|
| 23 | {
|
---|
| 24 | LOG_TRACE("constructor(" << name << ")");
|
---|
[192] | 25 |
|
---|
| 26 | //addParameters()
|
---|
[216] | 27 | //("parameter-name", value<ParameterType>(&mImpl->mParameterVariable)->required(), "parameter description")
|
---|
| 28 | //("parameter-name", value<ParameterType>(&mImpl->mParameterVariable)->default_value(0), "parameter description")
|
---|
[192] | 29 | //;
|
---|
[147] | 30 | }
|
---|
| 31 |
|
---|
| 32 | @PACPUS_COMPONENT_NAME@::~@PACPUS_COMPONENT_NAME@()
|
---|
| 33 | {
|
---|
| 34 | LOG_TRACE("destructor");
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | //////////////////////////////////////////////////////////////////////////
|
---|
[193] | 38 | void @PACPUS_COMPONENT_NAME@::addInputs()
|
---|
| 39 | {
|
---|
[194] | 40 | // must inherit from QObject to use addInput
|
---|
[193] | 41 | //addInput<InputType, @PACPUS_COMPONENT_NAME@>("input-name", &@PACPUS_COMPONENT_NAME@::processInput);
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | void @PACPUS_COMPONENT_NAME@::addOutputs()
|
---|
| 45 | {
|
---|
[194] | 46 | // must inherit from QObject to use addOutput
|
---|
[193] | 47 | //addOutput<OutputType, @PACPUS_COMPONENT_NAME@>("output-name");
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | //////////////////////////////////////////////////////////////////////////
|
---|
[147] | 51 | void @PACPUS_COMPONENT_NAME@::startActivity()
|
---|
| 52 | {
|
---|
[216] | 53 | mImpl->start();
|
---|
[147] | 54 | }
|
---|
| 55 |
|
---|
| 56 | void @PACPUS_COMPONENT_NAME@::stopActivity()
|
---|
| 57 | {
|
---|
[216] | 58 | mImpl->stop();
|
---|
[147] | 59 | }
|
---|
| 60 |
|
---|
| 61 | //////////////////////////////////////////////////////////////////////////
|
---|
| 62 | ComponentBase::COMPONENT_CONFIGURATION @PACPUS_COMPONENT_NAME@::configureComponent(XmlComponentConfig config)
|
---|
| 63 | {
|
---|
| 64 | return ComponentBase::CONFIGURED_OK;
|
---|
| 65 | }
|
---|
[216] | 66 |
|
---|
| 67 | //////////////////////////////////////////////////////////////////////////
|
---|
| 68 | //void @PACPUS_COMPONENT_NAME@::processInput(InputType const& input)
|
---|
| 69 | //{
|
---|
| 70 | // mImpl->processInput(input);
|
---|
| 71 | //}
|
---|