aboutsummaryrefslogtreecommitdiff
path: root/libxsde/xsde/cxx/sys-error.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libxsde/xsde/cxx/sys-error.hxx')
-rw-r--r--libxsde/xsde/cxx/sys-error.hxx42
1 files changed, 42 insertions, 0 deletions
diff --git a/libxsde/xsde/cxx/sys-error.hxx b/libxsde/xsde/cxx/sys-error.hxx
new file mode 100644
index 0000000..2c1c770
--- /dev/null
+++ b/libxsde/xsde/cxx/sys-error.hxx
@@ -0,0 +1,42 @@
+// file : xsde/cxx/sys-error.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2005-2009 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSDE_CXX_SYS_ERROR_HXX
+#define XSDE_CXX_SYS_ERROR_HXX
+
+namespace xsde
+{
+ namespace cxx
+ {
+ struct sys_error
+ {
+ enum value
+ {
+ none,
+ no_memory,
+ open_failed,
+ read_failed,
+ write_failed
+ };
+
+ sys_error (value);
+
+ operator value () const
+ {
+ return v_;
+ }
+
+ static const char*
+ text (value);
+
+ private:
+ value v_;
+ };
+ }
+}
+
+#include <xsde/cxx/sys-error.ixx>
+
+#endif // XSDE_CXX_SYS_ERROR_HXX