mirror of https://github.com/SeanOMik/libki.git
protocol: Add override specifier
I thought final implied it
This commit is contained in:
parent
85361f0e40
commit
0268cf247d
|
@ -9,7 +9,7 @@ namespace ki
|
||||||
{
|
{
|
||||||
namespace protocol
|
namespace protocol
|
||||||
{
|
{
|
||||||
class Packet : public util::Serializable
|
class Packet final : public util::Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Packet(bool control = false, uint8_t opcode = 0);
|
Packet(bool control = false, uint8_t opcode = 0);
|
||||||
|
@ -45,9 +45,9 @@ namespace protocol
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void write_to(std::ostream &ostream) const final;
|
void write_to(std::ostream &ostream) const override final;
|
||||||
virtual void read_from(std::istream &istream) final;
|
void read_from(std::istream &istream) override final;
|
||||||
virtual size_t get_size() const final;
|
size_t get_size() const override final;
|
||||||
private:
|
private:
|
||||||
bool m_control;
|
bool m_control;
|
||||||
uint8_t m_opcode;
|
uint8_t m_opcode;
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace protocol
|
||||||
{
|
{
|
||||||
namespace control
|
namespace control
|
||||||
{
|
{
|
||||||
class ClientHello : public util::Serializable
|
class ClientHello final : public util::Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ClientHello(uint16_t session_id = 0,
|
ClientHello(uint16_t session_id = 0,
|
||||||
|
@ -27,9 +27,9 @@ namespace control
|
||||||
uint32_t get_milliseconds() const;
|
uint32_t get_milliseconds() const;
|
||||||
void set_milliseconds(uint32_t milliseconds);
|
void set_milliseconds(uint32_t milliseconds);
|
||||||
|
|
||||||
void write_to(std::ostream &ostream) const final;
|
void write_to(std::ostream &ostream) const override final;
|
||||||
void read_from(std::istream &istream) final;
|
void read_from(std::istream &istream) override final;
|
||||||
size_t get_size() const final;
|
size_t get_size() const override final;
|
||||||
|
|
||||||
static Packet *create_packet(uint16_t session_id = 0,
|
static Packet *create_packet(uint16_t session_id = 0,
|
||||||
uint64_t timestamp = 0, uint32_t milliseconds = 0)
|
uint64_t timestamp = 0, uint32_t milliseconds = 0)
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
|
|
||||||
namespace ki
|
namespace ki
|
||||||
{
|
{
|
||||||
namespace protocol
|
namespace protocol
|
||||||
{
|
{
|
||||||
namespace control
|
namespace control
|
||||||
{
|
{
|
||||||
class Ping : public util::Serializable
|
class Ping final : public util::Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Ping(uint16_t session_id = 0,
|
Ping(uint16_t session_id = 0,
|
||||||
|
@ -26,9 +26,9 @@ namespace ki
|
||||||
uint8_t get_minutes() const;
|
uint8_t get_minutes() const;
|
||||||
void set_minutes(uint8_t minutes);
|
void set_minutes(uint8_t minutes);
|
||||||
|
|
||||||
void write_to(std::ostream &ostream) const final;
|
void write_to(std::ostream &ostream) const override final;
|
||||||
void read_from(std::istream &istream) final;
|
void read_from(std::istream &istream) override final;
|
||||||
size_t get_size() const final;
|
size_t get_size() const override final;
|
||||||
|
|
||||||
static Packet *create_packet(uint16_t session_id = 0,
|
static Packet *create_packet(uint16_t session_id = 0,
|
||||||
uint16_t milliseconds = 0, uint8_t minutes = 0,
|
uint16_t milliseconds = 0, uint8_t minutes = 0,
|
||||||
|
@ -45,6 +45,6 @@ namespace ki
|
||||||
uint16_t m_milliseconds;
|
uint16_t m_milliseconds;
|
||||||
uint8_t m_minutes;
|
uint8_t m_minutes;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace protocol
|
||||||
{
|
{
|
||||||
namespace control
|
namespace control
|
||||||
{
|
{
|
||||||
class ServerHello : public util::Serializable
|
class ServerHello final : public util::Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ServerHello(uint16_t session_id = 0,
|
ServerHello(uint16_t session_id = 0,
|
||||||
|
@ -27,9 +27,9 @@ namespace control
|
||||||
uint32_t get_milliseconds() const;
|
uint32_t get_milliseconds() const;
|
||||||
void set_milliseconds(uint32_t milliseconds);
|
void set_milliseconds(uint32_t milliseconds);
|
||||||
|
|
||||||
void write_to(std::ostream &ostream) const final;
|
void write_to(std::ostream &ostream) const override final;
|
||||||
void read_from(std::istream &istream) final;
|
void read_from(std::istream &istream) override final;
|
||||||
size_t get_size() const final;
|
size_t get_size() const override final;
|
||||||
|
|
||||||
static Packet *create_packet(uint16_t session_id = 0,
|
static Packet *create_packet(uint16_t session_id = 0,
|
||||||
uint64_t timestamp = 0, uint32_t milliseconds = 0)
|
uint64_t timestamp = 0, uint32_t milliseconds = 0)
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace protocol
|
||||||
{
|
{
|
||||||
namespace dml
|
namespace dml
|
||||||
{
|
{
|
||||||
class Message : public util::Serializable
|
class Message final : public util::Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Message(uint8_t service_id = 0, uint8_t type = 0);
|
Message(uint8_t service_id = 0, uint8_t type = 0);
|
||||||
|
@ -25,9 +25,9 @@ namespace dml
|
||||||
const ki::dml::Record &get_record() const;
|
const ki::dml::Record &get_record() const;
|
||||||
void set_record(const ki::dml::Record &record);
|
void set_record(const ki::dml::Record &record);
|
||||||
|
|
||||||
void write_to(std::ostream &ostream) const final;
|
void write_to(std::ostream &ostream) const override final;
|
||||||
void read_from(std::istream &istream) final;
|
void read_from(std::istream &istream) override final;
|
||||||
size_t get_size() const final;
|
size_t get_size() const override final;
|
||||||
private:
|
private:
|
||||||
uint8_t m_service_id;
|
uint8_t m_service_id;
|
||||||
uint8_t m_type;
|
uint8_t m_type;
|
||||||
|
|
Loading…
Reference in New Issue