MeVisLab Toolbox Reference
|
Provides a configurable message filter for DICOM modules. More...
#include <mlDicomConfigurableMessageFilterBase.h>
Public Types | |
typedef std::vector< DicomMessageFilter > | DicomMessageFilterListType |
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 DicomMessageFilterListType & | messageFilterList () const |
Returns the constant current list of messages added to *this. More... | |
DicomMessageFilterListType & | messageFilterList () |
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... | |
MessageCollector * | createClone () override |
Create a duplicate from *this. More... | |
DicomMessageCollector * | createDicomMessageCollectorClone () 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 Base * | deepCopy () 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 DICOMCachedIOFileHandle & | getHandle () 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... | |
DicomMessageCollector & | operator= (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... | |
MessageCollector & | operator= (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... | |
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.
typedef std::vector<DicomMessageFilter> ml::DicomConfigurableMessageFilterBaseRefCounted::DicomMessageFilterListType |
Container type of the list of MessageFilter objects.
Definition at line 48 of file mlDicomConfigurableMessageFilterBase.h.
ml::DicomConfigurableMessageFilterBaseRefCounted::DicomConfigurableMessageFilterBaseRefCounted | ( | ) |
Constructor, no inputs, no outputs (but a Base output) as field.
|
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.
|
overridevirtual |
Append an error string; can be overwritten for replacement of the appendError functionality.
Reimplemented from ml::MessageCollector.
|
overridevirtual |
Overwrite base class (Dicom)MessageCollector method to implement filters.
Reimplemented from ml::MessageCollector.
|
overridevirtual |
Append an issue string; can be overwritten for replacement of the appendIssue functionality.
Reimplemented from ml::MessageCollector.
|
overridevirtual |
Create a duplicate from *this.
Reimplemented from ml::DicomMessageCollector.
|
overridevirtual |
Reimplemented from ml::DicomMessageCollector.
|
inline |
Returns the constant current list of messages added to *this.
Definition at line 54 of file mlDicomConfigurableMessageFilterBase.h.
|
inline |
Returns the constant current list of messages added to *this.
Definition at line 51 of file mlDicomConfigurableMessageFilterBase.h.
|
protected |
List of message managed by *this.
Definition at line 63 of file mlDicomConfigurableMessageFilterBase.h.