Class.cpp 709 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-08-07
  6. * Changed: 2023-02-23
  7. *
  8. * */
  9. #include <ls-std/core/Class.hpp>
  10. #include <ls-std/core/evaluator/EmptyStringArgumentEvaluator.hpp>
  11. using ls::std::core::Class;
  12. using ls::std::core::EmptyStringArgumentEvaluator;
  13. using std::string;
  14. Class::Class(const string &_name)
  15. {
  16. this->_assignClassName(_name);
  17. }
  18. Class::~Class() = default;
  19. string Class::getClassName()
  20. {
  21. return this->name;
  22. }
  23. void Class::_assignClassName(const string &_name)
  24. {
  25. EmptyStringArgumentEvaluator{_name, "class name is empty!"}.evaluate();
  26. this->name = _name;
  27. }