A type to uniquely name a CD in the tree.
More...
#include <cd.h>
|
uint | level |
| Level within the tree (root=0)
|
|
uint | number |
| Unique ID within level.
|
|
A type to uniquely name a CD in the tree.
A CD name consists of its level in the CD tree (root=0)and the its ID, or sequence number, within that level.
- Note
- Alternatives:
- The alternative of simply a unique name misses the idea of levels in the tree; the idea of hierarchy is central to CDs so this is a bad alternative.
- The alternative of naming a CD by its entire "branch" leads to requiring the name to be parsed to identify the level; the level is typically the most crucial information so this seems unduly complex.
- A third alternative is to store the branch information as a std::vector, so the vector's length is the level. However, this means the name is rather long.
- Todo:
- Decide on whether to represent a CD name as (level, num) or as
typedef std::vector<uint> CDNameT;
to represent the path through the tree branches.
The documentation for this struct was generated from the following file: