! this method adds one object (variable of function) into the table */
| 173 | this method adds one object (variable of function) into the table |
| 174 | */ |
| 175 | ErrorCode Add(const std::string & name, const std::string & value, int param = 0) |
| 176 | { |
| 177 | if( !IsNameCorrect(name) ) |
| 178 | return err_incorrect_name; |
| 179 | |
| 180 | Iterator i = table.find(name); |
| 181 | |
| 182 | if( i != table.end() ) |
| 183 | // we have this object in our table |
| 184 | return err_object_exists; |
| 185 | |
| 186 | table.insert( std::make_pair(name, Item(value, param)) ); |
| 187 | |
| 188 | return err_ok; |
| 189 | } |
| 190 | |
| 191 | |
| 192 | #ifndef TTMATH_DONT_USE_WCHAR |