vtkbone
vtkboneErrorWarningObserver.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Copyright 2010-2016, Numerics88 Solutions Ltd.
4 http://www.numerics88.com/
5
6 Copyright (c) Eric Nodwell and Steven K. Boyd
7 See Copyright.txt for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12=========================================================================*/
13
22#ifndef __vtkboneErrorWarningObserver_h
23#define __vtkboneErrorWarningObserver_h
24
25#include "vtkCommand.h"
26#include "vtkboneWin32Header.h"
27#include "vtkboneMacros.h"
28
29class VTKBONE_EXPORT vtkboneErrorWarningObserver : public vtkCommand
30{
31public:
33 {return new vtkboneErrorWarningObserver;};
34
35 // Method needs to exist for vtkSetStringMacro.
36 void Modified() {}
37
38 virtual void Execute(vtkObject* caller, unsigned long eventId, void* callData);
39
41
42 vtkboneSetStringMacro(ErrorDescriptions);
43 vtkboneGetStringMacro(ErrorDescriptions);
44 virtual void AppendErrorDescriptions(const char* newMsg);
46
48
49 vtkboneSetStringMacro(WarningDescriptions);
50 vtkboneGetStringMacro(WarningDescriptions);
51 virtual void AppendWarningDescriptions(const char* newMsg);
53
55 virtual int ErrorOccurred();
56
58 virtual int WarningOccurred();
59
61 virtual void Reset();
62
63 // Dummy method required by Set/Get string macros
64 virtual int GetDebug() {return 0;}
65
66protected:
69
72
73private:
75 void operator=(const vtkboneErrorWarningObserver&); // Not implemented.
76};
77
78#endif
void operator=(const vtkCommand &)
a simple observer to catch VTK warnings and errors.
vtkboneGetStringMacro(ErrorDescriptions)
vtkboneSetStringMacro(ErrorDescriptions)
virtual void AppendErrorDescriptions(const char *newMsg)
virtual void AppendWarningDescriptions(const char *newMsg)
virtual void Execute(vtkObject *caller, unsigned long eventId, void *callData)
vtkboneSetStringMacro(WarningDescriptions)
vtkboneGetStringMacro(WarningDescriptions)
static vtkboneErrorWarningObserver * New()