OperationInfo

A container for details about something of interest that occurs during the operation of a request. More...

#include <unity/scopes/OperationInfo.h>

Public Types

enum  InfoCode {
  Unknown, NoInternet, PoorInternet, NoLocationData,
  InaccurateLocationData, ResultsIncomplete, DefaultSettingsUsed, SettingsProblem,
  LastInfoCode_ = SettingsProblem
}
 Indicates the type of / cause for the information being reported. More...
 

Public Member Functions

 OperationInfo (InfoCode code)
 Create OperationInfo with the given info code. More...
 
 OperationInfo (InfoCode code, std::string message)
 Create OperationInfo with the given info code and message. More...
 
InfoCode code () const noexcept
 Get the info code. More...
 
std::string message () const
 Get the message string. More...
 
Copy and assignment

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

 OperationInfo (OperationInfo const &other)
 
 OperationInfo (OperationInfo &&)
 
OperationInfooperator= (OperationInfo const &other)
 
OperationInfooperator= (OperationInfo &&)
 

Detailed Description

A container for details about something of interest that occurs during the operation of a request.

Member Enumeration Documentation

Indicates the type of / cause for the information being reported.

For example, the NoInternet enumerator may indicate that access to the internet was required in order to properly evaluate a request, but no internet connectivity was available.

Constructor & Destructor Documentation

unity::scopes::OperationInfo::OperationInfo ( InfoCode  code)

Create OperationInfo with the given info code.

Parameters
codeIndicates the type of / cause for the information.
unity::scopes::OperationInfo::OperationInfo ( InfoCode  code,
std::string  message 
)

Create OperationInfo with the given info code and message.

Parameters
codeIndicates the type of / cause for the information.
messageContains further details about the info code.

Member Function Documentation

OperationInfo::InfoCode unity::scopes::OperationInfo::code ( ) const
noexcept

Get the info code.

Returns
Enum indicating the type of info contained.
std::string unity::scopes::OperationInfo::message ( ) const

Get the message string.

Returns
The message string.