Base implementation of interface iinsp::ISupplier for iinsp::TSupplierCompWrap. More...
#include <CSupplierCompBase.h>
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 |
![]() | |
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::IModel * | GetWorkStatusModel () 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::IParamsSet * | GetModelParametersSet () const |
Get parameter set using by this supplier. More... | |
![]() | |
virtual void | SetLogPtr (IMessageConsumer *logPtr)=0 |
virtual IMessageConsumer * | GetLogPtr () const =0 |
virtual void | SetTracingEnabled (bool trace)=0 |
virtual bool | IsTracingEnabled () const =0 |
Protected Types | |
typedef imod::TModelWrap< Status > | StatusModel |
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 |
![]() | |
virtual void | DecorateMessage (istd::IInformationProvider::InformationCategory category, int id, int flags, QString &message, QString &messageSource) const |
Protected Attributes | |
MessageContainer | m_messageContainers [MTC_LAST+1] |
Base implementation of interface iinsp::ISupplier for iinsp::TSupplierCompWrap.
Definition at line 25 of file CSupplierCompBase.h.
Definition at line 30 of file CSupplierCompBase.h.
|
protected |
Definition at line 167 of file CSupplierCompBase.h.
|
protected |
Definition at line 111 of file CSupplierCompBase.h.
ID of messages.
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.
|
MI_INTERMEDIATE |
Id for intermediate results. |
Definition at line 36 of file CSupplierCompBase.h.
iinsp::CSupplierCompBase::CSupplierCompBase | ( | ) |
|
protectedvirtual |
Add ilog::CMessage to the internal message container (also from const functions).
messagePtr | pointer to the new message object. It cannot be NULL. It takes owneship of this object. |
containerType | type of message container, |
|
virtual |
Remove all stored work results.
This set also work state to WS_INIT
.
Implements iinsp::ISupplier.
Reimplemented in iinsp::TSupplierCompWrap< Product >, iinsp::TSupplierCompWrap< imeas::CGeneralDataSequence >, iinsp::TSupplierCompWrap< istd::TDelPtr< const i2d::ICalibration2d > >, iinsp::TSupplierCompWrap< iipr::CFeaturesContainer >, iinsp::TSupplierCompWrap< QVector< i2d::CLine2d > >, iinsp::TSupplierCompWrap< istd::TPointerVector< const iimg::IBitmap > >, iinsp::TSupplierCompWrap< QPair< i2d::ITransformation2d *, istd::TDelPtr< iimg::IBitmap > > >, iinsp::TSupplierCompWrap< CEdgeLineContainer >, iinsp::TSupplierCompWrap< imeas::CSimpleNumericValue >, iinsp::TSupplierCompWrap< istd::TDelPtr< iimg::IMultiBitmapProvider > >, iinsp::TSupplierCompWrap< imod::TModelWrap< imeas::CSimpleSamplesSequence32 > >, iinsp::TSupplierCompWrap< QVector< imeas::CGeneralDataSequence > >, iinsp::TSupplierCompWrap< istd::TDelPtr< iimg::IBitmap > >, iinsp::TSupplierCompWrap< QPair< i2d::ICalibration2d *, istd::TDelPtr< iimg::IBitmap > > >, iinsp::TSupplierCompWrap< CFeaturesContainer >, iinsp::TSupplierCompWrap< icalib::CSimpleLensCorrection >, iinsp::TSupplierCompWrap< icalib::CPerspectiveCalibration2d >, iinsp::TSupplierCompWrap< QPair< istd::TDelPtr< const i2d::ICalibration2d >, istd::TDelPtr< iimg::IBitmap > > >, and iinsp::TSupplierCompWrap< QPair< iipr::CFeaturesContainer, std::vector< icalib::CAffineCalibration2d > > >.
|
virtual |
Ensure that all objects are produced.
Implements iinsp::ISupplier.
|
virtual |
Force the supplier to initialize its work.
First if work is initialized, new calculation can be done.
Implements iinsp::ISupplier.
|
protectedvirtual |
Get supplier name used for diagnostic reasons.
|
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 |
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.
containerType | type of message container, |
Implements iinsp::ISupplier.
|
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.
Implements iinsp::ISupplier.
|
virtual |
Get access to the status model of the supplier.
Implements iinsp::ISupplier.
|
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 |
Called to signalize that this supplier is invalid.
This signal will be transfered to all supplier which are registered as output.
Implements iinsp::ISupplier.
|
protectedvirtual |
Check if message container is supported.
containerType | type of message container, |
|
protectedvirtual |
Reimplemented in iipr::CCheckboardCalibSupplierComp, iipr::CLensCorrFindSupplierComp, iedge::CEdgeBasedFeaturesSupplierComp, iipr::CColorPatternComparatorComp, iipr::CSearchBasedFeaturesSupplierComp, iipr::CProcessedBitmapSupplierBase, icam::CSelectableBitmapSupplierComp, iipr::CDifferenceBitmapSupplierComp, icam::CSnapBitmapSupplierCompBase, icam::CBitmapSupplierMultiplexerComp, iipr::CPositionFromImageSupplierComp, iipr::CMultiPointPosCorrSupplierComp, iipr::CMultiLineProjectionSupplierComp, iipr::CBitmapJoinerSupplierComp, iedge::CExtractedEdgeLinesSupplierComp, iipr::CEdgeDistancesSupplierComp, iipr::CImageHistogramSupplierComp, iipr::CProjectionSupplierComp, iipr::CExtremumCaliperSupplierComp, iedge::CProcessedEdgeLinesSupplierComp, and iipr::CTubeProjectionLinesProviderComp.
|
protectedvirtual |
Reimplemented in iedge::CEdgeBasedFeaturesSupplierComp, iipr::CColorPatternComparatorComp, iipr::CSearchBasedFeaturesSupplierComp, iipr::CProcessedBitmapSupplierBase, icam::CSelectableBitmapSupplierComp, icam::CBitmapSupplierMultiplexerComp, iipr::CImageHistogramSupplierComp, and iipr::CTubeProjectionLinesProviderComp.
|
protectedvirtual |
Called if the supplier parameters was changed.
Default implementation do nothing. It is dedicated to be overridden.
|
protectedpure virtual |
Implemented in iinsp::TSupplierCompWrap< Product >, iinsp::TSupplierCompWrap< imeas::CGeneralDataSequence >, iinsp::TSupplierCompWrap< istd::TDelPtr< const i2d::ICalibration2d > >, iinsp::TSupplierCompWrap< iipr::CFeaturesContainer >, iinsp::TSupplierCompWrap< QVector< i2d::CLine2d > >, iinsp::TSupplierCompWrap< istd::TPointerVector< const iimg::IBitmap > >, iinsp::TSupplierCompWrap< QPair< i2d::ITransformation2d *, istd::TDelPtr< iimg::IBitmap > > >, iinsp::TSupplierCompWrap< CEdgeLineContainer >, iinsp::TSupplierCompWrap< imeas::CSimpleNumericValue >, iinsp::TSupplierCompWrap< istd::TDelPtr< iimg::IMultiBitmapProvider > >, iinsp::TSupplierCompWrap< imod::TModelWrap< imeas::CSimpleSamplesSequence32 > >, iinsp::TSupplierCompWrap< QVector< imeas::CGeneralDataSequence > >, iinsp::TSupplierCompWrap< istd::TDelPtr< iimg::IBitmap > >, iinsp::TSupplierCompWrap< QPair< i2d::ICalibration2d *, istd::TDelPtr< iimg::IBitmap > > >, iinsp::TSupplierCompWrap< CFeaturesContainer >, iinsp::TSupplierCompWrap< icalib::CSimpleLensCorrection >, iinsp::TSupplierCompWrap< icalib::CPerspectiveCalibration2d >, iinsp::TSupplierCompWrap< QPair< istd::TDelPtr< const i2d::ICalibration2d >, istd::TDelPtr< iimg::IBitmap > > >, and iinsp::TSupplierCompWrap< QPair< iipr::CFeaturesContainer, std::vector< icalib::CAffineCalibration2d > > >.
|
protectedvirtual |
Register supplier input.
Changes of supplier input will force this supplier invalidate. All registered inputs will be unregistered during component destruction (OnComponentDestryed method).
modelPtr | input model. It cannot be nullptr . |
supplierPtr | optional supplier corresponding to the input model. It will be automatically initialized for new work. |
|
protectedvirtual |
Unregister supplier input.
Changes of this input will no more invalidate this supplier.
|
mutableprotected |
Definition at line 168 of file CSupplierCompBase.h.
© 2007-2017 Witold Gantzke and Kirill Lepskiy