dca_interface  6.3.4
dca::FunctionResult Class Reference

#include <base_classes.h>

Inheritance diagram for dca::FunctionResult:

Detailed Description

Standard function result.

This class encapsulates the result of a function call and provides a common behavior similar to a simple return code of type boolean. Functions that return a FunctionResult do never throw a DCA exception.

See also
ExDca, DCA Generic Error Codes, DCA Error Handling

Definition at line 147 of file base_classes.h.

Public Member Functions

void setReturnCode (DCA_RESULT_TYPE value)
 Sets the return code. More...
 
 operator bool () const
 Indicates whether or not an operation has been completed successfully.
 
std::string getDescription () const
 Returns the description for the error or warning. More...
 
DCA_RESULT_TYPE getReturnCode () const
 Returns the last error code (if any). More...
 

Member Function Documentation

◆ setReturnCode()

void dca::FunctionResult::setReturnCode ( DCA_RESULT_TYPE  value)

Sets the return code.

Parameters
[in]valueThe return code that should be set

◆ getDescription()

std::string dca::FunctionResult::getDescription ( ) const

Returns the description for the error or warning.

Returns
Error or warning description as string.
Remarks
If there is no error or warning this function returns an empty string.

◆ getReturnCode()

DCA_RESULT_TYPE dca::FunctionResult::getReturnCode ( ) const

Returns the last error code (if any).

Returns
Last return code.
Remarks
If there is no error this function returns DCA_SUCCESS (0)
See also
DCA Generic Error Codes

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