00001 #include "ObjectLink.h" 00002 00003 ObjectLink::ObjectLink (int index, class Object *pO) 00004 : Object(), _previous(0), _next(0) /* , Value(pO) */ { 00005 _value = pO; 00006 _index = index; 00007 } 00008 00009 ObjectLink::~ObjectLink () { } 00010 00011 void ObjectLink::SetNext (class ObjectLink *oL) { 00012 this->_next = oL; 00013 if(oL) { 00014 oL->_previous = this; 00015 } 00016 } 00017 00018 class ObjectLink *ObjectLink::GetNext () { 00019 return this->_next; 00020 } 00021 00022 class Object *ObjectLink::GetValue () { 00023 return this->_value; 00024 } 00025 00026 void ObjectLink::SetValue(class Object *o) { 00027 this->_value = o; 00028 } 00029 00030 int ObjectLink::GetIndex() { 00031 return this->_index; 00032 } 00033 00034 void ObjectLink::Print(int indent) { 00035 PrintIndent(indent); 00036 printf("ObjectLink:\n"); 00037 00038 PrintIndent(indent+2); 00039 printf("_index = %d\n",this->_index); 00040 00041 PrintIndent(indent+2); 00042 printf("_previous = %p\n", this->_previous); 00043 00044 PrintIndent(indent+2); 00045 printf("_next = %p\n", this->_next); 00046 00047 PrintIndent(indent+2); 00048 if(this->_value) { 00049 printf("_value:\n"); 00050 this->_value->Print(indent+2); 00051 } else { 00052 printf("_value = NULL"); 00053 } 00054 00055 Object::Print(indent+2); 00056 } 00057