summaryrefslogtreecommitdiff
path: root/includes/AtStartExit.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-12-04 01:19:09 -0800
committerPixel <pixel@nobis-crew.org>2011-12-04 01:20:10 -0800
commitd440c3f50a918a932293ad98bcec96eaa4683222 (patch)
tree33e8e42a8e4506ae9da70cdb44dd133bde7f7219 /includes/AtStartExit.h
parente5577eb7a643ce7885e5d14660a6d24254161622 (diff)
Reworked some things in the architecture, mainly exceptions and asserts.
-) Removed Assert() -) Added AAssert(), IAssert(), RAssert(), TAssert() and Failure() -) Reworked all asserts in the code, and added meaningful messages to them. -) Changed the way the startup code is generated; BALAU_STARTUP is no longer necessary.
Diffstat (limited to 'includes/AtStartExit.h')
-rw-r--r--includes/AtStartExit.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/includes/AtStartExit.h b/includes/AtStartExit.h
new file mode 100644
index 0000000..9b55d93
--- /dev/null
+++ b/includes/AtStartExit.h
@@ -0,0 +1,27 @@
+#pragma once
+
+namespace Balau {
+
+class AtStart {
+ protected:
+ AtStart(int priority = 0);
+ virtual void doStart() = 0;
+ private:
+ const int m_priority;
+ AtStart * m_next;
+ static AtStart * s_head;
+ friend class Main;
+};
+
+class AtExit {
+ protected:
+ AtExit(int priority = 0);
+ virtual void doExit() = 0;
+ private:
+ const int m_priority;
+ AtExit * m_next;
+ static AtExit * s_head;
+ friend class Main;
+};
+
+};