core_activation.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef AFUN_CORE_ACTIVATION_H
  2. #define AFUN_CORE_ACTIVATION_H
  3. #include "aFuntool.h"
  4. #include "aFunCoreExport.h"
  5. #include "core_message_stream.h"
  6. #include "aFuncode.h"
  7. namespace aFuncore {
  8. class Activation {
  9. public:
  10. typedef enum ActivationStatus {
  11. as_run = 0,
  12. as_end = 1,
  13. as_end_run = 2,
  14. } ActivationStatus;
  15. Activation() = default;
  16. virtual ~Activation() = default;
  17. Activation(const Activation &) = delete;
  18. Activation &operator=(Activation &) = delete;
  19. virtual ActivationStatus getCode(const aFuncode::Code::ByteCode *&code) = 0;
  20. virtual void runCode(const aFuncode::Code::ByteCode *code) = 0;
  21. virtual void endRun() = 0;
  22. [[nodiscard]] virtual UpMessageStream &getUpStream() = 0;
  23. [[nodiscard]] virtual DownMessageStream &getDownStream() = 0;
  24. [[nodiscard]] virtual aFuntool::FileLine getFileLine() = 0;
  25. [[nodiscard]] virtual const aFuntool::FilePath &getFilePath() = 0;
  26. };
  27. }
  28. #endif //AFUN_CORE_ACTIVATION_H