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 
29 {
30 public:
32  {return new vtkboneErrorWarningObserver;};
33 
34  // Method needs to exist for vtkSetStringMacro.
35  void Modified() {}
36 
37  virtual void Execute(vtkObject* caller, unsigned long eventId, void* callData);
38 
40 
41  vtkSetStringMacro(ErrorDescriptions);
42  vtkGetStringMacro(ErrorDescriptions);
43  virtual void AppendErrorDescriptions(const char* newMsg);
45 
47 
48  vtkSetStringMacro(WarningDescriptions);
49  vtkGetStringMacro(WarningDescriptions);
50  virtual void AppendWarningDescriptions(const char* newMsg);
52 
54  virtual int ErrorOccurred();
55 
57  virtual int WarningOccurred();
58 
60  virtual void Reset();
61 
62  // Dummy method required by Set/Get string macros
63  virtual int GetDebug() {return 0;}
64 
65 protected:
68 
71 
72 private:
73  vtkboneErrorWarningObserver(const vtkboneErrorWarningObserver&); // Not implemented.
74  void operator=(const vtkboneErrorWarningObserver&); // Not implemented.
75 };
76 
77 #endif
virtual void Execute(vtkObject *caller, unsigned long eventId, void *callData)=0
void operator=(const vtkCommand &)
#define VTKBONE_EXPORT
a simple observer to catch VTK warnings and errors.
static vtkboneErrorWarningObserver * New()