Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
iinsp::TSupplierCompWrap< Product > Class Template Referenceabstract

Standard implementation of interface iinsp::ISupplier with preparation for component implementation. More...

#include <TSupplierCompWrap.h>

Inheritance diagram for iinsp::TSupplierCompWrap< Product >:
iinsp::CSupplierCompBase ilog::TLoggerCompWrap< Base > iinsp::ISupplier ilog::CLoggerBase istd::IChangeable ilog::ILoggable istd::ILogger istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic

Public Types

typedef CSupplierCompBase BaseClass
 
typedef Product ProductType
 
- Public Types inherited from iinsp::CSupplierCompBase
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

virtual int ProcessWorkOutput ()
 
virtual void ClearWorkResults ()
 Remove all stored work results. More...
 
- Public Member Functions inherited from iinsp::CSupplierCompBase
 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 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 Member Functions

const Product * GetWorkProduct () const
 Get current work product, if work was done correctly. More...
 
virtual int ProduceObject (Product &result) const =0
 Produce single object. More...
 
- Protected Member Functions inherited from iinsp::CSupplierCompBase
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 ()
 
- 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

istd::TDelPtr< Product > m_productPtr
 
- Protected Attributes inherited from iinsp::CSupplierCompBase
MessageContainer m_messageContainers [MTC_LAST+1]
 

Additional Inherited Members

- Protected Types inherited from iinsp::CSupplierCompBase
typedef imod::TModelWrap< StatusStatusModel
 
typedef imod::TModelWrap
< ilog::CMessageContainer
MessageContainer
 

Detailed Description

template<class Product>
class iinsp::TSupplierCompWrap< Product >

Standard implementation of interface iinsp::ISupplier with preparation for component implementation.

During component initialization you should call RegisterSupplierInput for all suppliers used by this component as an input.

Definition at line 18 of file TSupplierCompWrap.h.

Member Typedef Documentation

template<class Product>
typedef CSupplierCompBase iinsp::TSupplierCompWrap< Product >::BaseClass

Definition at line 21 of file TSupplierCompWrap.h.

template<class Product>
typedef Product iinsp::TSupplierCompWrap< Product >::ProductType

Definition at line 22 of file TSupplierCompWrap.h.

Member Function Documentation

template<class Product >
void iinsp::TSupplierCompWrap< Product >::ClearWorkResults ( )
virtual

Remove all stored work results.

This set also work state to WS_INIT.

Reimplemented from iinsp::CSupplierCompBase.

Definition at line 68 of file TSupplierCompWrap.h.

References iinsp::ISupplier::CF_SUPPLIER_RESULTS.

template<class Product >
const Product * iinsp::TSupplierCompWrap< Product >::GetWorkProduct ( ) const
protected

Get current work product, if work was done correctly.

Definition at line 86 of file TSupplierCompWrap.h.

References NULL.

template<class Product >
int iinsp::TSupplierCompWrap< Product >::ProcessWorkOutput ( )
virtual

Implements iinsp::CSupplierCompBase.

Definition at line 55 of file TSupplierCompWrap.h.

template<class Product>
virtual int iinsp::TSupplierCompWrap< Product >::ProduceObject ( Product &  result) const
protectedpure virtual

Member Data Documentation

template<class Product>
istd::TDelPtr<Product> iinsp::TSupplierCompWrap< Product >::m_productPtr
protected

Definition at line 47 of file TSupplierCompWrap.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy