ICF 3.1.1.10
Technical documentation of ICF Libraries
CComponentContext.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// Qt includes
10#include <QtCore/QByteArray>
11#include <QtCore/QMap>
12
13// ICF includes
15
16
17namespace icomp
18{
19
20
21class IRegistryElement;
22
23
30{
31public:
33 const IRegistryElement* elementPtr,
34 const IComponentStaticInfo* staticInfoPtr,
35 const IComponentContext* parentPtr,
36 const QByteArray& contextId);
37
38 QByteArray GetCompleteContextId() const;
39
40 // reimplemented (icomp::IComponentContext)
41 virtual const QByteArray& GetContextId() const;
42 virtual const IRegistryElement& GetRegistryElement() const;
43 virtual const IComponentStaticInfo& GetStaticInfo() const;
44 virtual const IComponentContext* GetParentContext() const;
45 virtual const iser::IObject* GetAttribute(const QByteArray& attributeId, int* definitionLevelPtr = nullptr) const;
46
47 // static methods
51 static QByteArray GetHierarchyAddress(const IComponentContext* contextPtr);
52
53protected:
59
60 bool CalcAttributeInfo(const QByteArray& attributeId, AttributeInfo& result) const;
61
62private:
63 const IRegistryElement& m_registryElement;
64 const IComponentStaticInfo& m_staticInfo;
65
66 const IComponentContext* m_parentPtr;
67
68 typedef QMap<QByteArray, AttributeInfo> AttributeMap;
69 mutable AttributeMap m_attributeMap;
70
71 QByteArray m_contextId;
72};
73
74
75} // namespace icomp
76
77
Base implementation of component session context.
QByteArray GetCompleteContextId() const
virtual const IComponentContext * GetParentContext() const
Get access to parent component context.
virtual const iser::IObject * GetAttribute(const QByteArray &attributeId, int *definitionLevelPtr=nullptr) const
Get attribute using its ID.
virtual const IComponentStaticInfo & GetStaticInfo() const
Get component static info associated with this context.
virtual const QByteArray & GetContextId() const
Get ID of this component in the context tree.
virtual const IRegistryElement & GetRegistryElement() const
Get access to component registry element object.
bool CalcAttributeInfo(const QByteArray &attributeId, AttributeInfo &result) const
static QByteArray GetHierarchyAddress(const IComponentContext *contextPtr)
Get address of this component identifying it in component topology hierarchy.
CComponentContext(const IRegistryElement *elementPtr, const IComponentStaticInfo *staticInfoPtr, const IComponentContext *parentPtr, const QByteArray &contextId)
Provide session context of component.
This interface provide static information about component meta info.
Represents element of registry describing component parameters.
Common interface for factorisable model objects.
Definition IObject.h:25
Package with interfaces and class used for components concept.

© Witold Gantzke and Kirill Lepskiy