Argentum Online - Cliente
component_util.h
1 #ifndef COMPONENT_UTIL_H
2 #define COMPONENT_UTIL_H
3 
4 typedef unsigned int ComponentId;
5 
6 inline ComponentId get_unique_id() {
7  static ComponentId id = 0;
8  return id++;
9 }
10 
12  public:
13  ComponentUtil();
14  ~ComponentUtil();
15  template <class T>
16  static ComponentId get_type_id() {
17  static ComponentId type_id = get_unique_id();
18  return type_id;
19  }
20 };
21 
22 #endif // COMPONENT_UTIL_H
ComponentUtil
Definition: component_util.h:11