C4 Engine
C4 Engine API Documentation

class DistributionController

Defined in:  C4Controller.h
The DistributionController class acts as a special intermediary that distributes messages to controllers belonging to subnodes or connected nodes.

class DistributionController final : public Controller


DistributionController(uint32 flags);

flags The distribution flags. See below for possible values.
The DistributionController class can be assigned to a node to make it act as an intermediary through which controller messages are passed to subnodes, connected nodes, or both. Messages can optionally be received and processed by the distribution controller itself. The flags parameter determines which sets of nodes receive messages that are initially sent to the distribution controller, and its value can be a combination (through logical OR) of the following constants.
kDistributionSelf Distribute messages to the target node itself.
kDistributionSubnodes Distribute messages to all immediate subnodes of the target node.
kDistributionConnectors Distribute messages to all nodes linked through connectors belonging to the target node.
When a distribution controller is activated or deactivated, controllers assigned to subnodes and/or connected nodes are also activated or deactivated according to the distribution flags.
Base Classes
Controller A DistributionController is a specific type of controller.