/*
* ListEntry.h
* Copyright (c) 2011 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// SOL++2000
// 1999.09.23 Added a member variable 'prev' and access(set/get) methods to it and
// a constructor which takes three arguments.
#pragma once
#include <sol\Entry.h>
namespace SOL {
class ListEntry :public Entry {
ListEntry* prev; // 1999.09.23
ListEntry* next;
public:
ListEntry(Object* object)
:Entry(object),
prev(NULL), next(NULL) {
//
}
ListEntry(Object* object, ListEntry* nxt)
:Entry(object),
prev(NULL), next(nxt) {
//
}
// 1999.09.23
ListEntry(Object* object, ListEntry* pre, ListEntry* nxt)
:Entry(object),
prev(pre), next(nxt) {
//
}
~ListEntry() {
Object* object = getObject();
delete object;
}
void setPrev(ListEntry* entry) {
prev = entry;
}
void setNext(ListEntry* entry) {
next = entry;
}
ListEntry* getPrev() {
return prev;
}
ListEntry* getNext() {
return next;
}
};
}
|