SerializableJsonEventFactory.cpp 930 B

123456789101112131415161718192021222324
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2021-04-30
  6. * Changed: 2021-05-02
  7. *
  8. * */
  9. #include <ls_std/factory/serialization/json/event/SerializableJsonEventFactory.hpp>
  10. #include <ls_std/event/Event.hpp>
  11. #include <ls_std/serialization/json/event/SerializableJsonEvent.hpp>
  12. ls_std::SerializableJsonEventFactory::SerializableJsonEventFactory() : ls_std::Class("SerializableJsonEventFactory")
  13. {}
  14. std::shared_ptr<ls_std::Class> ls_std::SerializableJsonEventFactory::build()
  15. {
  16. std::shared_ptr<ls_std::Event> requestedObject = std::make_shared<ls_std::Event>("TMP_ID");
  17. std::shared_ptr<ls_std::ISerializable> serializable = std::make_shared<ls_std::SerializableJsonEvent>(requestedObject);
  18. requestedObject->setSerializable(serializable);
  19. return std::dynamic_pointer_cast<ls_std::Class>(requestedObject);
  20. }