DayZ Enforce
Script API
Private Member Functions | Private Attributes | List of all members
MessageReceiverBase Class Reference

#include <MessageReceiverBase.h>

Inheritance diagram for MessageReceiverBase:
AgentBase AgentManager AgentPoolBase DisplayElement DisplayStatus ModifierBase ModifierPoolBase ModifiersManager NotifiersManager PlayerStats

Private Member Functions

void  MessageReceiverBase ()
 
void  OnReceive (int channel)
  This method is called when an object inheriting from this class subscribes to a channel, and an empty message is broadcast on that channel. More...
 
void  OnReceiveInt (int channel, int value)
 
void  OnReceiveFloat (int channel, float value)
 
void  OnReceiveString (int channel, string value)
 
void  OnReceiveParam (int channel, Param params)
  This method is called when an object inheriting from this class subscribes to a channel, and a message along with an object reference is broadcast on that channel, if the object was created just for the purpose of relaying information and is not referenced anywhere else, it should be deleted after processing inside this method. More...
 
void  Subscribe (int channel)
  Subscribes an object to listen to messages on channel provided in the 'channel' parameter, all channels are listed in Scripts\constants.h and start with the MSG_ prefix. More...
 
void  Broadcast (int channel)
  Broadcasts an empty message to all objects subscribed to a channel 'channel'. More...
 
void  BroadcastInt (int channel, int value)
 
void  BroadcastFloat (int channel, float value)
 
void  BroadcastString (int channel, string value)
 
void  BroadcastParam (int channel, Param params)
  Broadcasts a message with a param reference as a parameter to all objects subscribed to a channel 'channel'. More...
 
void  Unsubscribe (int channel)
 
void  UnsubscribeAll ()
 
void  Log (string message)
 

Private Attributes

ModuleMessageManager  m_ModuleMessageManager
 
string  m_System
 

Constructor & Destructor Documentation

void MessageReceiverBase::MessageReceiverBase ( )
private

Member Function Documentation

void MessageReceiverBase::OnReceive ( int  channel )
private

This method is called when an object inheriting from this class subscribes to a channel, and an empty message is broadcast on that channel.

Referenced by ModuleMessageManager::Broadcast().

void MessageReceiverBase::OnReceiveInt ( int  channel,
int  value 
)
private
void MessageReceiverBase::OnReceiveFloat ( int  channel,
float  value 
)
private
void MessageReceiverBase::OnReceiveString ( int  channel,
string  value 
)
private
void MessageReceiverBase::OnReceiveParam ( int  channel,
Param  params 
)
private

This method is called when an object inheriting from this class subscribes to a channel, and a message along with an object reference is broadcast on that channel, if the object was created just for the purpose of relaying information and is not referenced anywhere else, it should be deleted after processing inside this method.

void MessageReceiverBase::Subscribe ( int  channel )
private

Subscribes an object to listen to messages on channel provided in the 'channel' parameter, all channels are listed in Scripts\constants.h and start with the MSG_ prefix.

References m_ModuleMessageManager, and ModuleMessageManager::Subscribe().

Referenced by AgentPoolPlayer::AgentPoolPlayer(), DisplayStatus::DisplayStatus(), and Testing::Testing().

void MessageReceiverBase::Broadcast ( int  channel )
private

Broadcasts an empty message to all objects subscribed to a channel 'channel'.

References ModuleMessageManager::Broadcast(), and m_ModuleMessageManager.

Referenced by Testing::AttachCondition(), PlayerStats::OnRPC(), PlayerStats::SyncVars(), and NotifiersManager::TickNotifiers().

void MessageReceiverBase::BroadcastInt ( int  channel,
int  value 
)
private
void MessageReceiverBase::BroadcastFloat ( int  channel,
float  value 
)
private
void MessageReceiverBase::BroadcastString ( int  channel,
string  value 
)
private
void MessageReceiverBase::BroadcastParam ( int  channel,
Param  params 
)
private

Broadcasts a message with a param reference as a parameter to all objects subscribed to a channel 'channel'.

References ModuleMessageManager::BroadcastParam(), and m_ModuleMessageManager.

Referenced by Testing::AttachCondition().

void MessageReceiverBase::Unsubscribe ( int  channel )
private
void MessageReceiverBase::UnsubscribeAll ( )
private
void MessageReceiverBase::Log ( string  message )
private

Member Data Documentation

ModuleMessageManager MessageReceiverBase::m_ModuleMessageManager
private
string MessageReceiverBase::m_System
private

The documentation for this class was generated from the following files:
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)