Public Types | Public Member Functions | List of all members
iinsp::ISupplier Class Referenceabstract

Base interface for suppliers providing calculating of objects on demand ("pull data" model). More...

#include <ISupplier.h>

Inheritance diagram for iinsp::ISupplier:
istd::IChangeable istd::IPolymorphic iinsp::CInspectionTaskComp iinsp::CSupplierCompBase iinsp::IEnableableSupplier iipr::CDelegatedBitmapSupplierComp 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 > > iinsp::CSupplierActivationProxyComp

Public Types

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

virtual int GetWorkStatus () const =0
 Get status of last work. More...
 
virtual imod::IModelGetWorkStatusModel () const =0
 Get access to the status model of the supplier. More...
 
virtual void InvalidateSupplier ()=0
 Called to signalize that this supplier is invalid. More...
 
virtual void EnsureWorkInitialized ()=0
 Force the supplier to initialize its work. More...
 
virtual void EnsureWorkFinished ()=0
 Ensure that all objects are produced. More...
 
virtual void ClearWorkResults ()=0
 Remove all stored work results. More...
 
virtual const
ilog::IMessageContainer
GetWorkMessages (int containerType) const =0
 Get messages outputted by this work. More...
 
virtual iprm::IParamsSetGetModelParametersSet () const =0
 Get parameter set using by this supplier. More...
 

Detailed Description

Base interface for suppliers providing calculating of objects on demand ("pull data" model).

Additional interfaces (providers) should provide access to intern stored calculated output objects. For example image provider should provide method {const iimg::IImage* GetImage() const}, where the image will be calculated on demand.

SupplierStates.svg

Definition at line 22 of file ISupplier.h.

Member Enumeration Documentation

Data model change notification flags.

Enumerator
CF_SUPPLIER_RESULTS 

Supplier result changed.

Definition at line 56 of file ISupplier.h.

Enumerator
MCT_RESULTS 
MCT_TEMP 
MTC_LAST 

Definition at line 64 of file ISupplier.h.

Enumerator
WS_INVALID 

Supplier is invalidated, no result is produced.

WS_INIT 

New work is initialized and will produce new result on demand.

WS_LOCKED 

Supplier is locked becouse it is doing processing step.

WS_OK 

Work was done correctly and no error occure.

WS_CANCELED 

Work was canceled.

WS_FAILED 

Work couldn't be done.

Definition at line 25 of file ISupplier.h.

Member Function Documentation

virtual void iinsp::ISupplier::ClearWorkResults ( )
pure virtual

Remove all stored work results.

This set also work state to WS_INIT.

Implemented in iinsp::CInspectionTaskComp, iinsp::CSupplierCompBase, iipr::CDelegatedBitmapSupplierComp, iinsp::CSupplierActivationProxyComp, 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 void iinsp::ISupplier::EnsureWorkFinished ( )
pure virtual
virtual void iinsp::ISupplier::EnsureWorkInitialized ( )
pure virtual

Force the supplier to initialize its work.

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

Implemented in iinsp::CInspectionTaskComp, iinsp::CSupplierCompBase, iipr::CDelegatedBitmapSupplierComp, and iinsp::CSupplierActivationProxyComp.

Referenced by iqtinsp::TSupplierGuiCompBase< UI >::DoTest(), and iqtinsp::TGeneralSupplierGuiComp< UI >::Test().

virtual iprm::IParamsSet* iinsp::ISupplier::GetModelParametersSet ( ) const
pure virtual
virtual const ilog::IMessageContainer* iinsp::ISupplier::GetWorkMessages ( int  containerType) const
pure 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.

Implemented in iinsp::CInspectionTaskComp, iinsp::CSupplierCompBase, iipr::CDelegatedBitmapSupplierComp, and iinsp::CSupplierActivationProxyComp.

virtual int iinsp::ISupplier::GetWorkStatus ( ) const
pure 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

Implemented in iinsp::CInspectionTaskComp, iinsp::CSupplierCompBase, iipr::CDelegatedBitmapSupplierComp, and iinsp::CSupplierActivationProxyComp.

Referenced by iqtinsp::TSupplierGuiCompBase< UI >::DoTest(), iqtinsp::TGeneralSupplierGuiComp< UI >::Test(), and iqtinsp::TSupplierGuiCompBase< UI >::UpdateVisualStatus().

virtual imod::IModel* iinsp::ISupplier::GetWorkStatusModel ( ) const
pure virtual
virtual void iinsp::ISupplier::InvalidateSupplier ( )
pure 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.

Implemented in iinsp::CInspectionTaskComp, iinsp::CSupplierCompBase, iipr::CDelegatedBitmapSupplierComp, and iinsp::CSupplierActivationProxyComp.

Referenced by iqtinsp::TSupplierGuiCompBase< UI >::DoTest(), and iqtinsp::TGeneralSupplierGuiComp< UI >::Test().


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy