/[ascend]/trunk/pygtk/method.cpp
ViewVC logotype

Diff of /trunk/pygtk/method.cpp

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

revision 931 by johnpye, Mon Apr 24 02:23:08 2006 UTC revision 932 by johnpye, Thu Nov 23 13:23:33 2006 UTC
# Line 4  using namespace std; Line 4  using namespace std;
4    
5  #include "method.h"  #include "method.h"
6    
7  Method::Method(){  Method::Method() : initproc(NULL){
8      throw runtime_error("Can't create new Methods, use Type.getMethods instead");      cerr << "EMPTY METHOD CREATED" << endl;
9    }
10    
11    Method::Method(const Method &old) : initproc(old.initproc){
12        // nothing else
13  }  }
14    
15  Method::Method(struct InitProcedure *initproc) : initproc(initproc){  Method::Method(struct InitProcedure *initproc) : initproc(initproc){
# Line 18  Method::~Method(){ Line 22  Method::~Method(){
22    
23  struct InitProcedure *  struct InitProcedure *
24  Method::getInternalType() const{  Method::getInternalType() const{
25        if(initproc==NULL)throw runtime_error("NULL initproc value");
26      return initproc;      return initproc;
27  }  }
28    
29  const char*  const char*
30  Method::getName() const{  Method::getName() const{
31        if(initproc==NULL)throw runtime_error("NULL initproc value");
32      return SCP( initproc->name );      return SCP( initproc->name );
33  }  }
34    
35  SymChar  SymChar
36  Method::getSym() const{  Method::getSym() const{
37      /// @TODO this is not efficient. couldn't make it work the right way though...      /// @TODO this is not efficient. couldn't make it work the right way though...
38        if(initproc==NULL)throw runtime_error("NULL initproc value");
39      return SymChar( SCP( initproc->name ));      return SymChar( SCP( initproc->name ));
40  }  }

Legend:
Removed from v.931  
changed lines
  Added in v.932

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