Torque3D Documentation / _generateds / systemInterfaceList.h

systemInterfaceList.h

Engine/source/core/util/systemInterfaceList.h

More...

Classes:

Detailed Description

 1
 2#pragma once
 3#include "console/engineAPI.h"
 4
 5template<typename T>
 6class SystemInterface
 7{
 8public:
 9   bool mIsEnabled;
10   bool mIsServer;
11
12   static Vector<T*> all;
13
14   SystemInterface()
15   {
16      all.push_back((T*)this);
17   }
18
19   virtual ~SystemInterface()
20   {
21      for (U32 i = 0; i < all.size(); i++)
22      {
23         if (all[i] == (T*)this)
24         {
25            all.erase(i);
26            return;
27         }
28      }
29   }
30};
31template<typename T> Vector<T*> SystemInterface<T>::all(0);
32