CEL

Public API Reference

iPcWire Struct Reference

This is a wire property class. More...

#include <propclass/wire.h>

Inheritance diagram for iPcWire:

List of all members.

Public Member Functions

virtual void AddInput (const char *msg_mask, iMessageChannel *channel=0)=0
 Add a message to react too.
virtual size_t AddOutput (csStringID msgid, iMessageChannel *channel=0, iCelParameterBlock *extra_params=0)=0
 Add an output message.
virtual void MapParameter (size_t id, const char *source, const char *dest, iCelExpression *expression=0)=0
 Map a parameter from one name to another directly.
virtual void MapParameterExpression (size_t id, const char *dest, const char *expression)=0
 Map a parameter from one name to another directly.

Detailed Description

This is a wire property class.

A wire can connect two property classes. Basically a wire listens to a certain message on a channel and transforms it into another message (to possibly another channel).

This property class supports the following actions (add prefix 'cel.wire.action.' if you want to access this action through a message):

Definition at line 40 of file wire.h.


Member Function Documentation

virtual void iPcWire::AddInput ( const char *  msg_mask,
iMessageChannel channel = 0 
) [pure virtual]

Add a message to react too.

If the channel is not given then the message channel from the current entity will be used (the entity containing this property class). It is legal to call AddInput() multiple times. In that case the wire will react to multiple messages from possible multiple sources.

Parameters:
msg_mask is a mask which will be used to subscribe to the given message channel. It can be a fully qualified message name or something shorter in which case more messages will be catched by this.
virtual size_t iPcWire::AddOutput ( csStringID  msgid,
iMessageChannel channel = 0,
iCelParameterBlock extra_params = 0 
) [pure virtual]

Add an output message.

If the channel is not given then the message channel from the current entity will be used (the entity containing this property class). The resulting parameter block for the output message will be a combination of the parameter block from the input message overwritten by the parameters given here (if given). This function returns a unique identifier that you can use to give to the functions that affect the parameter modifications.

Parameters:
msgid is a fully qualified message id which will be used to send out.
virtual void iPcWire::MapParameter ( size_t  id,
const char *  source,
const char *  dest,
iCelExpression expression = 0 
) [pure virtual]

Map a parameter from one name to another directly.

With an optional expression the value can be modified.

Parameters:
id is the id as return by AddOutput() or AddOutputAction(). This function will affect the parameter as given to that specific output.
source is the optional name of the parameter in the source. This parameter is not used if you give an expression.
dest is the name of the parameter as it should become in the destination.
expression is an optional expression that can be used to modify the value in the destination. The expression will have access to the combined parameter block (parameters from original message as well as the extra parameters from the given output).
virtual void iPcWire::MapParameterExpression ( size_t  id,
const char *  dest,
const char *  expression 
) [pure virtual]

Map a parameter from one name to another directly.

This is a conveniance version that takes a string as an expression. In this version the expression is not optional.

Parameters:
id is the id as return by AddOutput() or AddOutputAction(). This function will affect the parameter as given to that specific output.
dest is the name of the parameter as it should become in the destination.
expression is the expression string.

The documentation for this struct was generated from the following file:

Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1