]> git.tdb.fi Git - r2c2.git/blobdiff - source/network/client.h
Make Client hold a non-const reference to the Catalogue
[r2c2.git] / source / network / client.h
index a8f043e575e0fde9996adaec7f314a3a8983488d..02931e553d69a9efc1a8afed0d4714da924654f2 100644 (file)
@@ -28,7 +28,7 @@ public:
        sigc::signal<void, const std::string &> signal_error;
 
 private:
-       const Catalogue &catalogue;
+       Catalogue &catalogue;
        Protocol proto;
        Msp::Net::StreamSocket *socket;
        Msp::Net::Communicator *comm;
@@ -39,7 +39,7 @@ private:
        std::map<unsigned, NetTrain *> trains;
 
 public:
-       Client(const Catalogue &);
+       Client(Catalogue &);
        ~Client();
 
        void use_event_dispatcher(Msp::IO::EventDispatcher &);
@@ -49,7 +49,7 @@ public:
        void send(const P &pkt)
        { if(comm) comm->send(pkt); }
 
-       const Catalogue &get_catalogue() const { return catalogue; }
+       Catalogue &get_catalogue() const { return catalogue; }
        const std::list<std::string> &get_routes() const { return routes; }
        void set_power(bool);
        void set_halt(bool);