Class.cpp 696 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-08-07
  6. * Changed: 2022-12-23
  7. *
  8. * */
  9. #include <ls_std/core/Class.hpp>
  10. #include <ls_std/core/exception/IllegalArgumentException.hpp>
  11. ls::std::core::Class::Class(const ::std::string &_name)
  12. {
  13. this->_assignClassName(_name);
  14. }
  15. ls::std::core::Class::~Class()
  16. = default;
  17. ::std::string ls::std::core::Class::getClassName()
  18. {
  19. return this->name;
  20. }
  21. void ls::std::core::Class::_assignClassName(const ::std::string &_name)
  22. {
  23. if (_name.empty())
  24. {
  25. throw ls::std::core::IllegalArgumentException{};
  26. }
  27. this->name = _name;
  28. }