|
OpenAnima 0.2.0
Middleware for conversational NPCs that interact with the player, the world and each other
|
#include <IProvider.h>
Public Attributes | |
| DeltaSink | onDelta |
| std::function< bool()> | keepGoing |
| Core::ResponseFormat | format |
One call to a provider: what is asked for, where the pieces go, and how to abandon it.
The three live together because a caller that paints an answer as it arrives is also the caller that wants to be able to stop it half way, and because a second callback in the argument list is a pair easy to hand over in the wrong order.
| Core::ResponseFormat OpenAnima::Provider::Call::format |
Shape the answer is asked for in. Text by default, which is what a caller that says nothing gets, and a shape a provider cannot enforce is still worth asking for: what arrives is checked against it either way.
| std::function<bool()> OpenAnima::Provider::Call::keepGoing |
Asks whether the call should still be going.
Asked on the client library's own timer, so it fires even while no data arrives: without it a caller could not abandon a stream that went quiet. An empty check never abandons the call.
| DeltaSink OpenAnima::Provider::Call::onDelta |
Called with every piece of the answer as it arrives, in order. An empty sink asks for the answer in one response.