Changeset e7de6cc for src/dgp/symbol.hh


Ignore:
Timestamp:
02/21/12 20:02:51 (13 years ago)
Author:
Tomasz Obrebski <to@…>
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)
Message:

new version of dgp
added dgc, tre and compdic components
compiledic renamed to compdic_utf8
./configure updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/dgp/symbol.hh

    r5f4d9c3 re7de6cc  
    33 
    44#include <ext/hash_map> 
    5 //#include <ext/hash_fun.h> 
    65#include <string> 
    7 #include <string.h> 
     6#include <cstring> 
    87#include <fstream> 
    98#include <vector> 
     
    5857/// Symbol class template.  
    5958/** The template argument determines the symbol space. 
    60     Each space is created with symbol "NULL" with indexed 0 already in. 
     59    Each space is created with symbol "NULL" with index 0 already in. 
    6160*/ 
    6261 
     
    104103 
    105104  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 
    107111  /// Symbol to char* conversion. If symbol is invalid, NULL is returned. 
    108112  const char* str() const { return (val>=0 && val<count())?defs[val]:NULL; }; 
     
    113117      s=0; while(++s) ... 
    114118   */ 
     119 
    115120  (operator int)() const { return val; }; 
    116121 
Note: See TracChangeset for help on using the changeset viewer.