18 #ifndef EQFABRIC_ERROR_H
19 #define EQFABRIC_ERROR_H
21 #include <eq/fabric/api.h>
22 #include <lunchbox/types.h>
32 ERROR_FBO_UNSUPPORTED,
33 ERROR_FRAMEBUFFER_STATUS,
34 ERROR_FRAMEBUFFER_UNSUPPORTED,
35 ERROR_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT,
36 ERROR_FRAMEBUFFER_INCOMPLETE_ATTACHMENT,
37 ERROR_FRAMEBUFFER_INCOMPLETE_DIMENSIONS,
38 ERROR_FRAMEBUFFER_INCOMPLETE_FORMATS,
39 ERROR_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER,
40 ERROR_FRAMEBUFFER_INCOMPLETE_READ_BUFFER,
41 ERROR_FRAMEBUFFER_INITIALIZED,
42 ERROR_CUDACONTEXT_DEVICE_NOTFOUND,
43 ERROR_CUDACONTEXT_INIT_FAILED,
44 ERROR_CUDACONTEXT_MISSING_SUPPORT,
45 ERROR_WINDOWSYSTEM_UNKNOWN,
48 ERROR_PIPE_NODE_NOTRUNNING,
49 ERROR_SYSTEMPIPE_PIXELFORMAT_NOTFOUND,
50 ERROR_SYSTEMPIPE_CREATECONTEXT_FAILED,
51 ERROR_SYSTEMPIPE_CREATEWINDOW_FAILED,
52 ERROR_AGLPIPE_DISPLAYS_NOTFOUND,
53 ERROR_AGLPIPE_DEVICE_NOTFOUND,
54 ERROR_GLXPIPE_DEVICE_NOTFOUND,
55 ERROR_GLXPIPE_GLX_NOTFOUND,
56 ERROR_GLXPIPE_GLXEWINIT_FAILED,
57 ERROR_WGL_CREATEAFFINITYDC_FAILED,
58 ERROR_WGLPIPE_ENUMDISPLAYS_FAILED,
59 ERROR_WGLPIPE_CREATEDC_FAILED,
60 ERROR_WGLPIPE_ENUMGPUS_FAILED,
61 ERROR_WGLPIPE_REGISTERCLASS_FAILED,
62 ERROR_WGLPIPE_SETPF_FAILED,
63 ERROR_WGLPIPE_WGLEWINIT_FAILED,
64 ERROR_WINDOW_PIPE_NOTRUNNING,
65 ERROR_WINDOW_PVP_INVALID,
66 ERROR_SYSTEMWINDOW_PIXELFORMAT_NOTFOUND,
67 ERROR_SYSTEMWINDOW_NO_PIXELFORMAT,
68 ERROR_SYSTEMWINDOW_ARB_FLOAT_FB_REQUIRED,
69 ERROR_AGLWINDOW_NO_CONTEXT,
70 ERROR_AGLWINDOW_CREATECONTEXT_FAILED,
71 ERROR_AGLWINDOW_CREATEPBUFFER_FAILED,
72 ERROR_AGLWINDOW_SETPBUFFER_FAILED,
73 ERROR_AGLWINDOW_CREATEWINDOW_FAILED,
74 ERROR_AGLWINDOW_SETWINDOW_FAILED,
75 ERROR_GLXWINDOW_NO_DRAWABLE,
76 ERROR_GLXWINDOW_NO_DISPLAY,
77 ERROR_GLXWINDOW_CREATECONTEXT_FAILED,
78 ERROR_GLXWINDOW_CREATEWINDOW_FAILED,
79 ERROR_GLXWINDOW_GLXQUERYVERSION_FAILED,
80 ERROR_GLXWINDOW_GLX_1_3_REQUIRED,
81 ERROR_GLXWINDOW_NO_FBCONFIG,
82 ERROR_GLXWINDOW_NO_VISUAL,
83 ERROR_GLXWINDOW_CREATEPBUFFER_FAILED,
84 ERROR_GLXWINDOW_FBCONFIG_REQUIRED,
85 ERROR_WGLWINDOW_NO_DRAWABLE,
86 ERROR_WGLWINDOW_SETPIXELFORMAT_FAILED,
87 ERROR_WGLWINDOW_REGISTERCLASS_FAILED,
88 ERROR_WGLWINDOW_FULLSCREEN_FAILED,
89 ERROR_WGLWINDOW_CREATEWINDOW_FAILED,
90 ERROR_WGLWINDOW_ARB_PBUFFER_REQUIRED,
91 ERROR_WGLWINDOW_CREATEPBUFFER_FAILED,
92 ERROR_WGLWINDOW_SETAFFINITY_PF_FAILED,
93 ERROR_WGLWINDOW_CHOOSE_PF_ARB_FAILED,
94 ERROR_WGLWINDOW_CREATECONTEXT_FAILED,
95 ERROR_CHANNEL_WINDOW_NOTRUNNING,
96 ERROR_PBO_UNSUPPORTED,
97 ERROR_PBO_NOT_INITIALIZED,
98 ERROR_PBO_SIZE_TOO_SMALL,
99 ERROR_PBO_TYPE_UNSUPPORTED,
101 ERROR_CUSTOM = LB_64KB,
107 typedef void (
Error::*bool_t)()
const;
108 void bool_true()
const {}
112 explicit Error(
const uint32_t code ) : code_( code ) {}
118 operator bool_t() {
return code_ == ERROR_NONE ? &Error::bool_true : 0; }
127 operator uint32_t()
const {
return code_; }
136 bool operator == (
const uint32_t code )
const {
return code_ == code; }
139 bool operator != (
const uint32_t code )
const {
return code_ != code; }
146 EQFABRIC_API std::ostream& operator << ( std::ostream& os,
const Error& );
150 #endif // EQFABRIC_ERROR_H
bool operator!=(const Error &rhs) const
Error(const uint32_t code)
Construct a new error.
bool operator==(const Error &rhs) const
ErrorCode
Defines errors produced by Equalizer classes.
Error & operator=(const ErrorCode code)
Assign the given error code.
A wrapper for error codes to allow intuitive bool-like usage.