eolib-cpp 0.1.0-beta.7
Core C++ library for writing Endless Online applications
Loading...
Searching...
No Matches
eolib::protocol Namespace Reference

Types generated from the eo-protocol specification. More...

Namespaces

namespace  net
 Types shared by client and server packets.
namespace  pub
 Client pub files: items (eolib::protocol::pub::Eif), NPCs (eolib::protocol::pub::Enf), spells (eolib::protocol::pub::Esf) and classes (eolib::protocol::pub::Ecf), and the records and enums they use.
namespace  map
 Endless Map Files (eolib::protocol::map::Emf), and the structs and enums they use.

Classes

class  Coords
 Map coordinates. More...
class  Serializable
 An object that can be serialized to and deserialized from EO data. More...

Enumerations

enum class  AdminLevel : int {
  Player = 0 , Spy = 1 , LightGuide = 2 , Guardian = 3 ,
  GameMaster = 4 , HighGameMaster = 5
}
 The admin level of a player. More...
enum class  Direction : int { Down = 0 , Left = 1 , Up = 2 , Right = 3 }
 The direction a player or NPC is facing. More...
enum class  Emote : int {
  Happy = 1 , Depressed = 2 , Sad = 3 , Angry = 4 ,
  Confused = 5 , Surprised = 6 , Hearts = 7 , Moon = 8 ,
  Suicidal = 9 , Embarrassed = 10 , Drunk = 11 , Trade = 12 ,
  LevelUp = 13 , Playful = 14 , Bard = 15
}
 Emote that can be played over a player's head. More...
enum class  Gender : int { Female = 0 , Male = 1 }
 The gender of a player. More...

Functions

std::ostream & operator<< (std::ostream &stream, const Serializable &value)
 Writes a human-readable representation of an object to a stream, for debugging purposes.
std::string ToString (AdminLevel value)
 Gets the name of a AdminLevel value.
std::ostream & operator<< (std::ostream &stream, AdminLevel value)
 Writes the name of a AdminLevel value to a stream.
std::string ToString (Direction value)
 Gets the name of a Direction value.
std::ostream & operator<< (std::ostream &stream, Direction value)
 Writes the name of a Direction value to a stream.
std::string ToString (Emote value)
 Gets the name of a Emote value.
std::ostream & operator<< (std::ostream &stream, Emote value)
 Writes the name of a Emote value to a stream.
std::string ToString (Gender value)
 Gets the name of a Gender value.
std::ostream & operator<< (std::ostream &stream, Gender value)
 Writes the name of a Gender value to a stream.

Detailed Description

Types generated from the eo-protocol specification.

This namespace holds the types shared by the whole protocol, such as eolib::protocol::Coords and eolib::protocol::Direction, and the eolib::protocol::Serializable interface implemented by every generated struct and packet. The nested namespaces follow the layout of the protocol XML files.

Enumeration Type Documentation

◆ AdminLevel

enum class eolib::protocol::AdminLevel : int
strong

The admin level of a player.

Enumerator
Player 
Spy 
LightGuide 
Guardian 
GameMaster 
HighGameMaster 

◆ Direction

enum class eolib::protocol::Direction : int
strong

The direction a player or NPC is facing.

Enumerator
Down 
Left 
Up 
Right 

◆ Emote

enum class eolib::protocol::Emote : int
strong

Emote that can be played over a player's head.

Enumerator
Happy 
Depressed 
Sad 
Angry 
Confused 
Surprised 
Hearts 
Moon 
Suicidal 
Embarrassed 
Drunk 
Trade 
LevelUp 
Playful 
Bard 

◆ Gender

enum class eolib::protocol::Gender : int
strong

The gender of a player.

Enumerator
Female 
Male 

Function Documentation

◆ operator<<() [1/5]

std::ostream & eolib::protocol::operator<< ( std::ostream & stream,
const Serializable & value )

Writes a human-readable representation of an object to a stream, for debugging purposes.

Parameters
streamthe stream to write to.
valuethe object to write.
Returns
the stream.
See also
Serializable::ToString

◆ ToString() [1/4]

std::string eolib::protocol::ToString ( AdminLevel value)

Gets the name of a AdminLevel value.

Parameters
valuethe value to get the name of.
Returns
the name of the value, or "Unrecognized(N)" for unrecognized values.

◆ operator<<() [2/5]

std::ostream & eolib::protocol::operator<< ( std::ostream & stream,
AdminLevel value )

Writes the name of a AdminLevel value to a stream.

Parameters
streamthe stream to write to.
valuethe value to write the name of.
Returns
the stream.
See also
ToString(AdminLevel)

◆ ToString() [2/4]

std::string eolib::protocol::ToString ( Direction value)

Gets the name of a Direction value.

Parameters
valuethe value to get the name of.
Returns
the name of the value, or "Unrecognized(N)" for unrecognized values.

◆ operator<<() [3/5]

std::ostream & eolib::protocol::operator<< ( std::ostream & stream,
Direction value )

Writes the name of a Direction value to a stream.

Parameters
streamthe stream to write to.
valuethe value to write the name of.
Returns
the stream.
See also
ToString(Direction)

◆ ToString() [3/4]

std::string eolib::protocol::ToString ( Emote value)

Gets the name of a Emote value.

Parameters
valuethe value to get the name of.
Returns
the name of the value, or "Unrecognized(N)" for unrecognized values.

◆ operator<<() [4/5]

std::ostream & eolib::protocol::operator<< ( std::ostream & stream,
Emote value )

Writes the name of a Emote value to a stream.

Parameters
streamthe stream to write to.
valuethe value to write the name of.
Returns
the stream.
See also
ToString(Emote)

◆ ToString() [4/4]

std::string eolib::protocol::ToString ( Gender value)

Gets the name of a Gender value.

Parameters
valuethe value to get the name of.
Returns
the name of the value, or "Unrecognized(N)" for unrecognized values.

◆ operator<<() [5/5]

std::ostream & eolib::protocol::operator<< ( std::ostream & stream,
Gender value )

Writes the name of a Gender value to a stream.

Parameters
streamthe stream to write to.
valuethe value to write the name of.
Returns
the stream.
See also
ToString(Gender)