Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
ModChannel Class Reference

#include <modchannels.h>

+ Collaboration diagram for ModChannel:

Public Member Functions

 ModChannel (const std::string &name)
 
 ~ModChannel ()=default
 
const std::string & getName () const
 
bool registerConsumer (session_t peer_id)
 
bool removeConsumer (session_t peer_id)
 
const std::vector< u16 > & getChannelPeers () const
 
bool canWrite () const
 
void setState (ModChannelState state)
 

Private Attributes

std::string m_name
 
ModChannelState m_state = MODCHANNEL_STATE_INIT
 
std::vector< u16 > m_client_consumers
 

Constructor & Destructor Documentation

◆ ModChannel()

ModChannel::ModChannel ( const std::string & name)
inline

◆ ~ModChannel()

ModChannel::~ModChannel ( )
default

Member Function Documentation

◆ canWrite()

bool ModChannel::canWrite ( ) const

References m_state, and MODCHANNEL_STATE_READ_WRITE.

Referenced by ModChannelRef::l_is_writeable(), and ModChannelRef::l_send_all().

+ Here is the caller graph for this function:

◆ getChannelPeers()

const std::vector< u16 > & ModChannel::getChannelPeers ( ) const
inline

References m_client_consumers.

◆ getName()

const std::string & ModChannel::getName ( ) const
inline

References m_name.

Referenced by ModChannelRef::l_send_all().

+ Here is the caller graph for this function:

◆ registerConsumer()

bool ModChannel::registerConsumer ( session_t peer_id)

References CONTAINS, and m_client_consumers.

◆ removeConsumer()

bool ModChannel::removeConsumer ( session_t peer_id)

References m_client_consumers, and p().

+ Here is the call graph for this function:

◆ setState()

void ModChannel::setState ( ModChannelState state)

References m_state, and MODCHANNEL_STATE_INIT.

Member Data Documentation

◆ m_client_consumers

std::vector<u16> ModChannel::m_client_consumers
private

◆ m_name

std::string ModChannel::m_name
private

Referenced by getName().

◆ m_state

ModChannelState ModChannel::m_state = MODCHANNEL_STATE_INIT
private

Referenced by canWrite(), and setState().


The documentation for this class was generated from the following files: