Forums
This is the online documentation for Colossus Entertainments Pixie Game Engine

System.cpp

Go to the documentation of this file.
00001 //*** System.cpp ***
00002 
00003 #include "System.h"
00004 #include "Debug.h"
00005 #include "Engine.h"
00006 #include "HashTable.h"
00007 
00008 
00009 //*** Constructor ***
00010 
00011 System::System():initialized_(false),started_(false)
00012    {
00013    };
00014 
00015 
00016 //*** Destructor ***
00017 
00018 System::~System()
00019    {
00020    Assert(!initialized_,"System was never terminated");
00021    };
00022 
00023 
00024 //*** SetInitialized ***
00025 
00026 void System::SetInitialized(bool initialized)
00027    {
00028    Assert(initialized_!=initialized,"Trying to set initialized_ value to the same as it already is");
00029    initialized_=initialized;
00030    }
00031 
00032 
00033 //*** SetStarted ***
00034 
00035 void System::SetStarted(bool started)
00036    {
00037    Assert(started_!=started,"Trying to set started_ value to the same as it already is");
00038    started_=started;
00039    }
00040 
00041 
00042 //*** IsInitialized ***
00043 
00044 bool System::IsInitialized() 
00045    { 
00046    return initialized_; 
00047    }
00048 
00049 
00050 //*** IsStarted ***
00051 
00052 bool System::IsStarted() 
00053    { 
00054    return started_; 
00055    }
00056 
00057 
00058 //*** IsStarted ***
00059 
00060 bool System::IsRunning() 
00061    { 
00062    return IsInitialized() && IsStarted();
00063    }
00064 
00065 
00066 //*** Initialize ***
00067 
00068 void System::Initialize()
00069    {
00070    Assert(!initialized_,"System already initialized");
00071    Assert(!started_,"System already started");
00072    }
00073 
00074 
00075 //*** Start ***
00076 
00077 void System::Start()
00078    {
00079    Assert(initialized_,"System not initialized");
00080    Assert(!started_,"System already started");
00081    }
00082 
00083 
00084 //*** Stop ***
00085 
00086 void System::Stop()
00087    {
00088    Assert(initialized_,"System not initialized");
00089    Assert(started_,"System not started");
00090    }
00091 
00092 
00093 //*** Terminate ***
00094 
00095 void System::Terminate()
00096    {
00097    Assert(!started_,"System not stopped");
00098    Assert(initialized_,"System not initialized");
00099    }
00100