mirror of
https://github.com/zeldaret/tp
synced 2026-05-25 15:25:25 -04:00
635fbc34ec
* Added JSUList, JKRDisposer, and JKRHeap. JSUList: Decompiled JSUPtrLink and JSUPtrList with their respected functions. The templated class JSUList is left. JKRDisposer: Constructor matched but the destructor is close but not yet a match. JKRHeap: No functions matches yet. JKRHeap.cpp now includes "operator delete" which makes it possible to forward compile destructors. * moved files from src/ to libs/
48 lines
803 B
C++
48 lines
803 B
C++
#ifndef __JSULIST_H__
|
|
#define __JSULIST_H__
|
|
|
|
#include "dolphin/types.h"
|
|
|
|
class JSUPtrList;
|
|
class JSUPtrLink {
|
|
public:
|
|
JSUPtrLink(void*);
|
|
~JSUPtrLink();
|
|
|
|
public:
|
|
void* unk0;
|
|
JSUPtrList* list;
|
|
JSUPtrLink* prev;
|
|
JSUPtrLink* next;
|
|
};
|
|
|
|
class JSUPtrList {
|
|
public:
|
|
JSUPtrList(bool should_initiate);
|
|
~JSUPtrList();
|
|
|
|
void initiate();
|
|
void setFirst(JSUPtrLink* first);
|
|
bool append(JSUPtrLink* ptr);
|
|
bool prepend(JSUPtrLink* ptr);
|
|
bool insert(JSUPtrLink* before, JSUPtrLink* ptr);
|
|
bool remove(JSUPtrLink* ptr);
|
|
JSUPtrLink* getNthLink(u32 i) const;
|
|
|
|
public:
|
|
JSUPtrLink* head;
|
|
JSUPtrLink* tail;
|
|
u32 length;
|
|
};
|
|
|
|
|
|
template <typename T>
|
|
class JSUList : JSUPtrList {
|
|
public:
|
|
JSUList() : JSUPtrList(true) {}
|
|
~JSUList() {};
|
|
|
|
};
|
|
|
|
#endif
|