$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] Hierarchical enumeration?
From: Archie14 (admin_at_[hidden])
Date: 2009-09-20 19:34:31
Does boost (or any other lib in C++) have facility to support smth that
resembles hierarchical enumeration? I would like to have something like the
following:
enum Hierarchy
{
Store::Clothing = 1
Store::Electronics,
Building::Residential,
Building::Commercial
}
...
Hierarchy h = Hierarchy::Building::Commercial;
...
if (h == Hierarchy::Store)
{
if (h == Hierarchy::Store::Clothing)
std::cout<<"clothing";
}
...