summaryrefslogtreecommitdiff
path: root/Database/internals/database-references.h
diff options
context:
space:
mode:
Diffstat (limited to 'Database/internals/database-references.h')
-rw-r--r--Database/internals/database-references.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/Database/internals/database-references.h b/Database/internals/database-references.h
index 278b531..6ad64bd 100644
--- a/Database/internals/database-references.h
+++ b/Database/internals/database-references.h
@@ -1,9 +1,10 @@
#ifndef __DATABASE_REFERENCES_H__
#define __DATABASE_REFERENCES_H__
-class SegmentData;
-class RefFrom;
+#include "database-segment.h"
+
class RefTo;
+class Database;
/** The reference system, where the database will be able to hold references from and to memory pointers.
*/
@@ -11,8 +12,8 @@ class RefTo;
class RefFrom : public Base {
public:
RefFrom(RefTo * refTo, SegmentRefData * data);
- ~RefFrom()
- SegmentRefData * getRefSegData() { return refTo->getSegRefData(); }
+ ~RefFrom();
+ SegmentRefData * getRefSegData();
SegmentRefData * getSegRefData() { return data; }
RefFrom * getNext() { return next; }
private:
@@ -23,19 +24,22 @@ class RefFrom : public Base {
class RefTo : public Base {
public:
- RefTo(Uint32 ptr, SegmentRefData * data);
+ RefTo(absolute_ptr ptr, SegmentRefData * data, Database *);
~RefTo();
- SegmentRefData * getRefSegData() { return refFrom->getSegRefData(); }
+ SegmentRefData * getRefSegData();
SegmentRefData * getSegRefData() { return data; }
private:
RefFrom * refFrom;
SegmentRefData * data;
};
+inline SegmentRefData * RefFrom::getRefSegData() { return refTo->getSegRefData(); }
+inline SegmentRefData * RefTo::getRefSegData() { return refFrom->getSegRefData(); }
+
class SegmentRefData : public Base {
public:
SegmentRefData(Uint32 ptr, Segment * seg);
- ~SegmentRefData()
+ ~SegmentRefData();
Uint32 getPtr() { return ptr; }
Segment * getSegment() { return seg; }
SegmentRefData * getSegmentRefData(Uint32 ptr) { return seg->getSegmentRefData(ptr); }