MeVisLab Toolbox Reference
ml::DicomMessageCollector Class Reference

Class to collect messages and errors related to a given frame handle. More...

#include <mlDicomMessageCollector.h>

Inheritance diagram for ml::DicomMessageCollector:
ml::MessageCollector ml::DicomConfigurableMessageFilterBaseRefCounted

Public Member Functions

 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...
 
MessageCollectorcreateClone () override
 Create a duplicate from *this. More...
 
virtual DicomMessageCollectorcreateDicomMessageCollectorClone ()
 
- 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 (const std::string &stringToAppend)
 Append an info string; can be overwritten for replacement of the appendInfo functionality. 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 (const std::string &stringToAppend)
 Append an issue string; can be overwritten for replacement of the appendIssue functionality. 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 (const std::string &stringToAppend)
 Append an error string; can be overwritten for replacement of the appendError functionality. 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

 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
virtual bool _filterMatches (const std::string &) const
 A filter method just returning false in this class; derived classes may implement filters reacting with other return values on message. More...
 
 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

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...
 

Detailed Description

Class to collect messages and errors related to a given frame handle.

Definition at line 21 of file mlDicomMessageCollector.h.

Constructor & Destructor Documentation

◆ DicomMessageCollector() [1/2]

ml::DicomMessageCollector::DicomMessageCollector ( const DICOMCachedIOFileHandle handle = DICOMCachedIOFileHandle(""))

Construction with empty fileHandle and empty messages.

◆ DicomMessageCollector() [2/2]

ml::DicomMessageCollector::DicomMessageCollector ( const DicomMessageCollector other)
protecteddefault

Forbid copy constructor and assignment operator for others since often derived instances are passed; better use createClone().

Member Function Documentation

◆ createClone()

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

Create a duplicate from *this.

Reimplemented from ml::MessageCollector.

Reimplemented in ml::DicomConfigurableMessageFilterBaseRefCounted.

◆ createDicomMessageCollectorClone()

virtual DicomMessageCollector* ml::DicomMessageCollector::createDicomMessageCollectorClone ( )
virtual

◆ getHandle()

virtual const DICOMCachedIOFileHandle& ml::DicomMessageCollector::getHandle ( ) const
virtual

Get the current a message string.

◆ operator=()

DicomMessageCollector& ml::DicomMessageCollector::operator= ( const DicomMessageCollector other)
protecteddefault

◆ setHandle()

virtual void ml::DicomMessageCollector::setHandle ( const DICOMCachedIOFileHandle handleToSet)
virtual

Sets the file handle.

Member Data Documentation

◆ _handle

DICOMCachedIOFileHandle ml::DicomMessageCollector::_handle
protected

If known, this is a handle related to a messages which can be useful to make information more specific.

Definition at line 40 of file mlDicomMessageCollector.h.


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