Replace enum by class inTemplates c++
<p>i'm facing following problem. Say you have some deeper inheritance. here is some pseudo code:</p>

<pre><code>class MeshEntity{ } // some entities are mesh entities
class SingleMeshEntity : MeshEntity { } // some entites use single meshes
class MultiMeshEntity  : MeshEntity { } // some entities use multi meshes

template &lt;class BASE&gt; class CollisionMeshEntity : BASE // base is either SingleMeshEntity or MultiMeshEntity  
</code></pre>

<p>Lets say you have some enum:</p>

<pre><code>enum MESH_TYPE
{
     SINGLE,
     MULTI
}
</code></pre>

<p>Is it possible to create a template that uses following template (pseude code):</p>

<pre><code>template&lt;MESH_TYPE T&gt; CollisionMeshEntity : if(T == SINGLE){SingleMeshEntity } else if (T == MULTI) {MultiMeshEntity}
</code></pre>

<p>The above code is much simplified. In my programm i have more situations like this, and also the same problem in deeper inheritances.</p>

<p>My aim is to finally create a simple Template that takes two or more enums and then added all correct inheritances up to all base classes.</p>

<p>Thank you for your help.</p>