Kanzi Connect  3.9.9
Kanzi Connect C++ API
kanzi::connect::ServiceArguments Class Reference

Startup arguments given for a server when it is started. More...

#include <service_arguments.hpp>

Public Member Functions

void addArgument (const string &argument)
 Add one argument. More...
 
void addArguments (const vector< string > &arguments)
 Add multiple arguments. More...
 
void clear ()
 Clears the argument vector contents. More...
 
size_t countArguments () const
 Retrieve amount of arguments. More...
 
const string getArgument (int index) const
 Retrieve argument at specific position. More...
 
const vector< string > & getArguments () const
 Retrieve arguments. More...
 
 ServiceArguments ()
 Construct the arguments class. More...
 
 ServiceArguments (const string argument)
 Construct the arguments class. More...
 
 ServiceArguments (const vector< string > &arguments)
 Construct the arguments class. More...
 

Static Public Member Functions

static ServiceArgumentsSharedPtr create ()
 Factory function to create instance of service arguments. More...
 
static ServiceArgumentsSharedPtr create (const string argument)
 Factory function to create instance of service arguments. More...
 
static ServiceArgumentsSharedPtr create (const vector< string > &arguments)
 Factory function to create instance of service arguments. More...
 

Detailed Description

Startup arguments given for a server when it is started.

Constructor & Destructor Documentation

◆ ServiceArguments() [1/3]

kanzi::connect::ServiceArguments::ServiceArguments ( )

Construct the arguments class.

◆ ServiceArguments() [2/3]

kanzi::connect::ServiceArguments::ServiceArguments ( const string  argument)

Construct the arguments class.

Parameters
argumentargument to initialize with.

◆ ServiceArguments() [3/3]

kanzi::connect::ServiceArguments::ServiceArguments ( const vector< string > &  arguments)

Construct the arguments class.

Parameters
argumentsarguments to initialize with.

Member Function Documentation

◆ addArgument()

void kanzi::connect::ServiceArguments::addArgument ( const string &  argument)

Add one argument.

Parameters
argumentthe argument

◆ addArguments()

void kanzi::connect::ServiceArguments::addArguments ( const vector< string > &  arguments)

Add multiple arguments.

Parameters
argumentsvector of arguments

◆ clear()

void kanzi::connect::ServiceArguments::clear ( )

Clears the argument vector contents.

◆ countArguments()

size_t kanzi::connect::ServiceArguments::countArguments ( ) const

Retrieve amount of arguments.

Returns
amount of arguments.

◆ create() [1/3]

static ServiceArgumentsSharedPtr kanzi::connect::ServiceArguments::create ( )
static

Factory function to create instance of service arguments.

Returns
newly allocated arguments object.

◆ create() [2/3]

static ServiceArgumentsSharedPtr kanzi::connect::ServiceArguments::create ( const string  argument)
static

Factory function to create instance of service arguments.

Parameters
argumenta string to initialize with
Returns
newly allocated arguments object.

◆ create() [3/3]

static ServiceArgumentsSharedPtr kanzi::connect::ServiceArguments::create ( const vector< string > &  arguments)
static

Factory function to create instance of service arguments.

Parameters
argumentslist of strings used to initialize the arguments
Returns
newly allocated arguments object.

◆ getArgument()

const string kanzi::connect::ServiceArguments::getArgument ( int  index) const

Retrieve argument at specific position.

Parameters
indexthe position of that argument
Returns
value of the argument.

◆ getArguments()

const vector<string>& kanzi::connect::ServiceArguments::getArguments ( ) const

Retrieve arguments.

Returns
vector of arguments

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