00001 /******************************************************************* 00002 * This file is part of the source code of the SYNAPS kernel. 00003 * Author(s): B. Mourrain, GALAAD, INRIA 00004 * $Id: $ 00005 ********************************************************************/ 00006 #ifndef synaps_mpol_Variables_H 00007 #define synaps_mpol_Variables_H 00008 //=================================================================== 00009 #include <synaps/init.h> 00010 #include <string> 00011 #include <sstream> 00012 #include <map> 00013 //=================================================================== 00014 __BEGIN_NAMESPACE_SYNAPS 00015 //=================================================================== 00016 struct Variables 00017 { 00018 00019 int _nbvar; 00020 std::map<std::string,int> _index_of_var; 00021 std::map<int,std::string> _var_of_index; 00022 00023 Variables():_nbvar(0) {} 00024 00026 Variables(const char* s) {*this=s;} 00028 std::string& let(int i, const std::string& s); 00030 std::string operator[](int i); 00032 std::string operator[](int i) const; 00034 int operator[](const std::string& s); 00036 Variables& operator=(const char* s); 00037 00038 static Variables default_; 00039 00040 }; 00041 __END_NAMESPACE_SYNAPS 00042 #endif // synaps_mpol_Variables_H