ICF 3.1.1.10
Technical documentation of ICF Libraries
TComponentStaticInfo.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// ICF includes
12
13
14namespace icomp
15{
16
17
18template <class Component>
20{
21public:
23
24 explicit TComponentStaticInfo(const IRealComponentStaticInfo* baseComponentPtr = nullptr);
25
26 // reimplemented (icomp::IRealComponentStaticInfo)
27 std::unique_ptr<IComponent> CreateComponent() const override;
28
29 // reimplemented (icomp::IComponentStaticInfo)
30 ComponentType GetComponentType() const override;
31};
32
33
34// public methods
35
36template <class Component>
41
42
43// reimplemented (icomp::IRealComponentStaticInfo)
44
45template <class Component>
46std::unique_ptr<IComponent> TComponentStaticInfo<Component>::CreateComponent() const
47{
48 return std::unique_ptr<IComponent>{new TComponentWrap<Component>()};
49}
50
51
52// reimplemented (icomp::IComponentStaticInfo)
53
54template <class Component>
59
60
61} // namespace icomp
62
63
Standard implementation of static info for base component classes.
ComponentType
Specify type of the component realization.
Interface adding to component static info functionality existing only for real components.
ComponentType GetComponentType() const override
Get information about component type.
CBaseComponentStaticInfo BaseClass
TComponentStaticInfo(const IRealComponentStaticInfo *baseComponentPtr=nullptr)
std::unique_ptr< IComponent > CreateComponent() const override
Create component instance.
Wrapper of end component implementation used to correct control of component life-cycle.
Package with interfaces and class used for components concept.

© Witold Gantzke and Kirill Lepskiy