Class Status¶
Defined in File status.h
Inheritance Relationships¶
Base Type¶
public epics::pvData::Serializable
(Class Serializable)
Class Documentation¶
-
class Status : public epics::pvData::Serializable¶
-
This is a class for returning status to clients.
- Author
mse
Public Types
-
enum StatusType¶
Status type enum.
Values:
-
enumerator STATUSTYPE_OK¶
Operation completed successfully.
-
enumerator STATUSTYPE_WARNING¶
Operation completed successfully, but there is a warning message.
-
enumerator STATUSTYPE_ERROR¶
Operation failed due to an error.
-
enumerator STATUSTYPE_FATAL¶
Operation failed due to an unexpected error.
-
enumerator STATUSTYPE_OK¶
Public Functions
-
inline Status()¶
Creates OK status; STATUSTYPE_OK, empty message and stackDump.
-
Status(StatusType type, std::string const &message)¶
Create non-OK status.
-
Status(StatusType type, std::string const &message, std::string const &stackDump)¶
Create non-OK status.
-
inline virtual ~Status()¶
-
inline StatusType getType() const¶
Get status type.
- Returns
status type, non-
null
.
-
inline const std::string &getMessage() const¶
Get error message describing an error. Required if error status.
- Returns
error message.
-
inline const std::string &getStackDump() const¶
Get stack dump where error (exception) happened. Optional.
- Returns
stack dump.
-
inline bool isOK() const¶
Convenient OK test. Same as
(getType() == StatusType.OK)
. NOTE: this will returnfalse
on WARNING message although operation succeeded. To check if operation succeeded, useisSuccess
.See also
- Returns
OK status.
-
inline bool isSuccess() const¶
Check if operation succeeded (OK or WARNING).
- Returns
operation success status.
-
inline FORCE_INLINE operator truth_type() const¶
-
void maximize(const Status &o)¶
override this Status if the other has higher StatusType
Status ret; ret |= call1(); if(ret) ret |= call2(); return ret;
- inline FORCE_INLINE Status & operator|= (const Status &o)
short hand for “this->maximize(o)”
-
virtual void serialize(ByteBuffer *buffer, SerializableControl *flusher) const¶
Serialize field into given buffer.
- Parameters
buffer – serialization buffer.
flusher – flush interface.
-
virtual void deserialize(ByteBuffer *buffer, DeserializableControl *flusher)¶
Deserialize buffer.
- Parameters
buffer – serialization buffer.
flusher – deserialization control.
-
void dump(std::ostream &o) const¶
Public Static Functions