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

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

Minor: NewComponent modifications.

File size: 2.0 KB
RevLine 
[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"
7
[192]8#include <Pacpus/kernel/ComponentFactory.h>
[147]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 << ")");
[192]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 //;
[147]32}
33
34@PACPUS_COMPONENT_NAME@::~@PACPUS_COMPONENT_NAME@()
35{
36 LOG_TRACE("destructor");
37}
38
39//////////////////////////////////////////////////////////////////////////
[193]40void @PACPUS_COMPONENT_NAME@::addInputs()
41{
[194]42 // must inherit from QObject to use addInput
[193]43 //addInput<InputType, @PACPUS_COMPONENT_NAME@>("input-name", &@PACPUS_COMPONENT_NAME@::processInput);
44}
45
46void @PACPUS_COMPONENT_NAME@::addOutputs()
47{
[194]48 // must inherit from QObject to use addOutput
[193]49 //addOutput<OutputType, @PACPUS_COMPONENT_NAME@>("output-name");
50}
51
52//////////////////////////////////////////////////////////////////////////
[147]53void @PACPUS_COMPONENT_NAME@::startActivity()
54{
55}
56
57void @PACPUS_COMPONENT_NAME@::stopActivity()
58{
59}
60
61//////////////////////////////////////////////////////////////////////////
62ComponentBase::COMPONENT_CONFIGURATION @PACPUS_COMPONENT_NAME@::configureComponent(XmlComponentConfig config)
63{
64 return ComponentBase::CONFIGURED_OK;
65}
Note: See TracBrowser for help on using the repository browser.