11 #ifndef ASIO_ERROR_CODE_HPP 12 #define ASIO_ERROR_CODE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if defined(ASIO_HAS_STD_SYSTEM_ERROR) 21 # include <system_error> 22 #else // defined(ASIO_HAS_STD_SYSTEM_ERROR) 25 # if !defined(ASIO_NO_IOSTREAM) 27 # endif // !defined(ASIO_NO_IOSTREAM) 28 #endif // defined(ASIO_HAS_STD_SYSTEM_ERROR) 34 #if defined(ASIO_HAS_STD_SYSTEM_ERROR) 36 typedef std::error_category error_category;
38 #else // defined(ASIO_HAS_STD_SYSTEM_ERROR) 50 virtual const char*
name()
const = 0;
53 virtual std::string
message(
int value)
const = 0;
64 return !(*
this == rhs);
68 #endif // defined(ASIO_HAS_STD_SYSTEM_ERROR) 73 #if defined(ASIO_HAS_STD_SYSTEM_ERROR) 77 #else // defined(ASIO_HAS_STD_SYSTEM_ERROR) 86 category_(&system_category())
98 template <
typename ErrorEnum>
119 return category_->message(value_);
131 operator unspecified_bool_type()
const 146 friend bool operator==(
const error_code& e1,
const error_code& e2)
148 return e1.value_ == e2.value_ && e1.category_ == e2.category_;
152 friend bool operator!=(
const error_code& e1,
const error_code& e2)
154 return e1.value_ != e2.value_ || e1.category_ != e2.category_;
162 const error_category* category_;
165 # if !defined(ASIO_NO_IOSTREAM) 168 template <
typename Elem,
typename Traits>
170 std::basic_ostream<Elem, Traits>& os,
const error_code& ec)
176 # endif // !defined(ASIO_NO_IOSTREAM) 178 #endif // defined(ASIO_HAS_STD_SYSTEM_ERROR) 184 #if defined(ASIO_HEADER_ONLY) 186 #endif // defined(ASIO_HEADER_ONLY) 188 #endif // ASIO_ERROR_CODE_HPP std::basic_ostream< Elem, Traits > & operator<<(std::basic_ostream< Elem, Traits > &os, const error_code &ec)
Output an error code.
error_code()
Default constructor.
bool operator==(const error_category &rhs) const
Equality operator to compare two error categories.
pylon Camera Software Suite for Linux for Use with Basler Gigabit the pylon Viewer and the IP Configurator applications might not be available System I340 and I350 series Although the pylon software will work with any GigE network we would recommend to use one of these adapters USB For U3V devices a USB3 capable USB controller is necessary For best performance and stability we highly recommend a kernel the following settings should be i e
virtual const char * name() const =0
Returns a string naming the error gategory.
error_code(ErrorEnum e)
Construct from an error code enum.
static void unspecified_bool_true(unspecified_bool_type_t)
virtual std::string message(int value) const =0
Returns a string describing the error denoted by value.
friend bool operator==(const error_code &e1, const error_code &e2)
Equality operator to compare two error objects.
bool operator!=(const error_category &rhs) const
Inequality operator to compare two error categories.
error_code(int v, const error_category &c)
Construct with specific error code and category.
int value() const
Get the error value.
friend bool operator!=(const error_code &e1, const error_code &e2)
Inequality operator to compare two error objects.
Class to represent an error code value.
bool operator!() const
Operator to test if the error represents success.
std::string message() const
Get the message associated with the error.
asio::error_code make_error_code(basic_errors e)
const error_category & category() const
Get the error category.
virtual ~error_category()
Destructor.
ASIO_DECL const error_category & system_category()
Returns the error category used for the system errors produced by asio.