Orfeo Toolbox  4.0
itkPyCommand.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkPyCommand.h, v $
5  Language: C++
6  Date: $Date: 2006/09/06 20:58:42 $
7  Version: $Revision: 1.1 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef _itkPyCommand_h
18 #define _itkPyCommand_h
19 
20 #include "itkCommand.h"
21 
22 // The python header defines _POSIX_C_SOURCE without a preceding #undef
23 #undef _POSIX_C_SOURCE
24 // The python header defines _XOPEN_SOURCE without a preceding #undef
25 #undef _XOPEN_SOURCE
26 
27 #include <Python.h>
28 
29 namespace itk
30 {
31 
42 class PyCommand : public Command
43 {
44 public:
46  typedef PyCommand Self;
47 
50 
52  itkTypeMacro(PyCommand, Command);
53 
55  itkNewMacro(Self);
56 
62  void SetCommandCallable(PyObject *obj);
63 
64  PyObject * GetCommandCallable();
65 
66  void Execute(Object *, const EventObject&);
67  void Execute(const Object *, const EventObject&);
68 
69 protected:
70  PyCommand();
71  ~PyCommand();
72  void PyExecute();
73  PyCommand(const Self&); // Not implemented.
74  void operator=(const Self&); // Not implemented.
75 
76 private:
77  PyObject *obj;
78 };
79 
80 
81 } // namespace itk
82 
83 #endif // _itkPyCommand_h
84 

Generated at Sat Mar 8 2014 15:24:11 for Orfeo Toolbox with doxygen 1.8.3.1