From d440c3f50a918a932293ad98bcec96eaa4683222 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 4 Dec 2011 01:19:09 -0800 Subject: 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. --- includes/AtStartExit.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 includes/AtStartExit.h (limited to 'includes/AtStartExit.h') 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; +}; + +}; -- cgit v1.2.3