util/symtable.hh
changeset 974 a47c2df5ae3d
parent 973 f86d5d6bb04e
equal deleted inserted replaced
973:f86d5d6bb04e 974:a47c2df5ae3d
    89     void set(const char *identifier_str, value_t value);    // Will change value associated to string if already in map. Will create new entry if string not in map.
    89     void set(const char *identifier_str, value_t value);    // Will change value associated to string if already in map. Will create new entry if string not in map.
    90     void set(const symbol_c *symbol, value_t value);        // Will change value associated to string if already in map. Will create new entry if string not in map.
    90     void set(const symbol_c *symbol, value_t value);        // Will change value associated to string if already in map. Will create new entry if string not in map.
    91     void insert(const char *identifier_str, value_t value); // insert a new (string,value) pair. Give an error if string already in map associated to different value!
    91     void insert(const char *identifier_str, value_t value); // insert a new (string,value) pair. Give an error if string already in map associated to different value!
    92     void insert(const symbol_c *symbol, value_t value);     // insert a new (string,value) pair. Give an error if string already in map associated to different value!
    92     void insert(const symbol_c *symbol, value_t value);     // insert a new (string,value) pair. Give an error if string already in map associated to different value!
    93 
    93 
    94     value_t operator[](const       char *identifier_str);
    94     value_t& operator[](const       char *identifier_str);
    95     value_t operator[](const std::string identifier_str);
    95     value_t& operator[](const std::string identifier_str);
    96  // value_t operator[](const   symbol_c *identifier    ); // not yet implemented
    96  // value_t& operator[](const   symbol_c *identifier    ); // not yet implemented
    97    
    97    
    98     /* Since symtable_c does not allow duplicates in each level, count() will return
    98     /* Since symtable_c does not allow duplicates in each level, count() will return
    99      *  - 0 : if not found in any level
    99      *  - 0 : if not found in any level
   100      *  - n : number of level containing that entry (max is current number of levels!)
   100      *  - n : number of level containing that entry (max is current number of levels!)
   101      */
   101      */