10#include <QtCore/QByteArray>
11#include <QtCore/QString>
51 bool SetRef(
const QByteArray& referenceId,
IComponent* componentPtr,
const QByteArray& subelementId =
"");
76 bool SetIntAttr(
const QByteArray& attributeId,
int value);
86 bool SetStringAttr(
const QByteArray& attributeId,
const QString& value);
91 bool SetIdAttr(
const QByteArray& attributeId,
const QByteArray& value);
98 template <
class Attribute>
106 if (existingInfoPtr !=
nullptr){
111 if (newInfoPtr !=
nullptr){
113 if (attribute ==
nullptr){
114 attributePtr = std::make_unique<iattr::TMultiAttribute<Attribute>>();
121 if (multiAttrPtr !=
nullptr){
142 template <
class AttrType>
159template <
class AttrType>
163 if (attributeInfoPtr !=
nullptr){
166 return attributeType == AttrType::GetTypeName();
Template implementation of multiple component attribute.
virtual void InsertValue(const Value &value)
virtual AttributeInfo * GetAttributeInfo(const QByteArray &attributeId)
virtual AttributeInfo * InsertAttributeInfo(const QByteArray &attributeId, const QByteArray &attributeType)
Insert new attribute info object to collection of attributes.
CSimComponentContextBase(const IComponentStaticInfo *infoPtr)
QMap< QByteArray, IComponent * > ComponentsMap
bool SetIdAttr(const QByteArray &attributeId, const QByteArray &value)
Set instance of QByteArray attribute.
istd::TIFactory< IComponent > ComponentsFactory
bool InsertMultiAttr(const QByteArray &attributeId, const QString &attribute)
virtual const iser::IObject * GetAttribute(const QByteArray &attributeId, int *definitionLevelPtr=nullptr) const
Get attribute using its ID.
virtual const IRegistryElement & GetRegistryElement() const
Get access to component registry element object.
bool InsertMultiAttr(const QByteArray &attributeId, const Attribute &attribute)
Insert new attribute to multi attributes.
bool SetFactory(const QByteArray &factoryId, const ComponentsFactory *factoryPtr)
Set factory of component instance.
bool SetBoolAttr(const QByteArray &attributeId, bool value)
Set instance of bool attribute.
bool SetAttr(const QByteArray &attributeId, const iser::IObject *attributePtr)
Set named attribute.
bool IsAttributeTypeCorrect(const QByteArray &attributeId)
Check if attribute type is corrected.
bool InsertMultiRef(const QByteArray &referenceId, IComponent *componentPtr, const QByteArray &subelementId="")
Set named reference to some component.
bool SetStringAttr(const QByteArray &attributeId, const QString &value)
Set instance of QString attribute.
ComponentsMap m_componentsMap
bool SetRef(const QByteArray &referenceId, IComponent *componentPtr, const QByteArray &subelementId="")
Set named reference to some component.
QMap< QByteArray, const ComponentsFactory * > FactoriesMap
bool InsertMultiFactory(const QByteArray &factoryId, const ComponentsFactory *factoryPtr)
Insert new factory instance into multi-factory attribute.
virtual const IComponentStaticInfo & GetStaticInfo() const
Get component static info associated with this context.
FactoriesMap m_factoriesMap
bool SetDoubleAttr(const QByteArray &attributeId, double value)
Set instance of double attribute.
bool SetIntAttr(const QByteArray &attributeId, int value)
Set instance of int attribute.
virtual const IComponentContext * GetParentContext() const
Get access to parent component context.
Describe component attribute static information.
Provide session context of component.
Main component interface.
This interface provide static information about component meta info.
virtual const IAttributeStaticInfo * GetAttributeInfo(const QByteArray &attributeId) const =0
Get set of attributes.
Represents element of registry describing component parameters.
std::unique_ptr< iser::IObject > AttributePtr
Common interface for factorisable model objects.
const QByteArray & GetName() const
Get undecorated and platform undependent class name.
Base implementation for operations on composed ID objects.
Generic interface for a factory.
Package with interfaces and class used for components concept.
Describe information stored with each attribute.
AttributePtr attributePtr