VTK
dox/Common/Core/vtkWin32ProcessOutputWindow.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkWin32ProcessOutputWindow.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00027 #ifndef __vtkWin32ProcessOutputWindow_h
00028 #define __vtkWin32ProcessOutputWindow_h
00029 
00030 #include "vtkCommonCoreModule.h" // For export macro
00031 #include "vtkOutputWindow.h"
00032 
00033 class VTKCOMMONCORE_EXPORT vtkWin32ProcessOutputWindow : public vtkOutputWindow
00034 {
00035 public:
00036   vtkTypeMacro(vtkWin32ProcessOutputWindow,vtkOutputWindow);
00037   static vtkWin32ProcessOutputWindow* New();
00038   virtual void PrintSelf(ostream& os, vtkIndent indent);
00039 
00041   virtual void DisplayText(const char*);
00042 
00043 protected:
00044   vtkWin32ProcessOutputWindow();
00045   ~vtkWin32ProcessOutputWindow();
00046 
00047   int Initialize();
00048   void Write(const char* data, size_t length);
00049 
00050   // The write end of the pipe to the child process.
00051   vtkWindowsHANDLE OutputPipe;
00052 
00053   // Whether the pipe has been broken.
00054   int Broken;
00055 
00056   // Count the number of times a new child has been initialized.
00057   unsigned int Count;
00058 private:
00059   vtkWin32ProcessOutputWindow(const vtkWin32ProcessOutputWindow&);  // Not implemented.
00060   void operator=(const vtkWin32ProcessOutputWindow&);  // Not implemented.
00061 };
00062 
00063 #endif