Class.cpp 651 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-08-07
  6. * Changed: 2022-05-09
  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. std::string ls::std::core::Class::getClassName()
  16. {
  17. return this->name;
  18. }
  19. void ls::std::core::Class::_assignClassName(const ::std::string &_name)
  20. {
  21. if (_name.empty())
  22. {
  23. throw ls::std::core::IllegalArgumentException{};
  24. }
  25. this->name = _name;
  26. }