User.C
inter/User.C · 619 B
From the archive interlude_1beta5.tar.gz
Download the archive « Back to the archive contents
#include "User.h"
#pragma implementation
User_Defined::User_Defined (long in_class, Value* in_val){
class_obj = in_class;
val = in_val->grab();
}
User_Defined::~User_Defined (){
val->release();
}
long User_Defined::get_type(){
return class_obj;
}
Value* User_Defined::get_val(){
return val;
}
String* User_Defined::tostr(){
char prefix[10];
String* tempstring;
Value* tempval;
sprintf (prefix , "{#%d " , class_obj);
tempval = val->copy();
tempval->tostr();
tempstring = new String (prefix);
*tempstring += *(tempval->str);
*tempstring += "}";
delete tempval;
return tempstring;
}