|
| RaiseEventOptions (nByte channelID=0, nByte eventCaching=Lite::EventCache::DO_NOT_CACHE, const int *targetPlayers=NULL, short numTargetPlayers=0, nByte receiverGroup=Lite::ReceiverGroup::OTHERS, nByte interestGroup=0, const WebFlags &webFlags=WebFlags(), int cacheSliceIndex=0) |
|
| ~RaiseEventOptions (void) |
|
| RaiseEventOptions (const RaiseEventOptions &toCopy) |
|
RaiseEventOptions & | operator= (const RaiseEventOptions &toCopy) |
|
nByte | getChannelID (void) const |
|
RaiseEventOptions & | setChannelID (nByte channelID) |
|
nByte | getEventCaching (void) const |
|
RaiseEventOptions & | setEventCaching (nByte eventCaching) |
|
const int * | getTargetPlayers (void) const |
|
short | getNumTargetPlayers (void) const |
|
RaiseEventOptions & | setTargetPlayers (const int *targetPlayers, short numTargetPlayers) |
|
nByte | getReceiverGroup (void) const |
|
RaiseEventOptions & | setReceiverGroup (nByte receiverGroup) |
|
nByte | getInterestGroup (void) const |
|
RaiseEventOptions & | setInterestGroup (nByte interestGroup) |
|
const WebFlags & | getWebFlags (void) const |
|
RaiseEventOptions & | setWebFlags (const WebFlags &webFlags) |
|
int | getCacheSliceIndex (void) const |
|
RaiseEventOptions & | setCacheSliceIndex (int cacheSliceIndex) |
|
virtual Common::JString & | toString (Common::JString &retStr, bool withTypes=false) const |
|
virtual JString & | toString (JString &retStr, bool withTypes=false) const=0 |
|
JString | toString (bool withTypes=false) const |
|
virtual | ~ToString (void) |
|
virtual JString | typeToString (void) const |
|
JString | toString (bool withTypes=false) const |
|
This class aggregates the various optional parameters that can be passed to Client::opRaiseEvent().
- See also
- Client::opRaiseEvent()
◆ RaiseEventOptions() [1/2]
RaiseEventOptions |
( |
nByte |
channelID = 0 , |
|
|
nByte |
eventCaching = Lite::EventCache::DO_NOT_CACHE , |
|
|
const int * |
targetPlayers = NULL , |
|
|
short |
numTargetPlayers = 0 , |
|
|
nByte |
receiverGroup = Lite::ReceiverGroup::OTHERS , |
|
|
nByte |
interestGroup = 0 , |
|
|
const WebFlags & |
webFlags = WebFlags() , |
|
|
int |
cacheSliceIndex = 0 |
|
) |
| |
Constructor: Creates a new instance with the specified parameters.
- Parameters
-
◆ ~RaiseEventOptions()
◆ RaiseEventOptions() [2/2]
Copy-Constructor: Creates a new instance that is a deep copy of the argument instance.
- Parameters
-
toCopy | The instance to copy. |
◆ operator=()
operator=.
Makes a deep copy of its right operand into its left operand.
This overwrites old data in the left operand.
◆ getChannelID()
nByte getChannelID |
( |
void |
| ) |
const |
◆ setChannelID()
Sets the channel ID.
Please see Fragmentation and Channels for further information.
- Parameters
-
- Returns
- a reference to the instance on which it was called to allow for chaining multiple setter calls
- See also
- getChannelID()
◆ getEventCaching()
nByte getEventCaching |
( |
void |
| ) |
const |
◆ setEventCaching()
Sets the event caching option.
This option defines if the server should simply send the event, put it in the cache, remove events that are like this one or if the Cache Slice should be modified. Leave this to the default value of DO_NOT_CACHE to not use the EventCache at all.
For a more in-depth description about event caching please see Cached Events
- Note
- The value that you set for this option gets ignored if any of the following statements is true:
-
getReceiverGroup() == ReceiverGroup::MASTER_CLIENT
-
getTargetPlayers() != NULL
-
getInterestGroup() != 0
- Parameters
-
- Returns
- a reference to the instance on which it was called to allow for chaining multiple setter calls
- See also
- getEventCaching(), Cached Events
◆ getTargetPlayers()
const int * getTargetPlayers |
( |
void |
| ) |
const |
◆ getNumTargetPlayers()
short getNumTargetPlayers |
( |
void |
| ) |
const |
◆ setTargetPlayers()
RaiseEventOptions & setTargetPlayers |
( |
const int * |
targetPlayers, |
|
|
short |
numTargetPlayers |
|
) |
| |
Sets the target players.
Set this to the player numbers of the clients, which should receive the event. The default value when not setting anything is NULL and equivalent to an array that consists of the player numbers of all clients inside the room except for the sending client itself. Player Numbers that do not correspond to any active player inside the room will get ignored by the server.
- Note
- If you set this option to anything else than NULL, then any value that might have been passed for setEventCaching() will be ignored.
-
The options setTargetPlayers(), setInterestGroup() and setReceiverGroup() provide alternative ways of specifying the receivers of an event and can not be combined with each other.
-
If getTargetPlayers() evaluates to !NULL, then the value for the target players gets used and the values for the other 2 options get ignored.
-
Otherwise, if getInterestGroup() evaluates to !0, then the value for the interest group gets used and the value for the receiver group gets ignored.
-
Else the value for the receiver group gets used.
- Parameters
-
targetPlayers | either NULL (to reset the value of the option to the default) or an array of integer values that correspond to the player numbers of the intended receivers |
numTargetPlayers | the element count of the array that is passed for targetPlayers |
- Returns
- a reference to the instance on which it was called to allow for chaining multiple setter calls
- See also
- getTargetPlayers(), getNumTargetPlayers()
◆ getReceiverGroup()
nByte getReceiverGroup |
( |
void |
| ) |
const |
◆ setReceiverGroup()
Sets the receiver group.
Set this to one of the values from Lite::ReceiverGroup. The default value when not setting anything is Lite::ReceiverGroup::OTHERS.
- Note
- If you set this option to Lite::ReceiverGroup::MASTER_CLIENT, then any value that might have been passed for setEventCaching() will be ignored.
-
The options setTargetPlayers(), setInterestGroup() and setReceiverGroup() provide alternative ways of specifying the receivers of an event and can not be combined with each other.
-
If getTargetPlayers() evaluates to !NULL, then the value for the target players gets used and the values for the other 2 options get ignored.
-
Otherwise, if getInterestGroup() evaluates to !0, then the value for the interest group gets used and the value for the receiver group gets ignored.
-
Else the value for the receiver group gets used.
- Parameters
-
- Returns
- a reference to the instance on which it was called to allow for chaining multiple setter calls
- See also
- getReceiverGroup()
◆ getInterestGroup()
nByte getInterestGroup |
( |
void |
| ) |
const |
◆ setInterestGroup()
Sets the interest group.
Set this to a value between 0 and 255. The default value when not setting anything is 0. More information about interest groups can be found at Interest Groups.
- Note
- If you set this option to anything else than 0, then any value that might have been passed for setEventCaching() will be ignored.
-
The options setTargetPlayers(), setInterestGroup() and setReceiverGroup() provide alternative ways of specifying the receivers of an event and can not be combined with each other.
-
If getTargetPlayers() evaluates to !NULL, then the value for the target players gets used and the values for the other 2 options get ignored.
-
Otherwise, if getInterestGroup() evaluates to !0, then the value for the interest group gets used and the value for the receiver group gets ignored.
-
Else the value for the receiver group gets used.
- Parameters
-
interestGroup | the number of the interest group to which the event should be sent |
- Returns
- a reference to the instance on which it was called to allow for chaining multiple setter calls
- See also
- getInterestGroup(), Interest Groups
◆ getWebFlags()
const WebFlags & getWebFlags |
( |
void |
| ) |
const |
◆ setWebFlags()
Sets the web flags options.
For more information see class WebFlags.
- Parameters
-
- Returns
- a reference to the instance on which it was called to allow for chaining multiple setter calls
- See also
- getWebFlags(), WebFlags
◆ getCacheSliceIndex()
int getCacheSliceIndex |
( |
void |
| ) |
const |
◆ setCacheSliceIndex()
Sets the index of the cache slice that should be used in conjunction with the value that you have passed to setEventCaching().
When you pass one of the options SLICE_SET_INDEX, SLICE_PURGE_INDEX or SLICE_PURGE_UP_TO_INDEX to setEventCaching(), then you also need to provide the cache slice index for that option to setCacheSliceIndex().
- Parameters
-
cacheSliceIndex | the index of the cache slice to which the event should be added |
- Returns
- a reference to the instance on which it was called to allow for chaining multiple setter calls
- See also
- getCacheSliceIndex(), setEventCaching(), Cached Events
◆ toString() [1/3]
- Parameters
-
retStr | reference to a string, to store the return-value in; the information, which is generated by this function, will be attached at the end of any eventually existing previous content of the string |
withTypes | set to true, to include type information in the generated string |
- Returns
- a JString representation of the instance and its contents for debugging purposes.
Implements ToString.
◆ toString() [2/3]
- Parameters
-
retStr | reference to a string, to store the return-value in; the information, which is generated by this function, will be attached at the end of any eventually existing previous content of the string |
withTypes | set to true, to include type information in the generated string |
- Returns
- a JString representation of the instance and its contents for debugging purposes.
◆ toString() [3/3]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
withTypes | set to true, to include type information in the generated string |
- Returns
- a JString representation of the instance and its contents for debugging purposes.
- See also
- JString