active_res.cpp 406 B

12345678910111213141516171819202122232425262728293031
  1. #include "active_res.h"
  2. #include <status_codes.h>
  3. #include <stdexcept>
  4. using std::runtime_error;
  5. active_res::active_res()
  6. {
  7. }
  8. active_res::~active_res()
  9. {
  10. }
  11. void active_res::action()
  12. {
  13. }
  14. int active_res::perform(response *res)
  15. {
  16. if (res->response_u.active.response != status::VALID)
  17. throw runtime_error(
  18. status_codes::get(res->response_u.active.response));
  19. action();
  20. return status::VALID;
  21. }