msg.inline.h 955 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef AFUN_MSG_INLINE_H
  2. #define AFUN_MSG_INLINE_H
  3. #include <utility>
  4. #include "msg.h"
  5. namespace aFuncore {
  6. inline NormalMessage::NormalMessage(Object *obj_) : obj {obj_} {
  7. }
  8. inline NormalMessage::NormalMessage(NormalMessage &&msg) noexcept : obj {msg.obj}{
  9. msg.obj = nullptr;
  10. }
  11. inline Object *NormalMessage::getObject() {
  12. return obj;
  13. }
  14. inline ErrorMessage::ErrorMessage(ErrorMessage &&msg) noexcept
  15. : error_type{std::move(msg.error_type)}, error_info{std::move(msg.error_info)},
  16. trackback{std::move(msg.trackback)}, inter{msg.inter}{
  17. }
  18. inline std::string ErrorMessage::getErrorType() const {
  19. return error_type;
  20. }
  21. inline std::string ErrorMessage::getErrorInfo() const {
  22. return error_info;
  23. }
  24. inline const std::list<ErrorMessage::TrackBack> &ErrorMessage::getTrackBack() const {
  25. return trackback;
  26. }
  27. }
  28. #endif //AFUN_MSG_INLINE_H