Hi!
I am trying to get several parameters in functions as enum variables.
Consider this:
namespace Layout
{
enum type
{
DOT, NEATO, FDP, TWOPI, CIRCO
};
}
A function signature would look like this:
void render(Layout::type L);
And a typical invocation could be:
G.render(Layout::NEATO).;
This looks really OOP and elegant. However, I am unsure whethere this
design pattern is the "de facto" standard one in modern C++. I wonder
how does one organize the enums to separate different enum items in a
nice way?
I am trying to get several parameters in functions as enum variables.
Consider this:
namespace Layout
{
enum type
{
DOT, NEATO, FDP, TWOPI, CIRCO
};
}
A function signature would look like this:
void render(Layout::type L);
And a typical invocation could be:
G.render(Layout::NEATO).;
This looks really OOP and elegant. However, I am unsure whethere this
design pattern is the "de facto" standard one in modern C++. I wonder
how does one organize the enums to separate different enum items in a
nice way?