2006-09-28 03:51:08 +08:00
|
|
|
/*
|
|
|
|
*_________________________________________________________________________*
|
|
|
|
* POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE *
|
|
|
|
* DESCRIPTION: SEE READ-ME *
|
|
|
|
* FILE NAME: poemsobject.cpp *
|
|
|
|
* AUTHORS: See Author List *
|
|
|
|
* GRANTS: See Grants List *
|
|
|
|
* COPYRIGHT: (C) 2005 by Authors as listed in Author's List *
|
|
|
|
* LICENSE: Please see License Agreement *
|
|
|
|
* DOWNLOAD: Free at www.rpi.edu/~anderk5 *
|
|
|
|
* ADMINISTRATOR: Prof. Kurt Anderson *
|
|
|
|
* Computational Dynamics Lab *
|
|
|
|
* Rensselaer Polytechnic Institute *
|
|
|
|
* 110 8th St. Troy NY 12180 *
|
|
|
|
* CONTACT: anderk5@rpi.edu *
|
|
|
|
*_________________________________________________________________________*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "poemsobject.h"
|
2009-04-13 22:33:02 +08:00
|
|
|
#include <cstring>
|
2006-09-28 03:51:08 +08:00
|
|
|
|
|
|
|
POEMSObject::POEMSObject(){
|
|
|
|
name = 0;
|
|
|
|
ChangeName("unnamed");
|
|
|
|
ID = -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
POEMSObject::~POEMSObject(){
|
|
|
|
delete [] name;
|
|
|
|
}
|
|
|
|
|
|
|
|
void POEMSObject::ChangeName(char* newname){
|
|
|
|
delete [] name;
|
|
|
|
name = new char[strlen(newname)+1];
|
|
|
|
strcpy(name,newname);
|
|
|
|
}
|
|
|
|
|
|
|
|
char* POEMSObject::GetName(){
|
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
|
|
|
int POEMSObject::GetID(){
|
|
|
|
return ID;
|
|
|
|
}
|
|
|
|
|
|
|
|
void POEMSObject::SetID(int id){
|
|
|
|
ID = id;
|
|
|
|
}
|