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

#include <ModuleMessageManager.h>

Inheritance diagram for ModuleMessageManager:
ModuleBase

Private Member Functions

void  ModuleMessageManager ()
 
void  ~ModuleMessageManager ()
 
void  Broadcast (int index)
  Broadcasts an empty message on a channel provided in the 'index' parameter. More...
 
void  BroadcastInt (int index, int value)
  Broadcasts a message on a channel provided in the 'index' parameter, passes the Int variable. More...
 
void  BroadcastFloat (int index, float value)
 
void  BroadcastString (int index, string value)
 
void  BroadcastParam (int index, Param params)
  Broadcasts a message on a channel provided in the 'index' parameter, passes the Param type object to the reciever. More...
 
void  Subscribe (MessageReceiverBase receiver, int index)
  Subscribes an object to listen to messages on a channel provided in the 'index' parameter. More...
 
void  Unsubscribe (MessageReceiverBase receiver, int index)
 
void  UnsubscribeAll (MessageReceiverBase receiver)
 

Private Attributes

int  channelsUsed = 0
 
array< MessageReceiverBase channelList [NUM_OF_CHANNELS]
 

Detailed Description

Class ModuleMessageManager provides some basic Message Distribution mechanics, if you get instance of this module class on your object, you can use its methods to broadcast messages.

Constructor & Destructor Documentation

void ModuleMessageManager::ModuleMessageManager ( )
private

References channelList, and NUM_OF_CHANNELS.

void ModuleMessageManager::~ModuleMessageManager ( )
private

References channelList, and NUM_OF_CHANNELS.

Member Function Documentation

void ModuleMessageManager::Broadcast ( int  index )
private

Broadcasts an empty message on a channel provided in the 'index' parameter.

References channelList, and MessageReceiverBase::OnReceive().

Referenced by MessageReceiverBase::Broadcast().

void ModuleMessageManager::BroadcastInt ( int  index,
int  value 
)
private

Broadcasts a message on a channel provided in the 'index' parameter, passes the Int variable.

References channelList, and MessageReceiverBase::OnReceiveInt().

Referenced by MessageReceiverBase::BroadcastInt().

void ModuleMessageManager::BroadcastFloat ( int  index,
float  value 
)
private
void ModuleMessageManager::BroadcastString ( int  index,
string  value 
)
private
void ModuleMessageManager::BroadcastParam ( int  index,
Param  params 
)
private

Broadcasts a message on a channel provided in the 'index' parameter, passes the Param type object to the reciever.

References channelList.

Referenced by MessageReceiverBase::BroadcastParam().

void ModuleMessageManager::Subscribe ( MessageReceiverBase  receiver,
int  index 
)
private

Subscribes an object to listen to messages on a channel provided in the 'index' parameter.

References channelList, and channelsUsed.

Referenced by MessageReceiverBase::Subscribe().

void ModuleMessageManager::Unsubscribe ( MessageReceiverBase  receiver,
int  index 
)
private

References channelList.

Referenced by MessageReceiverBase::Unsubscribe().

void ModuleMessageManager::UnsubscribeAll ( MessageReceiverBase  receiver )
private

Member Data Documentation

int ModuleMessageManager::channelsUsed = 0
private

Referenced by Subscribe(), and UnsubscribeAll().

array<MessageReceiverBase> ModuleMessageManager::channelList[NUM_OF_CHANNELS]
private

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