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

Contents of /trunk/pygtk/method.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1291 - (show annotations) (download) (as text)
Mon Feb 26 06:20:43 2007 UTC (17 years, 5 months ago) by johnpye
File MIME type: text/x-c++src
File size: 875 byte(s)
Added EXTERNAL asc_default_all plus test cases.
1 #include <iostream>
2 #include <stdexcept>
3 using namespace std;
4
5 #include "method.h"
6
7 Method::Method() : initproc(NULL){
8 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){
16 //cerr << "CREATED METHOD, name = " << SCP( initproc->name ) << "..."<< endl;
17 }
18
19 Method::~Method(){
20 //cerr << "DESTROYED METHOD" << endl;
21 }
22
23 struct InitProcedure *
24 Method::getInternalType() const{
25 if(initproc==NULL)throw runtime_error("NULL initproc value");
26 return initproc;
27 }
28
29 const char*
30 Method::getName() const{
31 if(initproc==NULL)throw runtime_error("NULL initproc value");
32 return SCP( ProcName(initproc) );
33 }
34
35 SymChar
36 Method::getSym() const{
37 /// @TODO this is not efficient. couldn't make it work the right way though...
38 return SymChar(getName());
39 }

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