MeVisLab Toolbox Reference
ml::DicomConfigurableMessageFilterBaseRefCounted Class Reference

Provides a configurable message filter for DICOM modules. More...

#include <mlDicomConfigurableMessageFilterBase.h>

Inheritance diagram for ml::DicomConfigurableMessageFilterBaseRefCounted:
ml::RefCountedBase ml::DicomMessageCollector ml::EventSource ml::MessageCollector ml::Base

Public Types

typedef std::vector< DicomMessageFilterDicomMessageFilterListType
 Container type of the list of MessageFilter objects. More...
 
- Public Types inherited from ml::Base
enum  PersistenceInterface { PersistenceByString , PersistenceByTreeNode , PersistenceByStream }
 This enum describes the different persistence interfaces available. More...
 

Public Member Functions

 DicomConfigurableMessageFilterBaseRefCounted ()
 Constructor, no inputs, no outputs (but a Base output) as field. More...
 
const DicomMessageFilterListTypemessageFilterList () const
 Returns the constant current list of messages added to *this. More...
 
DicomMessageFilterListTypemessageFilterList ()
 Returns the constant current list of messages added to *this. More...
 
void appendInfo (const std::string &stringToAppend) override
 Overwrite base class (Dicom)MessageCollector method to implement filters. More...
 
void appendIssue (const std::string &stringToAppend) override
 Append an issue string; can be overwritten for replacement of the appendIssue functionality. More...
 
void appendError (const std::string &stringToAppend) override
 Append an error string; can be overwritten for replacement of the appendError functionality. More...
 
MessageCollectorcreateClone () override
 Create a duplicate from *this. More...
 
DicomMessageCollectorcreateDicomMessageCollectorClone () override
 
- Public Member Functions inherited from ml::RefCountedBase
 RefCountedBase ()
 Constructor. More...
 
 RefCountedBase (const RefCountedBase &)
 Explicit copy constructor. More...
 
virtual void incRefCount () const
 Increase reference count. More...
 
virtual void decRefCount () const
 Decrease ref count (object will be deleted if ref count is decremented to 0) More...
 
bool isRefCountedBase () const override
 Returns if the instance is derived from RefCountedBase. More...
 
- Public Member Functions inherited from ml::EventSource
 EventSource ()
 
 EventSource (const EventSource &evSource)
 
 ~EventSource () override
 
void addEventListener (BaseEventCallback *cb, void *userData)
 add event listener callback to this Base object - the userData will be the first argument when the callback is called More...
 
void removeEventListener (BaseEventCallback *cb, void *userData)
 remove event listener callback from this Base object - arguments must be the same as for the addEventListener call More...
 
bool hasEventListeners () const
 check if any event listeners have been added to this Base object; this can be used to skip the sendEvent call (and the potentially expensive building of the event object) altogether More...
 
- Public Member Functions inherited from ml::Base
 Base ()
 Constructor. More...
 
virtual ~Base ()
 Destructor. More...
 
virtual BasedeepCopy () const
 Set addStateToTree version number that can be accessed via getAddStateVersion() More...
 
bool isOfAllowedType (const std::vector< const RuntimeType * > &types) const
 Check if this object's type is equal to or derived from one of the types given in the argument. More...
 
virtual std::string detailString () const
 Return a string describing this object. More...
 
virtual bool implementsPersistence (PersistenceInterface) const
 Override this method to declare which persistence interfaces are implemented by your derived class. More...
 
virtual std::string persistentState () const
 Returns a string describing the object's internal state. More...
 
virtual void setPersistentState (const std::string &state)
 Restores the object's internal state from a string that had been previously generated using persistentState(). More...
 
virtual void addStateToTree (TreeNode *) const
 Attaches the object state as children of the given parent node. More...
 
virtual void readStateFromTree (TreeNode *)
 Reads the object state from the children of the given parent node. More...
 
virtual void writeTo (AbstractPersistenceOutputStream *) const
 Write the objects state to the data stream object. More...
 
virtual void readFrom (AbstractPersistenceInputStream *, int)
 Read the objects state from the data stream object. More...
 
- Public Member Functions inherited from ml::DicomMessageCollector
 DicomMessageCollector (const DICOMCachedIOFileHandle &handle=DICOMCachedIOFileHandle(""))
 Construction with empty fileHandle and empty messages. More...
 
virtual void setHandle (const DICOMCachedIOFileHandle &handleToSet)
 Sets the file handle. More...
 
virtual const DICOMCachedIOFileHandlegetHandle () const
 Get the current a message string. More...
 
- Public Member Functions inherited from ml::MessageCollector
 MessageCollector ()
 Construction with empty messages. More...
 
virtual ~MessageCollector ()
 Virtual destructor. More...
 
virtual bool operator== (const MessageCollector &otherObj)
 Returns true on member equality, otherwise false. More...
 
virtual bool hasInfo () const
 Returns true if the info member is not empty, otherwise false. More...
 
virtual void appendInfo (std::stringstream &streamToAppend)
 Append an info stream; indirectly uses appendInfo(const std::string &) for appending. More...
 
virtual void setInfos (const std::string &stringToSet)
 Sets the current info string. More...
 
virtual void setInfos (std::stringstream &streamToSet)
 Set an info stream. More...
 
virtual const std::string & getInfos () const
 Get the current info string. More...
 
virtual void postInfos (const std::string &funcName)
 If there are infos then they are posted with one call of ML_PRINT_INFO. More...
 
virtual bool hasIssue () const
 Returns true if the issue member is not empty, otherwise false. More...
 
virtual void appendIssue (std::stringstream &streamToAppend)
 Append an issue stream; indirectly uses appendIssue(const std::string &) for appending.. More...
 
virtual void setIssues (const std::string &stringToSet)
 Sets the current issue string. More...
 
virtual void setIssues (std::stringstream &streamToSet)
 Set an issue stream. More...
 
virtual const std::string & getIssues () const
 Get the current issue string. More...
 
virtual void postIssues (const std::string &funcName, const std::string &reason)
 If there are issues then they are posted with one call of ML_PRINT_WARNING. More...
 
virtual bool hasError () const
 Returns true if error messaqe member is not empty, otherwise false. More...
 
virtual void appendError (std::stringstream &streamToAppend)
 Append an error stream; indirectly uses appendError(const std::string &) for appending.. More...
 
virtual void setErrors (const std::string &stringToSet)
 Sets the current error string. More...
 
virtual void setErrors (std::stringstream &streamToSet)
 Set an error stream. More...
 
virtual const std::string & getErrors () const
 Get the current error string. More...
 
virtual void postErrors (const std::string &funcName, const std::string &reason)
 If there are errors then they are posted with one call of ML_PRINT_ERROR. More...
 
virtual bool hasMessages () const
 Returns true if any message is not empty, otherwise false. More...
 
virtual std::string getAllMessages () const
 Get the current message + issue + error string. More...
 
virtual void clearMessages ()
 Clears all messages to empty strings, the handle is not changed. More...
 
virtual void postMessages (const std::string &funcName, const std::string &reason)
 If there are any messages then post them with their appropriate post methods. More...
 
virtual void convertAllMessagesToErrors ()
 Append all messages to error messages and then clears them. More...
 
virtual void appendMessagesFrom (const MessageCollector &other)
 Append all corresponding messages from other. More...
 
std::string getFiltered (const std::string &stringToFilter) const
 Returns an empty string if _filterMatches returns true, otherwise stringToFilter is returned; otherwise it returns an empty string. More...
 

Protected Member Functions

bool _filterMatches (const std::string &message) const override
 Implements a filter method replacing the match function for the getFiltered() method of the base class; Returns false on no match, otherwise true. More...
 
- Protected Member Functions inherited from ml::RefCountedBase
 ~RefCountedBase () override
 Macro for the declaration of the runtime type system methods, defined in mlRuntimeSubClass.h. More...
 
- Protected Member Functions inherited from ml::EventSource
void sendEvent (BaseEvent *event, void *skipListener=nullptr)
 Macro for the declaration of the runtime type system methods, defined in mlRuntimeSubClass.h. More...
 
- Protected Member Functions inherited from ml::Base
virtual char * getPersistentState () const
 Returns a C string describing the object's internal state. More...
 
virtual void setPersistentState (const char *)
 Restores the object's internal state from a string that had been previously generated using getPersistentState(). More...
 
virtual void clearPersistentState (char *) const
 Disposes a string previously allocated by getPersistentState(). More...
 
- Protected Member Functions inherited from ml::DicomMessageCollector
 DicomMessageCollector (const DicomMessageCollector &other)=default
 Forbid copy constructor and assignment operator for others since often derived instances are passed; better use createClone(). More...
 
DicomMessageCollectoroperator= (const DicomMessageCollector &other)=default
 
- Protected Member Functions inherited from ml::MessageCollector
 MessageCollector (const MessageCollector &)=default
 Forbid copy constructor and assignment operator for others since often derived instances are passed; better use createClone(). More...
 
MessageCollectoroperator= (const MessageCollector &)=default
 

Protected Attributes

DicomMessageFilterListType _messageFilterList
 List of message managed by *this. More...
 
- Protected Attributes inherited from ml::RefCountedBase
MLint32 _refCount
 Reference count. More...
 
- Protected Attributes inherited from ml::DicomMessageCollector
DICOMCachedIOFileHandle _handle
 If known, this is a handle related to a messages which can be useful to make information more specific. More...
 
- Protected Attributes inherited from ml::MessageCollector
std::string _infos
 Collects any information. More...
 
std::string _issues
 Collects issue information. More...
 
std::string _errors
 Collects error information. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ml::RefCountedBase
static void updateReferenceCountingIfSupported (Base *oldValue, Base *newValue, bool &isRefCountedBase)
 Helper method that handles inc/dec of ref count if base instances support it. More...
 

Detailed Description

Provides a configurable message filter for DICOM modules.

ML module class DicomConfigurableMessageFilter usable as plugin for modules which produce many messages and which allows message output configurations.

Definition at line 28 of file mlDicomConfigurableMessageFilterBase.h.

Member Typedef Documentation

◆ DicomMessageFilterListType

Container type of the list of MessageFilter objects.

Definition at line 48 of file mlDicomConfigurableMessageFilterBase.h.

Constructor & Destructor Documentation

◆ DicomConfigurableMessageFilterBaseRefCounted()

ml::DicomConfigurableMessageFilterBaseRefCounted::DicomConfigurableMessageFilterBaseRefCounted ( )

Constructor, no inputs, no outputs (but a Base output) as field.

Member Function Documentation

◆ _filterMatches()

bool ml::DicomConfigurableMessageFilterBaseRefCounted::_filterMatches ( const std::string &  message) const
overrideprotectedvirtual

Implements a filter method replacing the match function for the getFiltered() method of the base class; Returns false on no match, otherwise true.

Reimplemented from ml::MessageCollector.

◆ appendError()

void ml::DicomConfigurableMessageFilterBaseRefCounted::appendError ( const std::string &  stringToAppend)
overridevirtual

Append an error string; can be overwritten for replacement of the appendError functionality.

Reimplemented from ml::MessageCollector.

◆ appendInfo()

void ml::DicomConfigurableMessageFilterBaseRefCounted::appendInfo ( const std::string &  stringToAppend)
overridevirtual

Overwrite base class (Dicom)MessageCollector method to implement filters.

Reimplemented from ml::MessageCollector.

◆ appendIssue()

void ml::DicomConfigurableMessageFilterBaseRefCounted::appendIssue ( const std::string &  stringToAppend)
overridevirtual

Append an issue string; can be overwritten for replacement of the appendIssue functionality.

Reimplemented from ml::MessageCollector.

◆ createClone()

MessageCollector* ml::DicomConfigurableMessageFilterBaseRefCounted::createClone ( )
overridevirtual

Create a duplicate from *this.

Reimplemented from ml::DicomMessageCollector.

◆ createDicomMessageCollectorClone()

DicomMessageCollector* ml::DicomConfigurableMessageFilterBaseRefCounted::createDicomMessageCollectorClone ( )
overridevirtual

Reimplemented from ml::DicomMessageCollector.

◆ messageFilterList() [1/2]

DicomMessageFilterListType& ml::DicomConfigurableMessageFilterBaseRefCounted::messageFilterList ( )
inline

Returns the constant current list of messages added to *this.

Definition at line 54 of file mlDicomConfigurableMessageFilterBase.h.

◆ messageFilterList() [2/2]

const DicomMessageFilterListType& ml::DicomConfigurableMessageFilterBaseRefCounted::messageFilterList ( ) const
inline

Returns the constant current list of messages added to *this.

Definition at line 51 of file mlDicomConfigurableMessageFilterBase.h.

Member Data Documentation

◆ _messageFilterList

DicomMessageFilterListType ml::DicomConfigurableMessageFilterBaseRefCounted::_messageFilterList
protected

List of message managed by *this.

Definition at line 63 of file mlDicomConfigurableMessageFilterBase.h.


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