source: pacpusframework/trunk/src/_NewComponent/NewComponent.cpp.in@ 193

Last change on this file since 193 was 193, checked in by Marek Kurdej, 11 years ago

Minor: NewComponent modifications: added addInputs, addOutputs.

File size: 1.9 KB
Line 
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"
7
8#include <Pacpus/kernel/ComponentFactory.h>
9#include <Pacpus/kernel/Log.h>
10
11using namespace pacpus;
12using namespace std;
13
14DECLARE_STATIC_LOGGER("pacpus.base.@PACPUS_COMPONENT_NAME@");
15
16/// Constructs a static component factory
17static ComponentFactory<@PACPUS_COMPONENT_NAME@> sFactory("@PACPUS_COMPONENT_NAME@");
18
19static const int kDefaultVerboseLevel = 1;
20
21//////////////////////////////////////////////////////////////////////////
22@PACPUS_COMPONENT_NAME@::@PACPUS_COMPONENT_NAME@(QString name)
23 : ComponentBase(name)
24{
25 LOG_TRACE("constructor(" << name << ")");
26
27 namespace po = boost::program_options;
28 //addParameters()
29 //("parameter-name", po::value<ParameterType>(&mParameterVariable)->required(), "parameter description")
30 //("parameter-name", po::value<ParameterType>(&mParameterVariable)->default_value(0), "parameter description")
31 //;
32}
33
34@PACPUS_COMPONENT_NAME@::~@PACPUS_COMPONENT_NAME@()
35{
36 LOG_TRACE("destructor");
37}
38
39//////////////////////////////////////////////////////////////////////////
40void @PACPUS_COMPONENT_NAME@::addInputs()
41{
42 //addInput<InputType, @PACPUS_COMPONENT_NAME@>("input-name", &@PACPUS_COMPONENT_NAME@::processInput);
43}
44
45void @PACPUS_COMPONENT_NAME@::addOutputs()
46{
47 //addOutput<OutputType, @PACPUS_COMPONENT_NAME@>("output-name");
48}
49
50//////////////////////////////////////////////////////////////////////////
51void @PACPUS_COMPONENT_NAME@::startActivity()
52{
53}
54
55void @PACPUS_COMPONENT_NAME@::stopActivity()
56{
57}
58
59//////////////////////////////////////////////////////////////////////////
60ComponentBase::COMPONENT_CONFIGURATION @PACPUS_COMPONENT_NAME@::configureComponent(XmlComponentConfig config)
61{
62 return ComponentBase::CONFIGURED_OK;
63}
Note: See TracBrowser for help on using the repository browser.