T
toton
I have an enum in a namespace like,
namespace client{
namespace ui{
enum InkEnum{
ID_INK_COLOR,
ID_INK_WIDTH,
};
class InkEventHandler{
...
};
}
}
Now I want this enum in a different namespace,
#include "../client/ui/InkEventHandler.hpp"
using client::ui::InkEventHandler;
namespace ui{
class InkMenu : public ...{
/// I need the ID_INK_COLOR etc here inside the member function.
};
}
however using client::ui::InkEnum is not giving the desigred result.
ofcourse using namespace client::ui; is working, However it opens all
other definitions also, which I may not want.
Moreover I will use InkEnum with InkEventHandler only. Thus can I have
the enum inside the InkEventHandler class definition, so that whenever
I use the class ID_INK_COLOR etc are available?
thanks
abir
namespace client{
namespace ui{
enum InkEnum{
ID_INK_COLOR,
ID_INK_WIDTH,
};
class InkEventHandler{
...
};
}
}
Now I want this enum in a different namespace,
#include "../client/ui/InkEventHandler.hpp"
using client::ui::InkEventHandler;
namespace ui{
class InkMenu : public ...{
/// I need the ID_INK_COLOR etc here inside the member function.
};
}
however using client::ui::InkEnum is not giving the desigred result.
ofcourse using namespace client::ui; is working, However it opens all
other definitions also, which I may not want.
Moreover I will use InkEnum with InkEventHandler only. Thus can I have
the enum inside the InkEventHandler class definition, so that whenever
I use the class ID_INK_COLOR etc are available?
thanks
abir