unity.scopes.CompletionDetails

A container for details about the completion status of a query as well as any additional information regarding the operation of the request. More...

#include <unity/scopes/CompletionDetails.h>

Public Types

enum  CompletionStatus { OK, Cancelled, Error }
 Indicates the completion status for a query. More...
 

Public Member Functions

 CompletionDetails (CompletionStatus status)
 Create CompletionDetails with the given completion status. More...
 
 CompletionDetails (CompletionStatus status, std::string const &message)
 Create CompletionDetails with the given completion status and message. More...
 
CompletionStatus status () const noexcept
 Get the completion status. More...
 
std::string message () const
 Get the completion message string. More...
 
void add_info (OperationInfo const &info)
 Add additional operation info to the info list. More...
 
std::vector< OperationInfoinfo_list () const
 Get a list of all additional operation info. More...
 
Copy and assignment

Copy and assignment operators (move and non-move versions) have the usual value semantics.

 CompletionDetails (CompletionDetails const &other)
 
 CompletionDetails (CompletionDetails &&)
 
CompletionDetailsoperator= (CompletionDetails const &other)
 
CompletionDetailsoperator= (CompletionDetails &&)
 

Detailed Description

A container for details about the completion status of a query as well as any additional information regarding the operation of the request.

Member Enumeration Documentation

enum unity::scopes::CompletionDetails::CompletionStatus

Indicates the completion status for a query.

The Error enumerator indicates that a query terminated abnormally, for example, a scope could not be reached over the network or explicitly reported an error.

Constructor & Destructor Documentation

unity::scopes::CompletionDetails::CompletionDetails ( CompletionStatus  status)

Create CompletionDetails with the given completion status.

Parameters
statusIndicates the completion status of the query.
unity::scopes::CompletionDetails::CompletionDetails ( CompletionStatus  status,
std::string const &  message 
)

Create CompletionDetails with the given completion status and message.

Parameters
statusIndicates the completion status of the query.
messageContains further details about the completion status.

Member Function Documentation

void unity::scopes::CompletionDetails::add_info ( OperationInfo const &  info)

Add additional operation info to the info list.

Parameters
infoContains details about something of interest that occurs during the operation of a query.
std::vector< OperationInfo > unity::scopes::CompletionDetails::info_list ( ) const

Get a list of all additional operation info.

Returns
List containing additional information regarding the operation of the query.
std::string unity::scopes::CompletionDetails::message ( ) const

Get the completion message string.

Returns
The completion message string.
CompletionDetails::CompletionStatus unity::scopes::CompletionDetails::status ( ) const
noexcept

Get the completion status.

Returns
Enum indicating the completion status of the query.