MessageEvent.cpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* Copyright (C) 2014 Carlos Aguilar Melchor, Joris Barrier, Marc-Olivier Killijian
  2. * This file is part of XPIR.
  3. *
  4. * XPIR is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * XPIR is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with XPIR. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #include "MessageEvent.hpp"
  18. MessageEvent::MessageEvent():
  19. mtype(DEFAULT)
  20. {}
  21. MessageEvent::MessageEvent(message_type mtype_):
  22. mtype(mtype_)
  23. {}
  24. MessageEvent::MessageEvent(std::string message_):
  25. mtype(DEFAULT),
  26. message(message_)
  27. {}
  28. MessageEvent::MessageEvent(message_type mtype_, std::string message_):
  29. mtype(mtype_),
  30. message(message_),
  31. info(message_)
  32. {}
  33. MessageEvent::MessageEvent(message_type mtype_, std::string message_, std::string info_):
  34. mtype(mtype_),
  35. message(message_),
  36. info(info_)
  37. {}
  38. message_type MessageEvent::getMessageType()
  39. {
  40. return mtype;
  41. }
  42. const std::string& MessageEvent::getMessage()
  43. {
  44. return message;
  45. }
  46. const std::string& MessageEvent::getInfo()
  47. {
  48. return info;
  49. }
  50. void MessageEvent::setMessage(std::string message_)
  51. {
  52. message = message_;
  53. }