sedScript.h 846 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Filename: sedScript.h
  2. // Created by: drose (24Oct00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. #ifndef SEDSCRIPT_H
  6. #define SEDSCRIPT_H
  7. #include "ppremake.h"
  8. #include <vector>
  9. class SedCommand;
  10. class SedContext;
  11. ///////////////////////////////////////////////////////////////////
  12. // Class : SedScript
  13. // Description : This is a complete sed script: a linear list of
  14. // commands that are to be applied for each line read
  15. // from input.
  16. ////////////////////////////////////////////////////////////////////
  17. class SedScript {
  18. public:
  19. SedScript();
  20. ~SedScript();
  21. bool add_line(const string &line);
  22. bool run(SedContext &context);
  23. public:
  24. bool _quit;
  25. typedef vector<SedCommand *> Commands;
  26. Commands _commands;
  27. Commands::const_iterator _next_command;
  28. };
  29. #endif