Boost logo

Boost :

Subject: [boost] Enums: naming question?
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-03-18 17:10:04


Hi,

I'm developing a scoped enum library that use an emulation wrapping the
native enum on a class to get scoped enumerators.

I need some traits, to get the native type from the emulation, and the
coping class from the native one.
In addition there is an underlying type that is used to store the
enumerators. Next follows the names I have use in the library:

native_type::type
underlying_type::type
scoping_type::type

In addition I have defined some functions that make the conversions from
these types

template
native_type::type native_value(ScopedEnum e);

template
underlying_type::type underlying_value(ScopedEnum e);

I have defined all these under the boost::enums namespace.

Do you have a better proposal for these (meta-)functions?

If you need more details you can take a look in the sandbow/enums directory
http://svn.boost.org/svn/boost/sandbox/enums/libs/enums/doc/html/index.html

Best,
Vicente

P.S. Note native-type and native_value are yet in the doc as enum_type and
enum_value.
The tutorial is really in a very draft state :(

--
View this message in context: http://boost.2283326.n4.nabble.com/Enums-naming-question-tp3388473p3388473.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk