TokenList.h 389 B

123456789101112131415161718192021222324
  1. #ifndef TOKENLIST_H
  2. #define TOKENLIST_H
  3. #include "Token.h"
  4. #include "../data/ArrayList.h"
  5. class TokenList
  6. {
  7. public:
  8. TokenList();
  9. TokenList(const TokenList& orig);
  10. virtual ~TokenList();
  11. void add(Token* t);
  12. void remove(int index);
  13. int getSize();
  14. Token* get(int index);
  15. void forEach(void (*f) (Token*));
  16. private:
  17. ArrayList<Token*> list;
  18. };
  19. #endif