Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
vtkMRMLMessageCollection Class Reference

#include <Libs/MRML/Core/vtkMRMLMessageCollection.h>

Inheritance diagram for vtkMRMLMessageCollection:
Inheritance graph
[legend]
Collaboration diagram for vtkMRMLMessageCollection:
Collaboration graph
[legend]

Classes

struct  Message
 
A helper class that describes a single message More...
 

Public Types

typedef vtkObject Superclass
 

Public Member Functions

virtual void AddMessage (unsigned long messageType, const std::string &messageText)
 
virtual void AddMessages (vtkMRMLMessageCollection *source, const std::string &prefix=std::string())
 
virtual void AddSeparator ()
 
virtual void ClearMessages ()
 Clear the message vector. More...
 
virtual void DeepCopy (vtkMRMLMessageCollection *source)
 Copy all messages from another collection. More...
 
virtual std::string GetAllMessagesAsString (bool *errorFound=nullptr, bool *warningFound=nullptr)
 
virtual const char * GetClassName ()
 
virtual std::string GetNthMessageText (int index) const
 Get event type of a message from the message vector. More...
 
virtual unsigned long GetNthMessageType (int index) const
 Get text of a message from the message vector. More...
 
virtual int GetNumberOfMessages () const
 Return the total number of reported messages. More...
 
virtual int GetNumberOfMessagesOfType (unsigned long messageType) const
 Return the number of reported messages of the specified event type. More...
 
virtual int GetNumberOfMessagesOfType (const char *eventName) const
 Get the number of reported messages of the specified event type. More...
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void SetObservedObject (vtkObject *observedObject)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkMRMLMessageCollectionNew ()
 
static vtkMRMLMessageCollectionSafeDownCast (vtkObject *o)
 

Protected Member Functions

void operator= (const vtkMRMLMessageCollection &)
 
 vtkMRMLMessageCollection ()
 
 vtkMRMLMessageCollection (const vtkMRMLMessageCollection &)
 
 ~vtkMRMLMessageCollection () override
 

Static Protected Member Functions

static void CallbackFunction (vtkObject *, long unsigned int, void *clientData, void *callData)
 

Protected Attributes

vtkSmartPointer< vtkCallbackCommand > CallbackCommand
 
std::vector< MessageMessages
 
vtkSmartPointer< vtkObject > ObservedObject
 

Detailed Description

A class for recording warnings and errors associated with this vtkMRMLStorableNode. A substantially similar vtkMessageCollection is planned for vtkAddon. When that is released, this will be replaced by that.

Definition at line 87 of file vtkMRMLMessageCollection.h.

Member Typedef Documentation

◆ Superclass

Definition at line 90 of file vtkMRMLMessageCollection.h.

Constructor & Destructor Documentation

◆ vtkMRMLMessageCollection() [1/2]

vtkMRMLMessageCollection::vtkMRMLMessageCollection ( )
protected

◆ ~vtkMRMLMessageCollection()

vtkMRMLMessageCollection::~vtkMRMLMessageCollection ( )
overrideprotected

◆ vtkMRMLMessageCollection() [2/2]

vtkMRMLMessageCollection::vtkMRMLMessageCollection ( const vtkMRMLMessageCollection )
protected

Member Function Documentation

◆ AddMessage()

virtual void vtkMRMLMessageCollection::AddMessage ( unsigned long  messageType,
const std::string &  messageText 
)
virtual

Append a message to the message vector To mark a message as error or warning, set messageType to vtkCommand::ErrorEvent or vtkCommand::WarningEvent.

◆ AddMessages()

virtual void vtkMRMLMessageCollection::AddMessages ( vtkMRMLMessageCollection source,
const std::string &  prefix = std::string() 
)
virtual

Copy all messages from another collection. If prefix is specified then that string is prepended to each copied message.

◆ AddSeparator()

virtual void vtkMRMLMessageCollection::AddSeparator ( )
virtual

Add a separator, for example to create message groups. (internally vtkCommand::PropertyModifiedEvent is used as messageType)

◆ CallbackFunction()

static void vtkMRMLMessageCollection::CallbackFunction ( vtkObject *  ,
long unsigned  int,
void *  clientData,
void *  callData 
)
staticprotected

◆ ClearMessages()

virtual void vtkMRMLMessageCollection::ClearMessages ( )
virtual

Clear the message vector.

◆ DeepCopy()

virtual void vtkMRMLMessageCollection::DeepCopy ( vtkMRMLMessageCollection source)
virtual

Copy all messages from another collection.

◆ GetAllMessagesAsString()

virtual std::string vtkMRMLMessageCollection::GetAllMessagesAsString ( bool *  errorFound = nullptr,
bool *  warningFound = nullptr 
)
virtual

Return all messages in a single formatted string. If optional errorFound or warningFound pointers are set then the caller get information about presence of warnings or errors in the message list.

◆ GetClassName()

virtual const char* vtkMRMLMessageCollection::GetClassName ( )
virtual

◆ GetNthMessageText()

virtual std::string vtkMRMLMessageCollection::GetNthMessageText ( int  index) const
virtual

Get event type of a message from the message vector.

◆ GetNthMessageType()

virtual unsigned long vtkMRMLMessageCollection::GetNthMessageType ( int  index) const
virtual

Get text of a message from the message vector.

◆ GetNumberOfMessages()

virtual int vtkMRMLMessageCollection::GetNumberOfMessages ( ) const
virtual

Return the total number of reported messages.

◆ GetNumberOfMessagesOfType() [1/2]

virtual int vtkMRMLMessageCollection::GetNumberOfMessagesOfType ( unsigned long  messageType) const
virtual

Return the number of reported messages of the specified event type.

◆ GetNumberOfMessagesOfType() [2/2]

virtual int vtkMRMLMessageCollection::GetNumberOfMessagesOfType ( const char *  eventName) const
virtual

Get the number of reported messages of the specified event type.

◆ IsA()

virtual int vtkMRMLMessageCollection::IsA ( const char *  type)
virtual

◆ IsTypeOf()

static int vtkMRMLMessageCollection::IsTypeOf ( const char *  type)
static

◆ New()

static vtkMRMLMessageCollection* vtkMRMLMessageCollection::New ( )
static

◆ operator=()

void vtkMRMLMessageCollection::operator= ( const vtkMRMLMessageCollection )
protected

◆ PrintSelf()

void vtkMRMLMessageCollection::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
override

◆ SafeDownCast()

static vtkMRMLMessageCollection* vtkMRMLMessageCollection::SafeDownCast ( vtkObject *  o)
static

◆ SetObservedObject()

virtual void vtkMRMLMessageCollection::SetObservedObject ( vtkObject *  observedObject)
virtual

Observe error and warnings reported by observedObject. For example, this can be used to capture errors from VTK classes and display them to the user.

Member Data Documentation

◆ CallbackCommand

vtkSmartPointer<vtkCallbackCommand> vtkMRMLMessageCollection::CallbackCommand
protected

Definition at line 158 of file vtkMRMLMessageCollection.h.

◆ Messages

std::vector<Message> vtkMRMLMessageCollection::Messages
protected

Definition at line 159 of file vtkMRMLMessageCollection.h.

◆ ObservedObject

vtkSmartPointer<vtkObject> vtkMRMLMessageCollection::ObservedObject
protected

Definition at line 157 of file vtkMRMLMessageCollection.h.


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