![]() |
||
|
Creating an agent object in C++ with 5 dispatcher threads instead of default one can be achieved with the following code:
#include <yami.h>
using namespace yami;
using namespace yami::option_names;
// ...
{
parameters options;
options.set_integer(dispatcher_threads, 5);
agent my_agent(options);
// ...
}
The yami::option_names namespace defines convenient string constants for all available configuration options.
Any subset of options can be used in a single parameters object and those options which are not provided are considered to have their default values.
No parameters object needs to be provided if all-default setup is intended, as shown in the following example:
#include <yami.h>
using namespace yami;
// ...
{
agent my_agent;
// ...
}