ChatObserver.h 752 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include <Text.h>
  3. #include <Array.h>
  4. #include <Writer.h>
  5. class ChatObserver : public virtual Framework::ReferenceCounter
  6. {
  7. private:
  8. int entityId;
  9. Framework::RCArray<Framework::Text> channel;
  10. Framework::RCArray<Framework::Text> ignoredPlayers;
  11. public:
  12. ChatObserver(int entityId);
  13. void addChannel(Framework::Text channel);
  14. void removeChannel(Framework::Text channel);
  15. bool isSubscribedTo(Framework::Text channel);
  16. void addIgnoredPlayer(Framework::Text playerName);
  17. void removeIgnoredPlayer(Framework::Text playerName);
  18. int getEntityId() const;
  19. void save() const;
  20. void writeTo(Framework::StreamWriter* zWriter) const;
  21. bool isValid() const;
  22. Framework::Text getPlayerName() const;
  23. };