AStatusCode.cpp 897 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * author: Patrick-Christopher Mattulat
  3. * e-mail: webmaster@lynarstudios.com
  4. */
  5. #include <interface/AStatusCode.hpp>
  6. #include <ls-std/ls-std-core.hpp>
  7. using ls::atlantis::glossary::StatusCodes;
  8. using ls::atlantis::interfaces::AStatusCode;
  9. using ls::std::core::EmptyStringArgumentEvaluator;
  10. using ::std::move;
  11. using ::std::string;
  12. using ::std::vector;
  13. AStatusCode::AStatusCode(const StatusCodes &_statusCode, string _statusText) : statusCode(_statusCode), statusText(::move(_statusText))
  14. {}
  15. AStatusCode::~AStatusCode() = default;
  16. void AStatusCode::addHint(const string &_hint)
  17. {
  18. EmptyStringArgumentEvaluator(_hint).evaluate();
  19. this->statusHints.push_back(_hint);
  20. }
  21. StatusCodes AStatusCode::getCode() const
  22. {
  23. return this->statusCode;
  24. }
  25. vector<string> AStatusCode::getHints() const
  26. {
  27. return this->statusHints;
  28. }
  29. string AStatusCode::getText() const
  30. {
  31. return this->statusText;
  32. }