NDEVR
API Documentation
GraphicsException.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Graphics
28File: GraphicsException
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/Exception.h>
35#include <NDEVR/Translator.h>
36#include <NDEVR/ApplicationResource.h>
37
38namespace NDEVR
39{
40 class GraphicsBuffer;
45 class GraphicsException : public Exception
46 {
47 public:
54
56 NDEVR_GRAPHICS_API explicit GraphicsException(const TranslatedString& error);
60 NDEVR_GRAPHICS_API GraphicsException(const TranslatedString& error, const TranslatedString& category);
63 NDEVR_GRAPHICS_API void setType(GraphicsExceptionType type);
66 NDEVR_GRAPHICS_API GraphicsExceptionType type() const;
69 NDEVR_GRAPHICS_API void setMessage(const TranslatedString& message) final override;
70 protected:
72 };
73
75 class GraphicsBufferException : public Exception
76 {
77 public:
81 NDEVR_GRAPHICS_API explicit GraphicsBufferException(const TranslatedString& error, const GraphicsBuffer& buffer);
82 };
83
89 {
90 public:
93 NDEVR_GRAPHICS_API explicit DeviceLostException(const TranslatedString& error);
97 NDEVR_GRAPHICS_API DeviceLostException(const TranslatedString& error, const TranslatedString& category);
98 };
99}
100
DeviceLostException(const TranslatedString &error)
Constructs a device-lost exception.
DeviceLostException(const TranslatedString &error, const TranslatedString &category)
Constructs a device-lost exception with a category.
GraphicsBufferException(const TranslatedString &error, const GraphicsBuffer &buffer)
Constructs a buffer exception.
A Special abstract TableColumn responsible for interfacing a Buffer of data with the video card.
GraphicsExceptionType
Categories of graphics exceptions.
@ e_general
General graphics error.
@ e_device_lost
The graphics device was lost and must be reinitialized.
GraphicsExceptionType m_type
The type of this graphics exception.
GraphicsException(const TranslatedString &error)
Constructs a graphics exception with an error message.
void setType(GraphicsExceptionType type)
Sets the exception type.
GraphicsException(const TranslatedString &error, const TranslatedString &category)
Constructs a graphics exception with an error message and category.
GraphicsExceptionType type() const
Returns the exception type.
void setMessage(const TranslatedString &message) final override
Sets the exception message.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
The primary namespace for the NDEVR SDK.
@ category
The category this object belongs to.