What is the correct implementation for enums as a type?
<p>I'm looking to do something like the following:</p>

<pre><code>class Whatever {
public:

    enum PhysicalObjectType {
            STATIC_MISC_OBJECT,
            DYNAMIC_MISC_OBJECT,
            STATIC_MISC_OBJECT_WALKABLE,
            DYNAMIC_MISC_OBJECT_WALKABLE,
            STATIC_MISC_OBJECT_KILL,
            DYNAMIC_MISC_OBJECT_KILL,
            STATIC_MISC_OBJECT_BREAK,
            DYNAMIC_MISC_OBJECT_BREAK,
            BOUNDARY,
            BOUNDARY_GROUND,
            PERMANENT_JOINT,
            MOUSE_JOINT
    };
};
</code></pre>

<p>And then a method that will retrieve a type based on the above code outside of the class. So lets say within another class I have an instance of <code>Whatever</code> and I call getType() on <code>myWhateverInstance</code> and do a comparison to determine what type it is, like so:</p>

<pre><code>if( myWhateverInstance.getType() == STATIC_MISC_OBJECT ) {

}else ...
</code></pre>

<p>That however, is not working. Basically no matter how I try and resolve them, I cannot access any values within the enum outside of the class. What noob mistake am I making here? (Note the specific errors I'm getting are not declared in scope or XX is not a valid namespace or class, etc).</p>
