dca::FunctionResult Class Reference
[DCA Error HandlingDCA Base Package]

#include <base_classes.h>

List of all members.


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.
 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.
DCA_RESULT_TYPE getReturnCode () const
 Returns the last error code (if any).

Member Function Documentation

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

Sets the return code.

Parameters:
[in] value The return code that should be set
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.
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:

Generated on 26 Sep 2016 for dca_interface by  doxygen 1.6.1