root/juggler/tags/1.0_alpha_02/Config/vjEnumEntry.h

Revision 154, 419 bytes (checked in by cjust, 10 years ago)

*** empty log message ***

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /* Tiny little data structure used to store an entry of enumeration
2  * or valuelabel data
3  */
4
5 #include <strings.h>
6
7 class vjEnumEntry {
8 private:
9   char *entry;
10   int val;
11
12 public:
13   vjEnumEntry (char *e, int v) {
14     entry = new char[strlen(e)+1];
15     strcpy (entry, e);
16     val = v;
17   }
18
19   ~vjEnumEntry () {
20     delete entry;
21   }
22
23   char* getName () {
24     return entry;
25   }
26
27   int getVal () {
28     return val;
29   }
30 };
Note: See TracBrowser for help on using the browser.