A class for retrieving the result of some operation. More...

#include "murl_result.h"

Public Member Functions

 Result ()=default
 The default constructor.
 
void Clear ()
 Clear the result (Set OK).
 
void Set (const Result &other)
 Set a result from a given other result. More...
 
void Append (const Result &other)
 Append a given other result. More...
 
void Set (IEnums::ResultCode code, const Char *message,...)
 Set a result code and message. More...
 
void Append (IEnums::ResultCode code, const Char *message,...)
 Append a result code and message. More...
 
Bool IsClear () const
 Check if the contained result is OK. More...
 
Bool HasInfo () const
 Check if the result contains at least one info. More...
 
UInt32 GetNumberOfInfos () const
 Get the number of infos. More...
 
IEnums::ResultCode GetInfoCode (UInt32 index) const
 Get the code of a info at a given index. More...
 
const StringGetInfoMessage (UInt32 index) const
 Get the message of a info at a given index. More...
 
String GetAllInfoMessages () const
 Get all info messages. More...
 
Bool HasWarning () const
 Check if the result contains at least one warning. More...
 
UInt32 GetNumberOfWarnings () const
 Get the number of warnings. More...
 
IEnums::ResultCode GetWarningCode (UInt32 index) const
 Get the code of a warning at a given index. More...
 
const StringGetWarningMessage (UInt32 index) const
 Get the message of a warning at a given index. More...
 
String GetAllWarningMessages () const
 Get all warning messages. More...
 
Bool HasError () const
 Check if the result contains at least one error. More...
 
UInt32 GetNumberOfErrors () const
 Get the number of errors. More...
 
IEnums::ResultCode GetErrorCode (UInt32 index) const
 Get the code of a error at a given index. More...
 
const StringGetErrorMessage (UInt32 index) const
 Get the message of a error at a given index. More...
 
String GetAllErrorMessages () const
 Get all error messages. More...
 
String GetAllMessages () const
 Get all messages. More...
 

Detailed Description

A class for retrieving the result of some operation.

Member Function Documentation

◆ Set() [1/2]

void Murl::Result::Set ( const Result other)

Set a result from a given other result.

Parameters
otherThe result object to copy from.

◆ Append() [1/2]

void Murl::Result::Append ( const Result other)

Append a given other result.

Parameters
otherThe result object to copy from.

Referenced by Murl::IAttributes::GetEnumBitsToSetByIndex(), Murl::IAttributes::GetEnumValueByIndex(), and Murl::IAttributes::GetEnumValuesByIndex().

◆ Set() [2/2]

void Murl::Result::Set ( IEnums::ResultCode  code,
const Char message,
  ... 
)

Set a result code and message.

This clears the current result and sets a single message only.

Parameters
codeThe result code.
messageThe message.
...print style parameters

◆ Append() [2/2]

void Murl::Result::Append ( IEnums::ResultCode  code,
const Char message,
  ... 
)

Append a result code and message.

Parameters
codeThe result code.
messageThe message.
...print style parameters

◆ IsClear()

Bool Murl::Result::IsClear ( ) const

Check if the contained result is OK.

Returns
true if OK.

◆ HasInfo()

Bool Murl::Result::HasInfo ( ) const

Check if the result contains at least one info.

Returns
true if error.

◆ GetNumberOfInfos()

UInt32 Murl::Result::GetNumberOfInfos ( ) const

Get the number of infos.

Returns
The number of infos.

◆ GetInfoCode()

IEnums::ResultCode Murl::Result::GetInfoCode ( UInt32  index) const

Get the code of a info at a given index.

Parameters
indexThe info index, in the range [0..GetNumberOfInfos()-1].
Returns
The result code.

◆ GetInfoMessage()

const String& Murl::Result::GetInfoMessage ( UInt32  index) const

Get the message of a info at a given index.

Parameters
indexThe info index, in the range [0..GetNumberOfInfos()-1].
Returns
The message.

◆ GetAllInfoMessages()

String Murl::Result::GetAllInfoMessages ( ) const

Get all info messages.

This method concatenates all existing infos to one string, each one delimited by a single line feed character.

Returns
The concatenated info messages.

◆ HasWarning()

Bool Murl::Result::HasWarning ( ) const

Check if the result contains at least one warning.

Returns
true if error.

◆ GetNumberOfWarnings()

UInt32 Murl::Result::GetNumberOfWarnings ( ) const

Get the number of warnings.

Returns
The number of warnings.

◆ GetWarningCode()

IEnums::ResultCode Murl::Result::GetWarningCode ( UInt32  index) const

Get the code of a warning at a given index.

Parameters
indexThe warning index, in the range [0..GetNumberOfWarnings()-1].
Returns
The result code.

◆ GetWarningMessage()

const String& Murl::Result::GetWarningMessage ( UInt32  index) const

Get the message of a warning at a given index.

Parameters
indexThe warning index, in the range [0..GetNumberOfWarnings()-1].
Returns
The message.

◆ GetAllWarningMessages()

String Murl::Result::GetAllWarningMessages ( ) const

Get all warning messages.

This method concatenates all existing warnings to one string, each one delimited by a single line feed character.

Returns
The concatenated warning messages.

◆ HasError()

Bool Murl::Result::HasError ( ) const

Check if the result contains at least one error.

Returns
true if error.

◆ GetNumberOfErrors()

UInt32 Murl::Result::GetNumberOfErrors ( ) const

Get the number of errors.

Returns
The number of errors.

◆ GetErrorCode()

IEnums::ResultCode Murl::Result::GetErrorCode ( UInt32  index) const

Get the code of a error at a given index.

Parameters
indexThe error index, in the range [0..GetNumberOfErrors()-1].
Returns
The result code.

◆ GetErrorMessage()

const String& Murl::Result::GetErrorMessage ( UInt32  index) const

Get the message of a error at a given index.

Parameters
indexThe error index, in the range [0..GetNumberOfErrors()-1].
Returns
The message.

◆ GetAllErrorMessages()

String Murl::Result::GetAllErrorMessages ( ) const

Get all error messages.

This method concatenates all existing errors to one string, each one delimited by a single line feed character.

Returns
The concatenated error messages.

◆ GetAllMessages()

String Murl::Result::GetAllMessages ( ) const

Get all messages.

This method concatenates all existing errors, warnings and infos to one string, each one delimited by a single line feed character.

Returns
The concatenated messages.

The documentation for this class was generated from the following file:
  • murl_result.h


Copyright © 2011-2022 Spraylight GmbH.