|
state-observation 1.7.0
|
this is a structure allowing for automatically verifying that the item has been initialized or not. The chckitm_reset() function allows to set it back to "not initialized" state. More...
#include <state-observation/tools/definitions.hpp>

Public Member Functions | |
| CheckedItem (bool initialize=true) | |
| The parameter initialize sets whether the isSet() parameter is initialized to false. | |
| CheckedItem (const T &) | |
| CheckedItem (const CheckedItem &) | |
| virtual | ~CheckedItem () |
| CheckedItem & | operator= (const CheckedItem &) |
| T & | operator= (const T &) |
| operator T () const | |
| operator const T & () const | |
| const T & | chckitm_getValue () const |
| T & | operator() () |
| const T & | operator() () const |
| T & | getRefUnchecked () |
| const T & | getRefUnchecked () const |
| bool | isSet () const |
| void | reset () |
| void | set (bool value) |
| set the value of the initialization check boolean | |
| void | setAssertMessage (std::string s) |
| void | setExceptionPtr (std::exception *e) |
| T & | set () |
Protected Types | |
| typedef DebugItem< bool, detail::defaultTrue, do_check_ > | IsSet |
| typedef DebugItem< const char *, detail::defaultErrorMSG, do_assert_ > | AssertMsg |
| typedef DebugItem< const std::exception *, detail::defaultExceptionAddr, do_exception_ > | ExceptionPtr |
Protected Member Functions | |
| bool | chckitm_check_ () const |
Protected Attributes | |
| IsSet | isSet_ |
| AssertMsg | assertMsg_ |
| ExceptionPtr | exceptionPtr_ |
| T | v_ |
| this can throw(std::exception) | |
Static Protected Attributes | |
| static const bool | do_check_ = !lazy || isDebug |
| static const bool | do_assert_ = do_check_ && assertion |
| static const bool | do_exception_ = do_check_ && !assertion |
this is a structure allowing for automatically verifying that the item has been initialized or not. The chckitm_reset() function allows to set it back to "not initialized" state.
| T | is the contained type |
| lazy | means that the "set" value is true all the time if NDEBUG is defined |
| alwaysCheck | means that the check is always performed and throws exception if it fails. Otherwise, the check is performed only for debug warning, this has no effect if lazy is set to true |
| assertion | means that an assertion will be introduced for the check. |
| eigenAlignedNew | should be set to true if any alignment is required for the new operator (see eigen documentation) |
| additionalChecker | defines a check function that is called in addition to the initialization check |
|
protected |
|
protected |
|
protected |
| stateObservation::CheckedItem< T, lazy, alwaysCheck, assertion, eigenAlignedNew, additionalChecker >::CheckedItem | ( | bool | initialize = true | ) |
The parameter initialize sets whether the isSet() parameter is initialized to false.
|
explicit |
| stateObservation::CheckedItem< T, lazy, alwaysCheck, assertion, eigenAlignedNew, additionalChecker >::CheckedItem | ( | const CheckedItem< T, lazy, alwaysCheck, assertion, eigenAlignedNew, additionalChecker > & | ) |
|
inlinevirtual |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| inline |
|
inline |
|
inline |
|
inline |
allows to set the initialization boolean to true and give a reference to the object with the same instruction should be used to initialize the object without using the assignment operator
|
inline |
set the value of the initialization check boolean
| void stateObservation::CheckedItem< T, lazy, alwaysCheck, assertion, eigenAlignedNew, additionalChecker >::setAssertMessage | ( | std::string | s | ) |
| void stateObservation::CheckedItem< T, lazy, alwaysCheck, assertion, eigenAlignedNew, additionalChecker >::setExceptionPtr | ( | std::exception * | e | ) |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
this can throw(std::exception)