Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
iinsp::CInspectionTaskComp Class Reference

Standard component implementation of interface iinsp::IInspectionTask. More...

#include <CInspectionTaskComp.h>

Inheritance diagram for iinsp::CInspectionTaskComp:
ilog::TLoggerCompWrap< Base > iinsp::IInspectionTask iinsp::ISupplier istd::IInformationProvider imod::CModelUpdateBridge ilog::CLoggerBase iser::ISerializable istd::IChangeable istd::IChangeable imod::IObserver ilog::ILoggable istd::ILogger istd::IChangeable istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic

Classes

class  MessageContainer
 
class  Parameters
 
class  Status
 
class  TaskStatusObserver
 

Public Types

enum  MessageId { MI_BAD_PARAMS_COUNT = 0x5af30, MI_NO_SUBTASK, MI_LOCAL }
 
typedef ilog::CLoggerComponentBase BaseClass
 
typedef imod::CModelUpdateBridge BaseClass2
 
- Public Types inherited from iinsp::ISupplier
enum  WorkStatus {
  WS_INVALID, WS_INIT, WS_LOCKED, WS_OK,
  WS_CANCELED, WS_FAILED
}
 
enum  ChangeFlags { CF_SUPPLIER_RESULTS = 0x6326415 }
 Data model change notification flags. More...
 
enum  MessageContainerType { MCT_RESULTS, MCT_TEMP, MTC_LAST = MCT_TEMP }
 

Public Member Functions

 I_REGISTER_SUBELEMENT_INTERFACE_T (Parameters, iprm::IParamsSet, ExtractParameters)
 
 I_REGISTER_SUBELEMENT_INTERFACE_T (Parameters, iser::ISerializable, ExtractParameters)
 
 I_REGISTER_SUBELEMENT_INTERFACE_T (Parameters, istd::IChangeable, ExtractParameters)
 
 I_REGISTER_SUBELEMENT_INTERFACE_T (Parameters, imod::IModel, ExtractParameters)
 
 CInspectionTaskComp ()
 
virtual int GetSubtasksCount () const
 Get number of inspection steps (subtasks). More...
 
virtual iinsp::ISupplierGetSubtask (int subtaskIndex) const
 Get single inspection steps (subtasks). More...
 
virtual iprm::IParamsSetGetGeneralParameters () const
 Get general parameters additionaly stored next to parameters stored in suppliers. More...
 
virtual bool Serialize (iser::IArchive &archive)
 
virtual int GetWorkStatus () const
 Get status of last work. More...
 
virtual imod::IModelGetWorkStatusModel () const
 Get access to the status model of the supplier. More...
 
virtual void InvalidateSupplier ()
 Called to signalize that this supplier is invalid. More...
 
virtual void EnsureWorkInitialized ()
 Force the supplier to initialize its work. More...
 
virtual void EnsureWorkFinished ()
 Ensure that all objects are produced. More...
 
virtual void ClearWorkResults ()
 Remove all stored work results. More...
 
virtual const
ilog::IMessageContainer
GetWorkMessages (int messageType) const
 Get messages outputted by this work. More...
 
virtual iprm::IParamsSetGetModelParametersSet () const
 Get parameter set using by this supplier. More...
 
virtual QDateTime GetInformationTimeStamp () const
 
virtual InformationCategory GetInformationCategory () const
 
virtual int GetInformationId () const
 
virtual QString GetInformationDescription () const
 
virtual QString GetInformationSource () const
 
virtual int GetInformationFlags () const
 
- Public Member Functions inherited from ilog::ILoggable
virtual void SetLogPtr (IMessageConsumer *logPtr)=0
 
virtual IMessageConsumerGetLogPtr () const =0
 
virtual void SetTracingEnabled (bool trace)=0
 
virtual bool IsTracingEnabled () const =0
 

Protected Types

typedef imod::TModelWrap< StatusStatusModel
 
typedef QVector
< iinsp::ISupplier * > 
Suppliers
 
typedef imod::TModelWrap
< Parameters
ParametersModel
 
typedef istd::TDelPtr
< istd::CChangeNotifier
NotifierPtr
 
typedef QMap< iinsp::ISupplier
*, NotifierPtr
SubtaskNotifiers
 
- Protected Types inherited from imod::CModelUpdateBridge
enum  UpdateFlags
 

Protected Member Functions

void EnsureStatusKnown ()
 
virtual void OnComponentCreated ()
 
virtual void OnComponentDestroyed ()
 
virtual void AfterUpdate (imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet)
 
- Protected Member Functions inherited from ilog::CLoggerBase
virtual void DecorateMessage (istd::IInformationProvider::InformationCategory category, int id, int flags, QString &message, QString &messageSource) const
 
- Protected Member Functions inherited from imod::CModelUpdateBridge
 CModelUpdateBridge (istd::IChangeable *changeablePtr, int updateFlags=UF_DELEGATED)
 
virtual ~CModelUpdateBridge ()
 
imod::IModelGetObservedModel (int modelIndex) const
 
int GetModelCount () const
 
void EnsureModelsDetached ()
 
virtual bool IsModelAttached (const imod::IModel *modelPtr) const
 
virtual bool OnModelAttached (imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask)
 
virtual bool OnModelDetached (imod::IModel *modelPtr)
 
virtual void BeforeUpdate (imod::IModel *modelPtr)
 

Static Protected Member Functions

template<class InterfaceType >
static InterfaceType * ExtractParameters (CInspectionTaskComp &component)
 

Protected Attributes

Suppliers m_subtasks
 
ParametersModel m_parameters
 
bool m_isStatusKnown
 
QDateTime m_resultTypeStamp
 
InformationCategory m_resultCategory
 
QString m_resultDescription
 
MessageContainer m_resultMessages
 
MessageContainer m_tempContainer
 
istd::IChangeable::ChangeSet m_supplierResultsChangeSet
 
SubtaskNotifiers m_subtaskNotifiers
 
TaskStatusObserver m_subTaskStatusObserver
 
StatusModel m_workStatus
 

Detailed Description

Standard component implementation of interface iinsp::IInspectionTask.

Serializing of this object serialize all inspection parameters.

Note
This implementation contains several aspects of the data model:
  1. The component itself represents the data model of the information status of the whole inspection.
  2. The sub-component Parameters represents the parameter of all sub-tasks.
  3. Working status of the whole inspection provided by the method GetWorkStatus.

Definition at line 35 of file CInspectionTaskComp.h.

Member Typedef Documentation

Definition at line 43 of file CInspectionTaskComp.h.

Definition at line 44 of file CInspectionTaskComp.h.

Definition at line 221 of file CInspectionTaskComp.h.

Definition at line 202 of file CInspectionTaskComp.h.

Definition at line 185 of file CInspectionTaskComp.h.

Definition at line 223 of file CInspectionTaskComp.h.

Definition at line 199 of file CInspectionTaskComp.h.

Member Enumeration Documentation

Enumerator
MI_BAD_PARAMS_COUNT 
MI_NO_SUBTASK 
MI_LOCAL 

Definition at line 46 of file CInspectionTaskComp.h.

Constructor & Destructor Documentation

iinsp::CInspectionTaskComp::CInspectionTaskComp ( )

Member Function Documentation

virtual void iinsp::CInspectionTaskComp::AfterUpdate ( imod::IModel modelPtr,
const istd::IChangeable::ChangeSet changeSet 
)
protectedvirtual

Reimplemented from imod::CModelUpdateBridge.

virtual void iinsp::CInspectionTaskComp::ClearWorkResults ( )
virtual

Remove all stored work results.

This set also work state to WS_INIT.

Implements iinsp::ISupplier.

void iinsp::CInspectionTaskComp::EnsureStatusKnown ( )
protected
virtual void iinsp::CInspectionTaskComp::EnsureWorkFinished ( )
virtual

Ensure that all objects are produced.

Implements iinsp::ISupplier.

virtual void iinsp::CInspectionTaskComp::EnsureWorkInitialized ( )
virtual

Force the supplier to initialize its work.

First if work is initialized, new calculation can be done.

Implements iinsp::ISupplier.

template<class InterfaceType >
static InterfaceType* iinsp::CInspectionTaskComp::ExtractParameters ( CInspectionTaskComp component)
inlinestaticprotected

Definition at line 206 of file CInspectionTaskComp.h.

References m_parameters.

virtual iprm::IParamsSet* iinsp::CInspectionTaskComp::GetGeneralParameters ( ) const
virtual

Get general parameters additionaly stored next to parameters stored in suppliers.

Implements iinsp::IInspectionTask.

virtual InformationCategory iinsp::CInspectionTaskComp::GetInformationCategory ( ) const
virtual
virtual QString iinsp::CInspectionTaskComp::GetInformationDescription ( ) const
virtual
virtual int iinsp::CInspectionTaskComp::GetInformationFlags ( ) const
virtual
virtual int iinsp::CInspectionTaskComp::GetInformationId ( ) const
virtual
virtual QString iinsp::CInspectionTaskComp::GetInformationSource ( ) const
virtual
virtual QDateTime iinsp::CInspectionTaskComp::GetInformationTimeStamp ( ) const
virtual
virtual iprm::IParamsSet* iinsp::CInspectionTaskComp::GetModelParametersSet ( ) const
virtual

Get parameter set using by this supplier.

The pointed object will not be relocated - no reconnect is needed if it is observed. If the supplier doesn't support parameters, it returns NULL.

Implements iinsp::ISupplier.

virtual iinsp::ISupplier* iinsp::CInspectionTaskComp::GetSubtask ( int  subtaskIndex) const
virtual

Get single inspection steps (subtasks).

Implements iinsp::IInspectionTask.

virtual int iinsp::CInspectionTaskComp::GetSubtasksCount ( ) const
virtual

Get number of inspection steps (subtasks).

Implements iinsp::IInspectionTask.

virtual const ilog::IMessageContainer* iinsp::CInspectionTaskComp::GetWorkMessages ( int  containerType) const
virtual

Get messages outputted by this work.

The pointed object will not be relocated - no reconnect is needed if it is observed. If the supplier doesn't support list of messages, it returns NULL.

Parameters
containerTypetype of message container,
See Also
MessageContainerType.

Implements iinsp::ISupplier.

virtual int iinsp::CInspectionTaskComp::GetWorkStatus ( ) const
virtual

Get status of last work.

Please note, that this status is not a part of supplier model and can be changed without any notification. If you want to observe the status model of the supplier, please use the GetWorkStatusModel method.

Returns
work status defined in iinsp::ISupplier::WorkStatus.
See Also
GetWorkStatusModel

Implements iinsp::ISupplier.

virtual imod::IModel* iinsp::CInspectionTaskComp::GetWorkStatusModel ( ) const
virtual

Get access to the status model of the supplier.

Implements iinsp::ISupplier.

iinsp::CInspectionTaskComp::I_REGISTER_SUBELEMENT_INTERFACE_T ( Parameters  ,
iprm::IParamsSet  ,
ExtractParameters   
)
iinsp::CInspectionTaskComp::I_REGISTER_SUBELEMENT_INTERFACE_T ( Parameters  ,
iser::ISerializable  ,
ExtractParameters   
)
iinsp::CInspectionTaskComp::I_REGISTER_SUBELEMENT_INTERFACE_T ( Parameters  ,
istd::IChangeable  ,
ExtractParameters   
)
iinsp::CInspectionTaskComp::I_REGISTER_SUBELEMENT_INTERFACE_T ( Parameters  ,
imod::IModel  ,
ExtractParameters   
)
virtual void iinsp::CInspectionTaskComp::InvalidateSupplier ( )
virtual

Called to signalize that this supplier is invalid.

This signal will be transfered to all supplier which are registered as output.

Returns
true, if initialization could be done.

Implements iinsp::ISupplier.

virtual void iinsp::CInspectionTaskComp::OnComponentCreated ( )
protectedvirtual
virtual void iinsp::CInspectionTaskComp::OnComponentDestroyed ( )
protectedvirtual
virtual bool iinsp::CInspectionTaskComp::Serialize ( iser::IArchive archive)
virtual

Member Data Documentation

bool iinsp::CInspectionTaskComp::m_isStatusKnown
protected

Definition at line 211 of file CInspectionTaskComp.h.

ParametersModel iinsp::CInspectionTaskComp::m_parameters
mutableprotected

Definition at line 203 of file CInspectionTaskComp.h.

Referenced by ExtractParameters().

InformationCategory iinsp::CInspectionTaskComp::m_resultCategory
protected

Definition at line 214 of file CInspectionTaskComp.h.

QString iinsp::CInspectionTaskComp::m_resultDescription
protected

Definition at line 215 of file CInspectionTaskComp.h.

MessageContainer iinsp::CInspectionTaskComp::m_resultMessages
protected

Definition at line 217 of file CInspectionTaskComp.h.

QDateTime iinsp::CInspectionTaskComp::m_resultTypeStamp
protected

Definition at line 213 of file CInspectionTaskComp.h.

SubtaskNotifiers iinsp::CInspectionTaskComp::m_subtaskNotifiers
protected

Definition at line 224 of file CInspectionTaskComp.h.

Suppliers iinsp::CInspectionTaskComp::m_subtasks
protected

Definition at line 200 of file CInspectionTaskComp.h.

TaskStatusObserver iinsp::CInspectionTaskComp::m_subTaskStatusObserver
protected

Definition at line 226 of file CInspectionTaskComp.h.

istd::IChangeable::ChangeSet iinsp::CInspectionTaskComp::m_supplierResultsChangeSet
protected

Definition at line 220 of file CInspectionTaskComp.h.

MessageContainer iinsp::CInspectionTaskComp::m_tempContainer
protected

Definition at line 218 of file CInspectionTaskComp.h.

StatusModel iinsp::CInspectionTaskComp::m_workStatus
protected

Definition at line 228 of file CInspectionTaskComp.h.


The documentation for this class was generated from the following file:

© 2007-2017 Witold Gantzke and Kirill Lepskiy