eolib-cpp 0.1.0-beta.7
Core C++ library for writing Endless Online applications
Loading...
Searching...
No Matches
eolib::protocol::net::server::GuildReplyServerPacket Class Referencefinal

Generic guild reply messages. More...

#include <eolib/protocol/net/server/packets.hpp>

Inherits eolib::protocol::net::Packet.

Classes

class  ReplyCodeDataCreateAdd
 Data associated with reply_code value CreateAdd. More...
class  ReplyCodeDataCreateAddConfirm
 Data associated with reply_code value CreateAddConfirm. More...
class  ReplyCodeDataJoinRequest
 Data associated with reply_code value JoinRequest. More...

Public Types

using ReplyCodeData = std::variant<std::monostate, ReplyCodeDataCreateAdd, ReplyCodeDataCreateAddConfirm, ReplyCodeDataJoinRequest>
 Data associated with different values of the reply_code field.

Public Member Functions

const ReplyCodeDataCreateAdd * AsCreateAdd () const noexcept
 Gets the data associated with reply_code value CreateAdd.
ReplyCodeDataCreateAdd * AsCreateAdd () noexcept
 Gets the data associated with reply_code value CreateAdd.
const ReplyCodeDataCreateAddConfirm * AsCreateAddConfirm () const noexcept
 Gets the data associated with reply_code value CreateAddConfirm.
ReplyCodeDataCreateAddConfirm * AsCreateAddConfirm () noexcept
 Gets the data associated with reply_code value CreateAddConfirm.
const ReplyCodeDataJoinRequest * AsJoinRequest () const noexcept
 Gets the data associated with reply_code value JoinRequest.
ReplyCodeDataJoinRequest * AsJoinRequest () noexcept
 Gets the data associated with reply_code value JoinRequest.
PacketFamily Family () const noexcept override
 Gets the packet family associated with this packet.
PacketAction Action () const noexcept override
 Gets the packet action associated with this packet.
int ByteSize () const noexcept override
 Gets the size of the data that this object was deserialized from.
void Serialize (data::EoWriter &writer) const override
 Serializes this object to the provided writer.
void Deserialize (data::EoReader &reader) override
 Deserializes this object from the provided reader, replacing its current data.
std::string ToString () const override
 Gets a human-readable representation of this object, for debugging purposes.
bool operator== (const GuildReplyServerPacket &other) const
 Compares this object with another for equality.
bool operator!= (const GuildReplyServerPacket &other) const
 Compares this object with another for inequality.
Public Member Functions inherited from eolib::protocol::Serializable
virtual ~Serializable ()=default

Static Public Member Functions

static GuildReplyServerPacket ForBusy ()
 Creates a new GuildReplyServerPacket with reply_code set to Busy.
static GuildReplyServerPacket ForNotApproved ()
 Creates a new GuildReplyServerPacket with reply_code set to NotApproved.
static GuildReplyServerPacket ForAlreadyMember ()
 Creates a new GuildReplyServerPacket with reply_code set to AlreadyMember.
static GuildReplyServerPacket ForNoCandidates ()
 Creates a new GuildReplyServerPacket with reply_code set to NoCandidates.
static GuildReplyServerPacket ForExists ()
 Creates a new GuildReplyServerPacket with reply_code set to Exists.
static GuildReplyServerPacket ForCreateBegin ()
 Creates a new GuildReplyServerPacket with reply_code set to CreateBegin.
static GuildReplyServerPacket ForCreateAddConfirm (ReplyCodeDataCreateAddConfirm data)
 Creates a new GuildReplyServerPacket with reply_code set to CreateAddConfirm.
static GuildReplyServerPacket ForCreateAdd (ReplyCodeDataCreateAdd data)
 Creates a new GuildReplyServerPacket with reply_code set to CreateAdd.
static GuildReplyServerPacket ForRecruiterOffline ()
 Creates a new GuildReplyServerPacket with reply_code set to RecruiterOffline.
static GuildReplyServerPacket ForRecruiterNotHere ()
 Creates a new GuildReplyServerPacket with reply_code set to RecruiterNotHere.
static GuildReplyServerPacket ForRecruiterWrongGuild ()
 Creates a new GuildReplyServerPacket with reply_code set to RecruiterWrongGuild.
static GuildReplyServerPacket ForNotRecruiter ()
 Creates a new GuildReplyServerPacket with reply_code set to NotRecruiter.
static GuildReplyServerPacket ForJoinRequest (ReplyCodeDataJoinRequest data)
 Creates a new GuildReplyServerPacket with reply_code set to JoinRequest.
static GuildReplyServerPacket ForNotPresent ()
 Creates a new GuildReplyServerPacket with reply_code set to NotPresent.
static GuildReplyServerPacket ForAccountLow ()
 Creates a new GuildReplyServerPacket with reply_code set to AccountLow.
static GuildReplyServerPacket ForAccepted ()
 Creates a new GuildReplyServerPacket with reply_code set to Accepted.
static GuildReplyServerPacket ForNotFound ()
 Creates a new GuildReplyServerPacket with reply_code set to NotFound.
static GuildReplyServerPacket ForUpdated ()
 Creates a new GuildReplyServerPacket with reply_code set to Updated.
static GuildReplyServerPacket ForRanksUpdated ()
 Creates a new GuildReplyServerPacket with reply_code set to RanksUpdated.
static GuildReplyServerPacket ForRemoveLeader ()
 Creates a new GuildReplyServerPacket with reply_code set to RemoveLeader.
static GuildReplyServerPacket ForRemoveNotMember ()
 Creates a new GuildReplyServerPacket with reply_code set to RemoveNotMember.
static GuildReplyServerPacket ForRemoved ()
 Creates a new GuildReplyServerPacket with reply_code set to Removed.
static GuildReplyServerPacket ForRankingLeader ()
 Creates a new GuildReplyServerPacket with reply_code set to RankingLeader.
static GuildReplyServerPacket ForRankingNotMember ()
 Creates a new GuildReplyServerPacket with reply_code set to RankingNotMember.

Public Attributes

GuildReply reply_code {}
ReplyCodeData reply_code_data {}
 Data associated with the reply_code field.

Static Public Attributes

static constexpr PacketFamily FAMILY = PacketFamily::Guild
 The packet family associated with this packet.
static constexpr PacketAction ACTION = PacketAction::Reply
 The packet action associated with this packet.

Additional Inherited Members

Protected Member Functions inherited from eolib::protocol::Serializable
 Serializable ()=default
 Serializable (const Serializable &)=default
 Serializable (Serializable &&)=default
Serializable & operator= (const Serializable &)=default
Serializable & operator= (Serializable &&)=default

Detailed Description

Generic guild reply messages.

Member Typedef Documentation

◆ ReplyCodeData

Member Function Documentation

◆ AsCreateAdd() [1/2]

const ReplyCodeDataCreateAdd * eolib::protocol::net::server::GuildReplyServerPacket::AsCreateAdd ( ) const
inlinenoexcept

Gets the data associated with reply_code value CreateAdd.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsCreateAdd() [2/2]

ReplyCodeDataCreateAdd * eolib::protocol::net::server::GuildReplyServerPacket::AsCreateAdd ( )
inlinenoexcept

Gets the data associated with reply_code value CreateAdd.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsCreateAddConfirm() [1/2]

const ReplyCodeDataCreateAddConfirm * eolib::protocol::net::server::GuildReplyServerPacket::AsCreateAddConfirm ( ) const
inlinenoexcept

Gets the data associated with reply_code value CreateAddConfirm.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsCreateAddConfirm() [2/2]

ReplyCodeDataCreateAddConfirm * eolib::protocol::net::server::GuildReplyServerPacket::AsCreateAddConfirm ( )
inlinenoexcept

Gets the data associated with reply_code value CreateAddConfirm.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsJoinRequest() [1/2]

const ReplyCodeDataJoinRequest * eolib::protocol::net::server::GuildReplyServerPacket::AsJoinRequest ( ) const
inlinenoexcept

Gets the data associated with reply_code value JoinRequest.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsJoinRequest() [2/2]

ReplyCodeDataJoinRequest * eolib::protocol::net::server::GuildReplyServerPacket::AsJoinRequest ( )
inlinenoexcept

Gets the data associated with reply_code value JoinRequest.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ ForBusy()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForBusy ( )
static

Creates a new GuildReplyServerPacket with reply_code set to Busy.

Returns
the created object.

◆ ForNotApproved()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForNotApproved ( )
static

Creates a new GuildReplyServerPacket with reply_code set to NotApproved.

Returns
the created object.

◆ ForAlreadyMember()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForAlreadyMember ( )
static

Creates a new GuildReplyServerPacket with reply_code set to AlreadyMember.

Returns
the created object.

◆ ForNoCandidates()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForNoCandidates ( )
static

Creates a new GuildReplyServerPacket with reply_code set to NoCandidates.

Returns
the created object.

◆ ForExists()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForExists ( )
static

Creates a new GuildReplyServerPacket with reply_code set to Exists.

Returns
the created object.

◆ ForCreateBegin()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForCreateBegin ( )
static

Creates a new GuildReplyServerPacket with reply_code set to CreateBegin.

Returns
the created object.

◆ ForCreateAddConfirm()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForCreateAddConfirm ( ReplyCodeDataCreateAddConfirm data)
static

Creates a new GuildReplyServerPacket with reply_code set to CreateAddConfirm.

Parameters
datathe data associated with reply_code CreateAddConfirm.
Returns
the created object.

◆ ForCreateAdd()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForCreateAdd ( ReplyCodeDataCreateAdd data)
static

Creates a new GuildReplyServerPacket with reply_code set to CreateAdd.

Parameters
datathe data associated with reply_code CreateAdd.
Returns
the created object.

◆ ForRecruiterOffline()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForRecruiterOffline ( )
static

Creates a new GuildReplyServerPacket with reply_code set to RecruiterOffline.

Returns
the created object.

◆ ForRecruiterNotHere()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForRecruiterNotHere ( )
static

Creates a new GuildReplyServerPacket with reply_code set to RecruiterNotHere.

Returns
the created object.

◆ ForRecruiterWrongGuild()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForRecruiterWrongGuild ( )
static

Creates a new GuildReplyServerPacket with reply_code set to RecruiterWrongGuild.

Returns
the created object.

◆ ForNotRecruiter()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForNotRecruiter ( )
static

Creates a new GuildReplyServerPacket with reply_code set to NotRecruiter.

Returns
the created object.

◆ ForJoinRequest()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForJoinRequest ( ReplyCodeDataJoinRequest data)
static

Creates a new GuildReplyServerPacket with reply_code set to JoinRequest.

Parameters
datathe data associated with reply_code JoinRequest.
Returns
the created object.

◆ ForNotPresent()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForNotPresent ( )
static

Creates a new GuildReplyServerPacket with reply_code set to NotPresent.

Returns
the created object.

◆ ForAccountLow()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForAccountLow ( )
static

Creates a new GuildReplyServerPacket with reply_code set to AccountLow.

Returns
the created object.

◆ ForAccepted()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForAccepted ( )
static

Creates a new GuildReplyServerPacket with reply_code set to Accepted.

Returns
the created object.

◆ ForNotFound()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForNotFound ( )
static

Creates a new GuildReplyServerPacket with reply_code set to NotFound.

Returns
the created object.

◆ ForUpdated()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForUpdated ( )
static

Creates a new GuildReplyServerPacket with reply_code set to Updated.

Returns
the created object.

◆ ForRanksUpdated()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForRanksUpdated ( )
static

Creates a new GuildReplyServerPacket with reply_code set to RanksUpdated.

Returns
the created object.

◆ ForRemoveLeader()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForRemoveLeader ( )
static

Creates a new GuildReplyServerPacket with reply_code set to RemoveLeader.

Returns
the created object.

◆ ForRemoveNotMember()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForRemoveNotMember ( )
static

Creates a new GuildReplyServerPacket with reply_code set to RemoveNotMember.

Returns
the created object.

◆ ForRemoved()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForRemoved ( )
static

Creates a new GuildReplyServerPacket with reply_code set to Removed.

Returns
the created object.

◆ ForRankingLeader()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForRankingLeader ( )
static

Creates a new GuildReplyServerPacket with reply_code set to RankingLeader.

Returns
the created object.

◆ ForRankingNotMember()

GuildReplyServerPacket eolib::protocol::net::server::GuildReplyServerPacket::ForRankingNotMember ( )
static

Creates a new GuildReplyServerPacket with reply_code set to RankingNotMember.

Returns
the created object.

◆ Family()

PacketFamily eolib::protocol::net::server::GuildReplyServerPacket::Family ( ) const
inlineoverridevirtualnoexcept

Gets the packet family associated with this packet.

Returns
the packet family.

Implements eolib::protocol::net::Packet.

◆ Action()

PacketAction eolib::protocol::net::server::GuildReplyServerPacket::Action ( ) const
inlineoverridevirtualnoexcept

Gets the packet action associated with this packet.

Returns
the packet action.

Implements eolib::protocol::net::Packet.

◆ ByteSize()

int eolib::protocol::net::server::GuildReplyServerPacket::ByteSize ( ) const
overridevirtualnoexcept

Gets the size of the data that this object was deserialized from.

Returns
the deserialized size in bytes, or 0 for an object that was not deserialized.

Implements eolib::protocol::Serializable.

◆ Serialize()

void eolib::protocol::net::server::GuildReplyServerPacket::Serialize ( data::EoWriter & writer) const
overridevirtual

Serializes this object to the provided writer.

Parameters
writerthe writer that the data will be written to.
Exceptions
SerializationErrorif the object's data is invalid for serialization.

Implements eolib::protocol::Serializable.

◆ Deserialize()

void eolib::protocol::net::server::GuildReplyServerPacket::Deserialize ( data::EoReader & reader)
overridevirtual

Deserializes this object from the provided reader, replacing its current data.

Parameters
readerthe reader that the data will be read from.

Implements eolib::protocol::Serializable.

◆ ToString()

std::string eolib::protocol::net::server::GuildReplyServerPacket::ToString ( ) const
overridevirtual

Gets a human-readable representation of this object, for debugging purposes.

Returns
the object's fields and values, as a string.

Implements eolib::protocol::Serializable.

◆ operator==()

bool eolib::protocol::net::server::GuildReplyServerPacket::operator== ( const GuildReplyServerPacket & other) const

Compares this object with another for equality.

The deserialized byte size is not compared.

Parameters
otherthe object to compare with.
Returns
true if all fields are equal, otherwise false.

◆ operator!=()

bool eolib::protocol::net::server::GuildReplyServerPacket::operator!= ( const GuildReplyServerPacket & other) const

Compares this object with another for inequality.

The deserialized byte size is not compared.

Parameters
otherthe object to compare with.
Returns
true if any field differs, otherwise false.

Member Data Documentation

◆ FAMILY

PacketFamily eolib::protocol::net::server::GuildReplyServerPacket::FAMILY = PacketFamily::Guild
staticconstexpr

The packet family associated with this packet.

◆ ACTION

PacketAction eolib::protocol::net::server::GuildReplyServerPacket::ACTION = PacketAction::Reply
staticconstexpr

The packet action associated with this packet.

◆ reply_code

GuildReply eolib::protocol::net::server::GuildReplyServerPacket::reply_code {}

◆ reply_code_data

ReplyCodeData eolib::protocol::net::server::GuildReplyServerPacket::reply_code_data {}

Data associated with the reply_code field.