ドメインコンテキスト

ドメインコンテキスト

ドメインコンテキストは、現在のドメインに関する情報を格納する。

セッションはドメイン毎に独立したドメインコンテキストを持っている。 ドメインへ処理を渡す時に、そのドメイン用のコンテキストのみを SessionHandle に持たせる。

このため、ドメイン内の処理では別ドメインのコンテキストを参照することはできない。


struct DomainContext
{
   public:
      int index() const;

      bool isRooming() const;
      Room* room();
      uint16_t lobbyId() const;

      void setLobbyId(uint16_t a);
};