Skip to content

Commit

Permalink
Some methods in retVal.h marked as const (e.g. const int containsWarn…
Browse files Browse the repository at this point in the history
…ing() const). (does not affect binary compatibility)
  • Loading branch information
Marc Gronle committed Apr 10, 2014
1 parent dea9742 commit a8bc533
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OPTION(BUILD_UNICODE "Build with unicode charset if set to ON, else multibyte ch
OPTION(BUILD_ITOMLIBS_SHARED "Build dataObject, pointCloud, itomCommonLib and itomCommonQtLib as shared library (default)" ON)

SET (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/..)

include("../ItomBuildMacros.cmake")

IF(BUILD_ITOMLIBS_SHARED)
Expand Down
12 changes: 12 additions & 0 deletions common/retVal.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,26 @@ class ITOMCOMMON_EXPORT RetVal
void appendRetMessage(const char *addRetMessage);

//----------------------------------------------------------------------------------------------------------------------------------
/*BEGIN: THIS METHODS ARE MARKED AS DEPRECATED AND WILL BE REPLACE BY THE CONST VERSIONS BELOW IN NEXT API CHANGE (2014-04-10)*/
inline int containsWarning() { return (m_retValue & retWarning); } /*!< checks if any warning has occurred in this return value (true), else (false) */
inline int containsError() { return (m_retValue & retError); } /*!< checks if any error has occurred in this return value (true), else (false) */
inline int containsWarningOrError() { return (m_retValue & (retError | retWarning)); } /*!< checks if any warning or error has occurred in this return value (true), else (false) */
/*END: THIS METHODS ARE MARKED AS DEPRECATED AND WILL BE REPLACE BY THE CONST VERSIONS BELOW IN NEXT API CHANGE (2014-04-10)*/

inline int containsWarning() const { return (m_retValue & retWarning); } /*!< checks if any warning has occurred in this return value (true), else (false) */
inline int containsError() const { return (m_retValue & retError); } /*!< checks if any error has occurred in this return value (true), else (false) */
inline int containsWarningOrError() const { return (m_retValue & (retError | retWarning)); } /*!< checks if any warning or error has occurred in this return value (true), else (false) */

inline bool hasErrorMessage() const { return m_retMessage.size() > 0; }

/*BEGIN: THIS METHODS ARE MARKED AS DEPRECATED AND WILL BE REPLACE BY THE CONST VERSIONS BELOW IN NEXT API CHANGE (2014-04-10)*/
inline const char *errorMessage() { return m_retMessage.data(); } /*!< returns zero-terminated error message or empty, zero-terminated string if no error message has been set */
/*END: THIS METHODS ARE MARKED AS DEPRECATED AND WILL BE REPLACE BY THE CONST VERSIONS BELOW IN NEXT API CHANGE (2014-04-10)*/

inline int errorCode() const { return m_retCode; }

inline const char *errorMessage() const{ return m_retMessage.data(); } /*!< returns zero-terminated error message or empty, zero-terminated string if no error message has been set */

//----------------------------------------------------------------------------------------------------------------------------------
static RetVal format(ito::tRetValue retValue, int retCode, const char *pRetMessage, ...);

Expand Down

0 comments on commit a8bc533

Please sign in to comment.