14 #include <pv/serialize.h>
15 #include <pv/byteBuffer.h>
20 namespace epics {
namespace pvData {
30 POINTER_DEFINITIONS(
Status);
45 static const char* StatusTypeName[];
50 static inline Status error(
const std::string& m) {
return Status(STATUSTYPE_ERROR, m); }
51 static inline Status fatal(
const std::string& m) {
return Status(STATUSTYPE_FATAL, m); }
56 Status() :m_statusType(STATUSTYPE_OK) {}
96 return (m_statusType == STATUSTYPE_OK);
104 return (m_statusType == STATUSTYPE_OK || m_statusType == STATUSTYPE_WARNING);
107 #if __cplusplus>=201103L
108 FORCE_INLINE
explicit operator bool()
const {
113 typedef bool (Status::*truth_type)()
const;
115 FORCE_INLINE
operator truth_type()
const {
129 void maximize(
const Status& o);
144 StatusType m_statusType;
156 o << Status::StatusTypeName[statusType];
basic_ostream< _CharT, _Traits > & operator<<(basic_ostream< _CharT, _Traits > &__os, const basic_string< _CharT, _Traits, _Alloc > &__str)
const std::string & getStackDump() const
const std::string & getMessage() const
Callback class for serialization.
StatusType getType() const
This class implements a Bytebuffer that is like the java.nio.ByteBuffer.
Callback class for deserialization.
Status & operator|=(const Status &o)
short hand for "this->maximize(o)"
Base class for serialization.