Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
iinsp::CSupplierCompBase Class Referenceabstract

Base implementation of interface iinsp::ISupplier for iinsp::TSupplierCompWrap. More...

#include <CSupplierCompBase.h>

Inheritance diagram for iinsp::CSupplierCompBase:
ilog::TLoggerCompWrap< Base > iinsp::ISupplier ilog::CLoggerBase istd::IChangeable ilog::ILoggable istd::ILogger istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic iinsp::TSupplierCompWrap< Product > iinsp::TSupplierCompWrap< CEdgeLineContainer > iinsp::TSupplierCompWrap< CFeaturesContainer > iinsp::TSupplierCompWrap< icalib::CPerspectiveCalibration2d > iinsp::TSupplierCompWrap< icalib::CSimpleLensCorrection > iinsp::TSupplierCompWrap< iipr::CFeaturesContainer > iinsp::TSupplierCompWrap< imeas::CGeneralDataSequence > iinsp::TSupplierCompWrap< imeas::CSimpleNumericValue > iinsp::TSupplierCompWrap< imod::TModelWrap< imeas::CSimpleSamplesSequence32 > > iinsp::TSupplierCompWrap< istd::TDelPtr< const i2d::ICalibration2d > > iinsp::TSupplierCompWrap< istd::TDelPtr< iimg::IBitmap > > iinsp::TSupplierCompWrap< istd::TDelPtr< iimg::IMultiBitmapProvider > > iinsp::TSupplierCompWrap< istd::TPointerVector< const iimg::IBitmap > > iinsp::TSupplierCompWrap< QPair< i2d::ICalibration2d *, istd::TDelPtr< iimg::IBitmap > > > iinsp::TSupplierCompWrap< QPair< i2d::ITransformation2d *, istd::TDelPtr< iimg::IBitmap > > > iinsp::TSupplierCompWrap< QPair< iipr::CFeaturesContainer, std::vector< icalib::CAffineCalibration2d > > > iinsp::TSupplierCompWrap< QPair< istd::TDelPtr< const i2d::ICalibration2d >, istd::TDelPtr< iimg::IBitmap > > > iinsp::TSupplierCompWrap< QVector< i2d::CLine2d > > iinsp::TSupplierCompWrap< QVector< imeas::CGeneralDataSequence > >

Classes

class  Status
 
class  Timer
 

Public Types

enum  MessageId { MI_DURATION_TIME = 0x077a1b, MI_GEOMETRICAL_RESULT, MI_SUPPLIER_RESULTS_STATUS, MI_INTERMEDIATE }
 ID of messages. More...
 
typedef ilog::CLoggerComponentBase BaseClass
 
- 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

 CSupplierCompBase ()
 
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 containerType) const
 Get messages outputted by this work. More...
 
virtual iprm::IParamsSetGetModelParametersSet () const
 Get parameter set using by this supplier. More...
 
- 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 imod::TModelWrap
< ilog::CMessageContainer
MessageContainer
 

Protected Member Functions

virtual bool InitializeWork ()
 Called if the new work should be initialized. More...
 
virtual void OnParametersChanged ()
 Called if the supplier parameters was changed. More...
 
virtual void RegisterSupplierInput (imod::IModel *modelPtr, ISupplier *supplierPtr=NULL)
 Register supplier input. More...
 
virtual void UnregisterSupplierInput (imod::IModel *modelPtr)
 Unregister supplier input. More...
 
virtual QString GetDiagnosticName () const
 Get supplier name used for diagnostic reasons. More...
 
virtual bool IsMessageContainerSupported (int containerType) const
 Check if message container is supported. More...
 
virtual void AddMessage (const istd::IInformationProvider *messagePtr, int containerType=MCT_RESULTS) const
 Add ilog::CMessage to the internal message container (also from const functions). More...
 
virtual void OnComponentCreated ()
 
virtual void OnComponentDestroyed ()
 
virtual int ProcessWorkOutput ()=0
 
- Protected Member Functions inherited from ilog::CLoggerBase
virtual void DecorateMessage (istd::IInformationProvider::InformationCategory category, int id, int flags, QString &message, QString &messageSource) const
 

Protected Attributes

MessageContainer m_messageContainers [MTC_LAST+1]
 

Detailed Description

Base implementation of interface iinsp::ISupplier for iinsp::TSupplierCompWrap.

Definition at line 25 of file CSupplierCompBase.h.

Member Typedef Documentation

Definition at line 30 of file CSupplierCompBase.h.

Definition at line 167 of file CSupplierCompBase.h.

Definition at line 111 of file CSupplierCompBase.h.

Member Enumeration Documentation

ID of messages.

See Also
istd::IInformationProvider
Enumerator
MI_DURATION_TIME 

The message contains product calculation time.

MI_GEOMETRICAL_RESULT 

The message describes main geometrical result.

MI_SUPPLIER_RESULTS_STATUS 

The message describes status of the supplier results.

See Also
istd::IInformationProvider
MI_INTERMEDIATE 

Id for intermediate results.

Definition at line 36 of file CSupplierCompBase.h.

Constructor & Destructor Documentation

iinsp::CSupplierCompBase::CSupplierCompBase ( )

Member Function Documentation

virtual void iinsp::CSupplierCompBase::AddMessage ( const istd::IInformationProvider messagePtr,
int  containerType = MCT_RESULTS 
) const
protectedvirtual

Add ilog::CMessage to the internal message container (also from const functions).

Parameters
messagePtrpointer to the new message object. It cannot be NULL. It takes owneship of this object.
containerTypetype of message container,
See Also
iinsp::ISupplier::MessageContainerType. If this container is not supported, message object will be deleted.
virtual void iinsp::CSupplierCompBase::ClearWorkResults ( )
virtual
virtual void iinsp::CSupplierCompBase::EnsureWorkFinished ( )
virtual

Ensure that all objects are produced.

Implements iinsp::ISupplier.

virtual void iinsp::CSupplierCompBase::EnsureWorkInitialized ( )
virtual

Force the supplier to initialize its work.

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

Implements iinsp::ISupplier.

virtual QString iinsp::CSupplierCompBase::GetDiagnosticName ( ) const
protectedvirtual

Get supplier name used for diagnostic reasons.

virtual iprm::IParamsSet* iinsp::CSupplierCompBase::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 const ilog::IMessageContainer* iinsp::CSupplierCompBase::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::CSupplierCompBase::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::CSupplierCompBase::GetWorkStatusModel ( ) const
virtual

Get access to the status model of the supplier.

Implements iinsp::ISupplier.

virtual bool iinsp::CSupplierCompBase::InitializeWork ( )
protectedvirtual

Called if the new work should be initialized.

Default implementation do nothing. It is dedicated to be overridden.

Reimplemented in iedge::CEdgeBasedFeaturesSupplierComp, iipr::CSearchBasedFeaturesSupplierComp, icam::CMultiCameraBitmapSupplierComp, icam::CMultiSourceSnapBitmapSupplierComp, icam::CSnapBitmapSupplierCompBase, and icam::CSnapMultiPageBitmapSupplierComp.

virtual void iinsp::CSupplierCompBase::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 bool iinsp::CSupplierCompBase::IsMessageContainerSupported ( int  containerType) const
protectedvirtual

Check if message container is supported.

Parameters
containerTypetype of message container,
See Also
iinsp::ISupplier::MessageContainerType.
virtual void iinsp::CSupplierCompBase::OnComponentCreated ( )
protectedvirtual
virtual void iinsp::CSupplierCompBase::OnComponentDestroyed ( )
protectedvirtual
virtual void iinsp::CSupplierCompBase::OnParametersChanged ( )
protectedvirtual

Called if the supplier parameters was changed.

Default implementation do nothing. It is dedicated to be overridden.

virtual int iinsp::CSupplierCompBase::ProcessWorkOutput ( )
protectedpure virtual
virtual void iinsp::CSupplierCompBase::RegisterSupplierInput ( imod::IModel modelPtr,
ISupplier supplierPtr = NULL 
)
protectedvirtual

Register supplier input.

Changes of supplier input will force this supplier invalidate. All registered inputs will be unregistered during component destruction (OnComponentDestryed method).

Parameters
modelPtrinput model. It cannot be nullptr.
supplierPtroptional supplier corresponding to the input model. It will be automatically initialized for new work.
virtual void iinsp::CSupplierCompBase::UnregisterSupplierInput ( imod::IModel modelPtr)
protectedvirtual

Unregister supplier input.

Changes of this input will no more invalidate this supplier.

Member Data Documentation

MessageContainer iinsp::CSupplierCompBase::m_messageContainers[MTC_LAST+1]
mutableprotected

Definition at line 168 of file CSupplierCompBase.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy