00001
00007 #ifndef _TOKEN_VECTOR_
00008 #define _TOKEN_VECTOR_
00009
00010 #ifndef DOXYGEN_PROCESSING
00011 #include <cstdlib>
00012 #include <vector>
00013 #include <cstring>
00014 #include "system/dve/syntax_analysis/dve_commonparse.hh"
00015 #include "common/deb.hh"
00016
00017 namespace divine {
00018 #endif //DOXYGEN_PROCESSING
00020
00023 class dve_token_vector_t : public std::vector<char *>
00024 {
00025 public:
00026 ~dve_token_vector_t()
00027 {
00028 DEBFUNC(std::cerr << "BEGIN of destructor of token_vector_t" << std::endl;)
00029 for (dve_token_vector_t::iterator i = this->begin();i != this->end(); ++i)
00030 free(*i);
00031 DEBFUNC(std::cerr << "END of destructor of token_vector_t" << std::endl;)
00032 }
00033 const char * save_token(const char * const token)
00034 {
00035 char * aux = (char *)(malloc(MAXLEN));
00036 strncpy(aux,token,MAXLEN);
00037 this->push_back(aux);
00038 return aux;
00039 }
00040 };
00041
00042 #ifndef DOXYGEN_PROCESSING
00043 }
00044
00045 #include "common/undeb.hh"
00046
00047 #endif //DOXYGEN_PROCESSING
00048
00049 #endif