title: How do static member Overloading and Overriding works in C++ structs?
body: <p>Here is a an example code I saw in unreal engine recently. </p>
  
  <p>The use case is the given structs form a hierarchy  keeps its "class id" in the hierarchy as a static integer field.</p>
  
  <p>With helper functions as members to identify the struct's "Type" by comparing the ClassID Field.</p>
  
  <p>These structs are intended to be always stored as object variables and never as pointers</p>
  
  <pre><code>struct ENGINE_API FDamageEvent
  {
  
  static const int32 ClassID = 0;
  
      virtual int32 GetTypeID() const { return FDamageEvent::ClassID; }
      virtual bool IsOfType(int32 InID) const { return FDamageEvent::ClassID == InID; };
  
  }
  
  struct ENGINE_API FPointDamageEvent : public FDamageEvent
  {
  
      /** ID for this class. NOTE this must be unique for all damage events. */
      static const int32 ClassID = 1;
      virtual int32 GetTypeID() const override { return FPointDamageEvent::ClassID; };
      virtual bool IsOfType(int32 InID) const override { return (FPointDamageEvent::ClassID == InID) || FDamageEvent::IsOfType(InID); };
  
  }
  
  struct ENGINE_API FRadialDamageEvent : public FDamageEvent
  {
      /** ID for this class. NOTE this must be unique for all damage events. */
      static const int32 ClassID = 2;
  
      virtual int32 GetTypeID() const override { return FRadialDamageEvent::ClassID; };
      virtual bool IsOfType(int32 InID) const override { return (FRadialDamageEvent::ClassID == InID) || FDamageEvent::IsOfType(InID); };
  
  }
  </code></pre>
  
  <p>So the questions here are</p>
  
  <ol>
  <li>Is <code>ClassID</code> field being reassigned, re-declared or shadowing in
      child structs? </li>
  <li>Why does <code>GetTypeID</code>function uses explicit scope of itself while retrieving  <code>ClassID</code> despite being virtual?</li>
  <li>Why does the <code>IsOfType</code> function in child struct
      calling parent class's <code>IsOfType</code> function ? Is it just to simulate
      polymorphism where each child is its parent type as well?</li>
  </ol>