/[ascend]/trunk/pygtk/interface/reporter.h
ViewVC logotype

Diff of /trunk/pygtk/interface/reporter.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 525 by johnpye, Wed Apr 19 02:44:25 2006 UTC revision 526 by johnpye, Fri Apr 21 13:47:31 2006 UTC
# Line 3  Line 3 
3    
4  #include "config.h"  #include "config.h"
5    
6    #ifdef ASCXX_USE_PYTHON
7    # include <Python.h>
8    #endif
9    
10  extern "C"{  extern "C"{
11    #include <utilities/ascConfig.h>
12  #include <utilities/error.h>  #include <utilities/error.h>
13  }  }
14    
15    
16  #ifdef ASCXX_USE_PYTHON  #ifdef ASCXX_USE_PYTHON
17  # include <Python.h>  extern "C"{
18    /**
19        This function is a hook function that will convey errors
20        back to Python via the C++ 'Reporter' class.
21    */
22    ASC_EXPORT(int) reporter_error_python(ERROR_REPORTER_CALLBACK_ARGS);
23    }
24  #endif  #endif
25    
26  /**  /**
# Line 36  private: Line 48  private:
48  #endif  #endif
49    
50  public:  public:
51      static Reporter *Instance();      static ASC_EXPORT(Reporter *) Instance();
52      void setErrorCallback(error_reporter_callback_t, void *client_data=NULL);      void setErrorCallback(error_reporter_callback_t, void *client_data=NULL);
53    
54  #ifdef ASCXX_USE_PYTHON  #ifdef ASCXX_USE_PYTHON
# Line 49  public: Line 61  public:
61    
62  Reporter *getReporter();  Reporter *getReporter();
63    
 #ifdef ASCXX_USE_PYTHON  
 // Python-invoking callback function  
 int reporter_error_python(ERROR_REPORTER_CALLBACK_ARGS);  
 #endif  
   
64  #endif // ASCXX_REPORTER_H  #endif // ASCXX_REPORTER_H

Legend:
Removed from v.525  
changed lines
  Added in v.526

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22