Vowpal Wabbit
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions
VW::experimental Namespace Reference

Namespaces

namespace  error_code
 

Classes

class  api_status
 Report status of all API calls. More...
 
class  status_builder
 Helper class used in report_error template funcstions to return status from API calls. More...
 

Typedefs

using i_trace = void
 

Functions

template<typename Last >
void report_error (std::ostringstream &os, const Last &last)
 Ends recursion of report_error variadic template with the Last argument. More...
 
template<typename First , typename... Rest>
void report_error (std::ostringstream &os, const First &first, const Rest &... rest)
 Begins recursion of report_error variadic template with ostringstream to serialize error information. More...
 
template<typename... All>
int report_error (api_status *status, int scode, const All &... all)
 The main report_error template used to serialize error into api_status The method most end users will use with a status code and a number of objects to be serialised into an api_status. More...
 
template<typename T >
VW::experimental::status_builderoperator<< (VW::experimental::status_builder &sb, const T &val)
 left shift operator to serialize types into stringstream held in status_builder More...
 
int report_error (status_builder &sb)
 Terminates recursion of report_error. More...
 
template<typename Last >
int report_error (status_builder &sb, const Last &last)
 report_error that takes the final paramter More...
 
template<typename First , typename... Rest>
int report_error (status_builder &sb, const First &first, const Rest &... rest)
 variadic template report_error that takes a list of parameters More...
 

Typedef Documentation

◆ i_trace

using VW::experimental::i_trace = typedef void

Function Documentation

◆ operator<<()

template<typename T >
VW::experimental::status_builder & VW::experimental::operator<< ( VW::experimental::status_builder sb,
const T &  val 
)

left shift operator to serialize types into stringstream held in status_builder

Template Parameters
TType to serialize
Parameters
sbStatus builder that holds serialized error message
valError code
Returns
reinforcement_learning::status_builder& Passed in status builder so left shift operators can be chained together.

◆ report_error() [1/6]

template<typename... All>
int VW::experimental::report_error ( api_status status,
int  scode,
const All &...  all 
)

The main report_error template used to serialize error into api_status The method most end users will use with a status code and a number of objects to be serialised into an api_status.

Template Parameters
AllAll the type arguments to the variadic template
Parameters
statusStatus object to serialize error description into
scodeError code
allParameter list argument for the variadic template
Returns
int Error code that was passed in

◆ report_error() [2/6]

int VW::experimental::report_error ( status_builder sb)
inline

Terminates recursion of report_error.

Parameters
sbstatus_builder that contains the serialized error string
Returns
int Error status

◆ report_error() [3/6]

template<typename First , typename... Rest>
int VW::experimental::report_error ( status_builder sb,
const First &  first,
const Rest &...  rest 
)

variadic template report_error that takes a list of parameters

Template Parameters
FirstType of first parameter in parameter list
RestTail parameter types in paramter list
Parameters
sbstatus_builder that contains the serialized error string
firstFirst parameter value
restTail paramter value list
Returns
int Error status

◆ report_error() [4/6]

template<typename Last >
int VW::experimental::report_error ( status_builder sb,
const Last &  last 
)

report_error that takes the final paramter

Template Parameters
LastFinal paramter type
Parameters
sbstatus_builder that contains the serialized error string
lastFinal parameter value
Returns
int Error status

◆ report_error() [5/6]

template<typename First , typename... Rest>
void VW::experimental::report_error ( std::ostringstream &  os,
const First &  first,
const Rest &...  rest 
)

Begins recursion of report_error variadic template with ostringstream to serialize error information.

Template Parameters
FirstType of first parameter to report_error
RestRest of the parameter type list
Parameters
osostringstream that contains serialized error data
firstvalue of the first parameter to report_error
restrest of the values to report error

◆ report_error() [6/6]

template<typename Last >
void VW::experimental::report_error ( std::ostringstream &  os,
const Last &  last 
)

Ends recursion of report_error variadic template with the Last argument.

Template Parameters
Lasttype of Last argument to report_error
Parameters
osostringstream that contains serialized error data
lastvalue of last argument to report_error