Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 23, 2015, 10:20:29 PM (9 years ago)
Author:
landauf
Message:

always use 'virtual' in the declaration of virtual functions even if they are inherited

Location:
code/branches/cpp11_v2/src/libraries/network
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/network/Client.h

    r10817 r10845  
    7676    static Client* getInstance(){ return singletonPtr_s; } // tolua_export
    7777
    78     bool establishConnection() override;
     78    virtual bool establishConnection() override;
    7979    void setDestination( const std::string& serverAddress, unsigned int port ); // tolua_export
    80     bool closeConnection() override;
    81     void queuePacket(ENetPacket* packet, int clientID, uint8_t channelID) override;
     80    virtual bool closeConnection() override;
     81    virtual void queuePacket(ENetPacket* packet, int clientID, uint8_t channelID) override;
    8282    virtual bool sendPacket( packet::Packet* packet ) override{ return packet->send( static_cast<Host*>(this) ); }
    8383    virtual void doSendChat(const std::string& message, unsigned int sourceID, unsigned int targetID) override;
     
    9191    Client(const Client& copy); // not used
    9292    virtual bool isServer_() override{return false;}
    93     void processPacket(packet::Packet* packet) override;
     93    virtual void processPacket(packet::Packet* packet) override;
    9494
    9595    static Client* singletonPtr_s;
  • code/branches/cpp11_v2/src/libraries/network/NetworkFunction.h

    r10817 r10845  
    142142    { }
    143143
    144     inline bool call(uint32_t objectID) override
     144    virtual inline bool call(uint32_t objectID) override
    145145    {
    146146      if ( Synchronisable::getSynchronisable(objectID)!=nullptr )
     
    152152        return false;
    153153    }
    154     inline bool call(uint32_t objectID, const MultiType& mt1) override
     154    virtual inline bool call(uint32_t objectID, const MultiType& mt1) override
    155155    {
    156156      if ( Synchronisable::getSynchronisable(objectID)!=nullptr )
     
    162162        return false;
    163163    }
    164     inline bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2) override
     164    virtual inline bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2) override
    165165    {
    166166      if ( Synchronisable::getSynchronisable(objectID)!=nullptr )
     
    172172        return false;
    173173    }
    174     inline bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3) override
     174    virtual inline bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3) override
    175175    {
    176176      if ( Synchronisable::getSynchronisable(objectID)!=nullptr )
     
    182182        return false;
    183183    }
    184     inline bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4) override
     184    virtual inline bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4) override
    185185    {
    186186      if ( Synchronisable::getSynchronisable(objectID)!=nullptr )
     
    192192        return false;
    193193    }
    194     inline bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5) override
     194    virtual inline bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5) override
    195195    {
    196196      if ( Synchronisable::getSynchronisable(objectID)!=nullptr )
  • code/branches/cpp11_v2/src/libraries/network/Server.h

    r10817 r10845  
    6161    void open();
    6262    void close();
    63     void queuePacket(ENetPacket *packet, int clientID, uint8_t channelID) override;
     63    virtual void queuePacket(ENetPacket *packet, int clientID, uint8_t channelID) override;
    6464    virtual bool sendPacket( packet::Packet* packet ) override{ return packet->send( static_cast<Host*>(this) ); }
    6565    void update(const Clock& time);
     
    7676    unsigned int playerID(){return 0;}
    7777
    78     void addPeer(uint32_t peerID) override;
    79     void removePeer(uint32_t peerID) override;
    80     void processPacket(packet::Packet* packet) override;
     78    virtual void addPeer(uint32_t peerID) override;
     79    virtual void removePeer(uint32_t peerID) override;
     80    virtual void processPacket(packet::Packet* packet) override;
    8181
    8282    bool createClient(int clientID);
  • code/branches/cpp11_v2/src/libraries/network/packet/Acknowledgement.h

    r10817 r10845  
    4646  ~Acknowledgement();
    4747
    48   inline unsigned int getSize() const override;
     48  virtual inline unsigned int getSize() const override;
    4949  virtual bool process(orxonox::Host* host) override;
    5050
  • code/branches/cpp11_v2/src/libraries/network/packet/Chat.h

    r10817 r10845  
    4949
    5050  /* get size of packet */
    51   inline unsigned int getSize() const override;
     51  virtual inline unsigned int getSize() const override;
    5252
    5353  /* process chat message packet and remove it afterwards */
  • code/branches/cpp11_v2/src/libraries/network/packet/ClassID.h

    r10817 r10845  
    4747  ~ClassID();
    4848
    49   uint32_t getSize() const override;
     49  virtual uint32_t getSize() const override;
    5050  virtual bool process(orxonox::Host* host) override;
    5151
  • code/branches/cpp11_v2/src/libraries/network/packet/DeleteObjects.h

    r10817 r10845  
    4848  bool fetchIDs();
    4949
    50   inline unsigned int getSize() const override;
     50  virtual inline unsigned int getSize() const override;
    5151  virtual bool process(orxonox::Host* host) override;
    5252
  • code/branches/cpp11_v2/src/libraries/network/packet/FunctionCalls.h

    r10817 r10845  
    5252  ~FunctionCalls();
    5353
    54   inline unsigned int getSize() const override
     54  virtual inline unsigned int getSize() const override
    5555    { assert(!this->isDataENetAllocated()); return currentSize_; }
    5656  virtual bool process(orxonox::Host* host) override;
  • code/branches/cpp11_v2/src/libraries/network/packet/Welcome.h

    r10817 r10845  
    4545  virtual ~Welcome();
    4646
    47   uint8_t *getData() override;
    48   inline unsigned int getSize() const override;
     47  virtual uint8_t *getData() override;
     48  virtual inline unsigned int getSize() const override;
    4949  virtual bool process(orxonox::Host* host) override;
    5050
Note: See TracChangeset for help on using the changeset viewer.