minister

See the User’s Guide for more discussion.


enum administer_result_t

minister

public, type

This enumeration is used as the return code from your implementation of administer_message to communicate the effect back to the traversal loop of the message_parliament.

The basic values are:

NotHandled
Return this value if this call did not handle the message. Basically, that means that the message_parliament should keep looking.
Handled
Return this value if this call did handle the message. This means that the message_parliament will not continue calling on ministers to find one that can handle it. But it will invoke ministers that have the Always flag set in the schedule member of their commissions, which indicates that it wants to be called even if the message was already handled.

In order to provide the possibility of more intelligent cacheing in the future, and to provide more context to the state.status parameter in subsequent calls to administer_message there are some more advanced values that may be used:

NeverHandles
Return this value if this handler will never handle this specific message code. Return this value when called with a message ID number that is out of range or otherwise ignored. This tells the message_parliament that it may skip this call in the future.
PostProcessed
Return this value if the message was already handled prior to this call and this call did some more work.
PreProcessed
Return this value if this handler was inserted early into the schedule and did something due to being called, but did not actually handle the message. It expects a subsequent call to handle the message.

enum traversal

minister

public, type

This enumeration contains values that may be “thrown” by code within the minister to affect the traversal loop of the message_parliament.

Cancel
Throwing this will cause the traversal loop to stop. That is, it will not continue checking subsequent commissions, and will not change the handled status.
Restart
Throwing this will cause the entire traversal loop to start again from the top with the same message, seeing any updates to the commission list.