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.h116
1 files changed, 58 insertions, 58 deletions
diff --git a/Database/internals/database-references.h b/Database/internals/database-references.h
index 65e4cdf..278b531 100644
--- a/Database/internals/database-references.h
+++ b/Database/internals/database-references.h
@@ -1,58 +1,58 @@
-#ifndef __DATABASE_REFERENCES_H__
-#define __DATABASE_REFERENCES_H__
-
-class SegmentData;
-class RefFrom;
-class RefTo;
-
-/** The reference system, where the database will be able to hold references from and to memory pointers.
- */
-
-class RefFrom : public Base {
- public:
- RefFrom(RefTo * refTo, SegmentRefData * data);
- ~RefFrom()
- SegmentRefData * getRefSegData() { return refTo->getSegRefData(); }
- SegmentRefData * getSegRefData() { return data; }
- RefFrom * getNext() { return next; }
- private:
- RefTo * refTo;
- RefFrom * next, * prev;
- SegmentRefData * data;
-};
-
-class RefTo : public Base {
- public:
- RefTo(Uint32 ptr, SegmentRefData * data);
- ~RefTo();
- SegmentRefData * getRefSegData() { return refFrom->getSegRefData(); }
- SegmentRefData * getSegRefData() { return data; }
- private:
- RefFrom * refFrom;
- SegmentRefData * data;
-};
-
-class SegmentRefData : public Base {
- public:
- SegmentRefData(Uint32 ptr, Segment * seg);
- ~SegmentRefData()
- Uint32 getPtr() { return ptr; }
- Segment * getSegment() { return seg; }
- SegmentRefData * getSegmentRefData(Uint32 ptr) { return seg->getSegmentRefData(ptr); }
-
- RefTo * getRefTo() { return refTo; }
- RefFrom * getRefFrom() { return firstRefFrom; }
-
- void setRefTo(RefTo * newRefTo) { refTo = newRefTo; checkDestroy(); }
- void setFirstRefFrom(RefFrom * newFirstRefFrom) { firstRefFrom = newFirstRefFrom; checkDestroy(); }
-
- private:
- RefTo * refTo;
- RefFrom * firstRefFrom;
-
- Uint32 ptr;
- Segment * seg;
- void checkDestroy() { if (!refTo && !firstRefFrom) delete this; }
-};
-
-#endif
+#ifndef __DATABASE_REFERENCES_H__
+#define __DATABASE_REFERENCES_H__
+
+class SegmentData;
+class RefFrom;
+class RefTo;
+
+/** The reference system, where the database will be able to hold references from and to memory pointers.
+ */
+
+class RefFrom : public Base {
+ public:
+ RefFrom(RefTo * refTo, SegmentRefData * data);
+ ~RefFrom()
+ SegmentRefData * getRefSegData() { return refTo->getSegRefData(); }
+ SegmentRefData * getSegRefData() { return data; }
+ RefFrom * getNext() { return next; }
+ private:
+ RefTo * refTo;
+ RefFrom * next, * prev;
+ SegmentRefData * data;
+};
+
+class RefTo : public Base {
+ public:
+ RefTo(Uint32 ptr, SegmentRefData * data);
+ ~RefTo();
+ SegmentRefData * getRefSegData() { return refFrom->getSegRefData(); }
+ SegmentRefData * getSegRefData() { return data; }
+ private:
+ RefFrom * refFrom;
+ SegmentRefData * data;
+};
+
+class SegmentRefData : public Base {
+ public:
+ SegmentRefData(Uint32 ptr, Segment * seg);
+ ~SegmentRefData()
+ Uint32 getPtr() { return ptr; }
+ Segment * getSegment() { return seg; }
+ SegmentRefData * getSegmentRefData(Uint32 ptr) { return seg->getSegmentRefData(ptr); }
+
+ RefTo * getRefTo() { return refTo; }
+ RefFrom * getRefFrom() { return firstRefFrom; }
+
+ void setRefTo(RefTo * newRefTo) { refTo = newRefTo; checkDestroy(); }
+ void setFirstRefFrom(RefFrom * newFirstRefFrom) { firstRefFrom = newFirstRefFrom; checkDestroy(); }
+
+ private:
+ RefTo * refTo;
+ RefFrom * firstRefFrom;
+
+ Uint32 ptr;
+ Segment * seg;
+ void checkDestroy() { if (!refTo && !firstRefFrom) delete this; }
+};
+
+#endif