Main Page   Compound List   File List   Compound Members   File Members  

enumTranslate.cpp File Reference

#include <assert.h>
#include <string.h>
#include <stdio.h>

Go to the source code of this file.

Compounds

struct  EnumTranslate::EnumTable
 A tuple composed of an enumeration value and its associated name (a const char *). More...

class  EnumTranslate
 Translate between an enumeration value and a string. More...

class  Fruit
 An example class that makes use of the EnumTranslate template. More...

class  Numbers
 An example class that makes use of the EnumTranslate template. More...


Functions

 main ()
 \function Some simple test code. More...


Function Documentation

main  
 

\function Some simple test code.

Definition at line 190 of file enumTranslate.cpp.

00191 {
00192    Fruit f;
00193    Numbers n;
00194    const char *str;
00195 
00196    str = f.enumName( Fruit::pears );
00197    printf("pears = %s\n", str );
00198    str = n.enumName( Numbers::three );
00199    printf("three = %s\n", str );
00200 }


Generated at Mon May 13 14:07:31 2002 for An Enumeration to const char * translation template by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001