6#ifndef iinsp_CInspectionTaskComp_included
7#define iinsp_CInspectionTaskComp_included
60 I_REGISTER_SUBELEMENT(Parameters);
65 I_ASSIGN_MULTI_0(m_subtasksCompPtr,
"Subtasks",
"List of subtasks (suppliers)",
true);
66 I_ASSIGN_TO(m_subtaskModelsCompPtr, m_subtasksCompPtr,
true);
67 I_ASSIGN_TO(m_subtaskInspectionCompPtr, m_subtasksCompPtr,
false);
68 I_ASSIGN_TO(m_subtaskInfoProviderCompPtr, m_subtasksCompPtr,
false);
69 I_ASSIGN_MULTI_0(m_additionalSupppliersCompPtr,
"AdditionalSuppliers",
"Set of suppliers will be initialized and controlled together with subtasks, but they will be not listed as subtasks",
false);
70 I_ASSIGN(m_serializeSuppliersAttrPtr,
"SerializeSuppliers",
"If it is true, parameters of suppliers will be serialized",
true,
true);
71 I_ASSIGN(m_reduceHierarchyAttrPtr,
"ReduceHierarchy",
"If it is true, sub inspection tasks will be rolled out",
true,
false);
72 I_ASSIGN(m_generalParamsCompPtr,
"GeneralParams",
"Optional general parameter set, it will be always serialized",
false,
"GeneralParams");
73 I_ASSIGN_TO(m_generalParamsModelCompPtr, m_generalParamsCompPtr,
true);
74 I_ASSIGN(m_diagnosticNameAttrPtr,
"DiagnosticName",
"Name of this supplier for diagnostic, if it is not set, no diagnostic log message will be send",
false,
"");
75 I_ASSIGN(m_supportTempMessagesAttrPtr,
"SupportTempMessages",
"If enabled cumulation of temporary messages will be supported",
true,
false);
197 I_ATTR(
bool, m_serializeSuppliersAttrPtr);
198 I_ATTR(
bool, m_reduceHierarchyAttrPtr);
201 I_ATTR(QString, m_diagnosticNameAttrPtr);
202 I_ATTR(
bool, m_supportTempMessagesAttrPtr);
210 template <
class InterfaceType>
istd::IInformationProvider::InformationCategory GetWorstCategory() const override
bool Serialize(iser::IArchive &archive) override
void ClearMessages() override
Messages GetMessages() const override
MessageContainer(CInspectionTaskComp *parentPtr, iinsp::ISupplier::MessageContainerType containerType)
ilog::CMessageContainer BaseClass
const iser::ISerializable * GetParameter(const QByteArray &id) const override
Get any parameter.
iser::ISerializable * GetEditableParameter(const QByteArray &id) override
Get access to editable parameter.
bool ResetData(CompatibilityMode mode=CM_WITHOUT_REFS) override
Reset data to its default state.
bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
Ids GetParamIds(bool editableOnly=false) const override
Get list of used parameter IDs in the parameter set.
void SetParent(CInspectionTaskComp *parentPtr)
bool CopyFrom(const istd::IChangeable &object, istd::IChangeable::CompatibilityMode mode=CM_WITHOUT_REFS) override
Copy this object from another one.
int GetSupplierState() const
void SetSupplierState(int state)
virtual void AfterModelChange(imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet)
This function will be called after update of the observer contents occures.
imod::CMultiModelObserverBase BaseClass
TaskStatusObserver(CInspectionTaskComp *parentPtr)
Standard component implementation of interface iinsp::IInspectionTask.
imod::CModelUpdateBridge BaseClass2
const ilog::IMessageContainer * GetWorkMessages(int messageType) const override
Get messages outputted by this work.
int GetInformationId() const override
Get binary ID of the information using to automatical identification of this information type.
std::unique_ptr< istd::CChangeNotifier > NotifierPtr
MessageContainer m_tempContainer
iprm::IParamsSet * GetGeneralParameters() const override
Get general parameters additionaly stored next to parameters stored in suppliers.
bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
std::map< iinsp::ISupplier *, NotifierPtr > SubtaskNotifiers
void ClearWorkResults() override
Remove all stored work results.
iinsp::ISupplier * GetSubtask(int subtaskIndex) const override
Get single inspection steps (subtasks).
ParametersModel m_parameters
iprm::IParamsSet * GetModelParametersSet() const override
Get parameter set using by this supplier.
int GetInformationFlags() const override
Get flags of the information.
void OnComponentDestroyed() override
SubtaskNotifiers m_subtaskNotifiers
int GetSubtasksCount() const override
Get number of inspection steps (subtasks).
static InterfaceType * ExtractParameters(CInspectionTaskComp &component)
int GetWorkStatus() const override
Get status of last work.
void OnComponentCreated() override
TaskStatusObserver m_subTaskStatusObserver
imod::TModelWrap< Parameters > ParametersModel
QDateTime m_resultTypeStamp
InformationCategory GetInformationCategory() const override
Get category of the information.
void AfterModelChange(imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet) override
This function will be called after update of the observer contents occures.
MessageContainer m_resultMessages
QString GetInformationSource() const override
Get the source of the information.
QString m_resultDescription
QDateTime GetInformationTimeStamp() const override
Get optional time stamp of the information.
void EnsureWorkFinished() override
Ensure that all objects are produced.
QString GetInformationDescription() const override
Get the text description of the information.
InformationCategory m_resultCategory
ilog::CLoggerComponentBase BaseClass
void InvalidateSupplier() override
Called to signalize that this supplier is invalid.
istd::IChangeable::ChangeSet m_supplierResultsChangeSet
imod::TModelWrap< Status > StatusModel
imod::IModel * GetWorkStatusModel() const override
Get access to the status model of the supplier.
QVector< iinsp::ISupplier * > Suppliers
void EnsureWorkInitialized() override
Force the supplier to initialize its work.
Representation of complete inspection task.
Base interface for suppliers providing calculating of objects on demand ("pull data" model).
Basic implementation of a message container.
Common interface for a message container.
Wrapper provider of log-functionality for component based implementations.
Reflects the changes of observed objects as changes of some other object (over istd::IChangeable),...
Basic implementation of a multiple model observer.
Common interface for model objects, that supports Model/Observer design pattern.
This model wrapper provides a simple connection between a concrete istd::IChangeable implementation a...
Set of general parameters.
Represent input/output persistence archive.
Common class for all classes which objects can be archived or restored from archive.
Set of change flags (its IDs).
Common interface for data model objects, which can be changed.
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Library containing inspection related classes and components.