Changeset e7de6cc for src/dgp/symbol.hh
- Timestamp:
- 02/21/12 20:02:51 (13 years ago)
- Branches:
- master
- Children:
- b242df2
- Parents:
- 354ba3d
- git-author:
- Tomasz Obrebski <to@…> (02/21/12 20:02:51)
- git-committer:
- Tomasz Obrebski <to@…> (02/21/12 20:02:51)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/dgp/symbol.hh
r5f4d9c3 re7de6cc 3 3 4 4 #include <ext/hash_map> 5 //#include <ext/hash_fun.h>6 5 #include <string> 7 #include < string.h>6 #include <cstring> 8 7 #include <fstream> 9 8 #include <vector> … … 58 57 /// Symbol class template. 59 58 /** The template argument determines the symbol space. 60 Each space is created with symbol "NULL" with index ed0 already in.59 Each space is created with symbol "NULL" with index 0 already in. 61 60 */ 62 61 … … 104 103 105 104 Symbol(const char * s) : val(defs[s]) {}; 106 105 106 Symbol(string s) : val(defs[(char*)s]) {}; 107 108 109 bool empty() const { return val==0; } 110 107 111 /// Symbol to char* conversion. If symbol is invalid, NULL is returned. 108 112 const char* str() const { return (val>=0 && val<count())?defs[val]:NULL; }; … … 113 117 s=0; while(++s) ... 114 118 */ 119 115 120 (operator int)() const { return val; }; 116 121
Note: See TracChangeset
for help on using the changeset viewer.