Method.C
inter/Method.C · 706 B
From the archive interlude_1beta5.tar.gz
Download the archive « Back to the archive contents
#include "Method.h"
#include "Structures.h"
#pragma implementation
// long ms=0;
Method::Method(Val_List* parameters, Value* expression){
expr = expression;
symlist = parameters;
// cout<<(long)this<<" : "<<++ms<<"\n";
};
Method::~Method(){
// cout<<(long)this<<" : "<<--ms<<"\n";
expr->release();
delete symlist;
}
char* Method::pack_method (char* buf){
long i;
i = (symlist ? symlist->length() : 0);
PACK_INT (buf , i);
buf += sizeof (long);
if (symlist)
buf = symlist->pack_list(buf);
return expr->pack_value(buf);
}
Method* Method::copy (){
if (symlist)
return new Method (symlist->copy(), expr->copy());
else
return new Method (symlist , expr->copy());
}