source: pacpusframework/branches/2.0-beta1/src/_NewComponent/NewComponent.cpp.in@ 147

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

Added: scripts to create new component.

File size: 1.5 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/Log.h>
9
10using namespace pacpus;
11using namespace std;
12
13DECLARE_STATIC_LOGGER("pacpus.base.@PACPUS_COMPONENT_NAME@");
14
15/// Constructs a static component factory
16static ComponentFactory<@PACPUS_COMPONENT_NAME@> sFactory("@PACPUS_COMPONENT_NAME@");
17
18static const int kDefaultVerboseLevel = 1;
19
20//////////////////////////////////////////////////////////////////////////
21@PACPUS_COMPONENT_NAME@::@PACPUS_COMPONENT_NAME@(QString name)
22 : ComponentBase(name)
23{
24 LOG_TRACE("constructor(" << name << ")");
25}
26
27//////////////////////////////////////////////////////////////////////////
28@PACPUS_COMPONENT_NAME@::~@PACPUS_COMPONENT_NAME@()
29{
30 LOG_TRACE("destructor");
31}
32
33//////////////////////////////////////////////////////////////////////////
34void @PACPUS_COMPONENT_NAME@::startActivity()
35{
36}
37
38//////////////////////////////////////////////////////////////////////////
39void @PACPUS_COMPONENT_NAME@::stopActivity()
40{
41}
42
43//////////////////////////////////////////////////////////////////////////
44ComponentBase::COMPONENT_CONFIGURATION @PACPUS_COMPONENT_NAME@::configureComponent(XmlComponentConfig config)
45{
46 recording = config.getIntProperty("verbose", kDefaultVerboseLevel);
47 recording = config.getBoolProperty("recording");
48
49 return ComponentBase::CONFIGURED_OK;
50}
Note: See TracBrowser for help on using the repository browser.