mercredi 3 juillet 2019

looping over multiple enums

How would i loop over multiple enums.

I kind of want to have the enums inside skeleton

Not really sure on how to construct my enums to have them in a container like this

Then not really sure how i could loop it to get each of the types

namespace skeleton{
    namespace RightArm{
        enum Type
        {
            CLAVICLE = 10,
            UPPERARM = 11,
            FOREARM = 12,
            HAND = 13
        };
        static const Type All[] = { CLAVICLE, UPPERARM, FOREARM, HAND };
    }

    namespace RightFoot{
        enum Type
        {
            THIGH = 16,
            CALF = 17,
            FOOT = 18
        };
        static const Type All[] = { THIGH, CALF, FOOT };
    }

    enum Type{
        RightArm,
        LeftFoot
    };
    static const Type All[] = { Type::RightArm, Type::LeftFoot};
}

for (auto s : skeleton::All)
{
    for (auto b : skeletonLeftFoot::All)
    {

    }
}

Aucun commentaire:

Enregistrer un commentaire