CComponentContext.h
Go to the documentation of this file.
1 #ifndef icomp_CComponentContext_included
2 #define icomp_CComponentContext_included
3 
4 
5 // Qt includes
6 #include <QtCore/QByteArray>
7 #include <QtCore/QMap>
8 
9 // ACF includes
11 
12 
13 namespace icomp
14 {
15 
16 
17 class IRegistryElement;
18 
19 
25 class CComponentContext: virtual public IComponentContext
26 {
27 public:
29  const IRegistryElement* elementPtr,
30  const IComponentStaticInfo* staticInfoPtr,
31  const IComponentContext* parentPtr,
32  const QByteArray& contextId);
33 
34  QByteArray GetCompleteContextId() const;
35 
36  // reimplemented (icomp::IComponentContext)
37  virtual const QByteArray& GetContextId() const;
38  virtual const IRegistryElement& GetRegistryElement() const;
39  virtual const IComponentStaticInfo& GetStaticInfo() const;
40  virtual const IComponentContext* GetParentContext() const;
41  virtual const iser::IObject* GetAttribute(const QByteArray& attributeId, int* definitionLevelPtr = NULL) const;
42 
43  // static methods
47  static QByteArray GetHierarchyAddress(const IComponentContext* contextPtr);
48 
49 protected:
51  {
54  };
55 
56  bool CalcAttributeInfo(const QByteArray& attributeId, AttributeInfo& result) const;
57 
58 private:
59  const IRegistryElement& m_registryElement;
60  const IComponentStaticInfo& m_staticInfo;
61 
62  const IComponentContext* m_parentPtr;
63 
64  typedef QMap<QByteArray, AttributeInfo> AttributeMap;
65  mutable AttributeMap m_attributeMap;
66 
67  QByteArray m_contextId;
68 };
69 
70 
71 } // namespace icomp
72 
73 
74 #endif // !icomp_CComponentContext_included
75 
76 
virtual const iser::IObject * GetAttribute(const QByteArray &attributeId, int *definitionLevelPtr=NULL) const
Get attribute using its ID.
virtual const IComponentStaticInfo & GetStaticInfo() const
Get component static info associated with this context.
bool CalcAttributeInfo(const QByteArray &attributeId, AttributeInfo &result) const
virtual const QByteArray & GetContextId() const
Get ID of this component in the context tree.
Provide session context of component.
Common interface for factorisable model objects.
Definition: IObject.h:19
virtual const IRegistryElement & GetRegistryElement() const
Get access to component registry element object.
CComponentContext(const IRegistryElement *elementPtr, const IComponentStaticInfo *staticInfoPtr, const IComponentContext *parentPtr, const QByteArray &contextId)
virtual const IComponentContext * GetParentContext() const
Get access to parent component context.
Represents element of registry describing component parameters.
#define NULL
Definition: istd.h:64
QByteArray GetCompleteContextId() const
static QByteArray GetHierarchyAddress(const IComponentContext *contextPtr)
Get address of this component identifying it in component topology hierarchy.
Base implementation of component session context.
This interface provide static information about component meta info.

© 2007-2017 Witold Gantzke and Kirill Lepskiy