Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added AL, ALC and ALUT error code enumerations. - Added the ErrorAL exception class. - Minor updates in OAL's error reporting.
- Loading branch information
1 parent
4f4f4fc
commit 698d355
Showing
40 changed files
with
1,728 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// File doc/quickbook/oalplus/quickref/enums/al_error_code.hpp | ||
// | ||
// Automatically generated file, DO NOT modify manually. | ||
// Edit the source 'source/enums/oalplus/al_error_code.txt' | ||
// or the 'source/enums/make_enum.py' script instead. | ||
// | ||
// Copyright 2010-2015 Matus Chochlik. | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// See accompanying file LICENSE_1_0.txt or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt | ||
// | ||
//[oalplus_enums_al_error_code | ||
namespace oalplus { | ||
|
||
enum class ALErrorCode : ALenum | ||
{ | ||
NoError = AL_NO_ERROR, | ||
InvalidName = AL_INVALID_NAME, | ||
InvalidEnum = AL_INVALID_ENUM, | ||
InvalidValue = AL_INVALID_VALUE, | ||
InvalidOperation = AL_INVALID_OPERATION, | ||
OutOfMemory = AL_OUT_OF_MEMORY | ||
}; | ||
|
||
template <> | ||
__Range<ALErrorCode> __EnumValueRange<ALErrorCode>(void); | ||
|
||
__StrCRef __EnumValueName(ALErrorCode); | ||
|
||
} // namespace oalplus | ||
//] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// File doc/quickbook/oalplus/quickref/enums/alc_error_code.hpp | ||
// | ||
// Automatically generated file, DO NOT modify manually. | ||
// Edit the source 'source/enums/oalplus/alc_error_code.txt' | ||
// or the 'source/enums/make_enum.py' script instead. | ||
// | ||
// Copyright 2010-2015 Matus Chochlik. | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// See accompanying file LICENSE_1_0.txt or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt | ||
// | ||
//[oalplus_enums_alc_error_code | ||
namespace oalplus { | ||
|
||
enum class ALCErrorCode : ALenum | ||
{ | ||
NoError = AL_NO_ERROR, | ||
InvalidDevice = AL_INVALID_DEVICE, | ||
InvalidContext = AL_INVALID_CONTEXT, | ||
InvalidEnum = AL_INVALID_ENUM, | ||
InvalidValue = AL_INVALID_VALUE, | ||
OutOfMemory = AL_OUT_OF_MEMORY | ||
}; | ||
|
||
template <> | ||
__Range<ALCErrorCode> __EnumValueRange<ALCErrorCode>(void); | ||
|
||
__StrCRef __EnumValueName(ALCErrorCode); | ||
|
||
} // namespace oalplus | ||
//] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// File doc/quickbook/oalplus/quickref/enums/alut_error_code.hpp | ||
// | ||
// Automatically generated file, DO NOT modify manually. | ||
// Edit the source 'source/enums/oalplus/alut_error_code.txt' | ||
// or the 'source/enums/make_enum.py' script instead. | ||
// | ||
// Copyright 2010-2015 Matus Chochlik. | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// See accompanying file LICENSE_1_0.txt or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt | ||
// | ||
//[oalplus_enums_alut_error_code | ||
namespace oalplus { | ||
|
||
enum class ALUTErrorCode : ALenum | ||
{ | ||
OutOfMemory = AL_OUT_OF_MEMORY, | ||
InvalidOperation = AL_INVALID_OPERATION, | ||
NoCurrentContext = AL_NO_CURRENT_CONTEXT, | ||
AlErrorOnEntry = AL_AL_ERROR_ON_ENTRY, | ||
AlcErrorOnEntry = AL_ALC_ERROR_ON_ENTRY, | ||
UnsupportedFileType = AL_UNSUPPORTED_FILE_TYPE, | ||
UnsupportedFileSubtype = AL_UNSUPPORTED_FILE_SUBTYPE, | ||
CorruptOrTruncatedData = AL_CORRUPT_OR_TRUNCATED_DATA | ||
}; | ||
|
||
template <> | ||
__Range<ALUTErrorCode> __EnumValueRange<ALUTErrorCode>(void); | ||
|
||
__StrCRef __EnumValueName(ALUTErrorCode); | ||
|
||
} // namespace oalplus | ||
//] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
// File implement/oalplus/enums/al_error_code_class.ipp | ||
// | ||
// Automatically generated file, DO NOT modify manually. | ||
// Edit the source 'source/enums/oalplus/al_error_code.txt' | ||
// or the 'source/enums/make_enum.py' script instead. | ||
// | ||
// Copyright 2010-2015 Matus Chochlik. | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// See accompanying file LICENSE_1_0.txt or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt | ||
// | ||
namespace enums { | ||
template <typename Base, template<ALErrorCode> class Transform> | ||
class EnumToClass<Base, ALErrorCode, Transform> | ||
: public Base | ||
{ | ||
private: | ||
Base& _base(void) { return *this; } | ||
public: | ||
|
||
#if defined AL_NO_ERROR | ||
# if defined NoError | ||
# pragma push_macro("NoError") | ||
# undef NoError | ||
Transform<ALErrorCode::NoError> NoError; | ||
# pragma pop_macro("NoError") | ||
# else | ||
Transform<ALErrorCode::NoError> NoError; | ||
# endif | ||
#endif | ||
#if defined AL_INVALID_NAME | ||
# if defined InvalidName | ||
# pragma push_macro("InvalidName") | ||
# undef InvalidName | ||
Transform<ALErrorCode::InvalidName> InvalidName; | ||
# pragma pop_macro("InvalidName") | ||
# else | ||
Transform<ALErrorCode::InvalidName> InvalidName; | ||
# endif | ||
#endif | ||
#if defined AL_INVALID_ENUM | ||
# if defined InvalidEnum | ||
# pragma push_macro("InvalidEnum") | ||
# undef InvalidEnum | ||
Transform<ALErrorCode::InvalidEnum> InvalidEnum; | ||
# pragma pop_macro("InvalidEnum") | ||
# else | ||
Transform<ALErrorCode::InvalidEnum> InvalidEnum; | ||
# endif | ||
#endif | ||
#if defined AL_INVALID_VALUE | ||
# if defined InvalidValue | ||
# pragma push_macro("InvalidValue") | ||
# undef InvalidValue | ||
Transform<ALErrorCode::InvalidValue> InvalidValue; | ||
# pragma pop_macro("InvalidValue") | ||
# else | ||
Transform<ALErrorCode::InvalidValue> InvalidValue; | ||
# endif | ||
#endif | ||
#if defined AL_INVALID_OPERATION | ||
# if defined InvalidOperation | ||
# pragma push_macro("InvalidOperation") | ||
# undef InvalidOperation | ||
Transform<ALErrorCode::InvalidOperation> InvalidOperation; | ||
# pragma pop_macro("InvalidOperation") | ||
# else | ||
Transform<ALErrorCode::InvalidOperation> InvalidOperation; | ||
# endif | ||
#endif | ||
#if defined AL_OUT_OF_MEMORY | ||
# if defined OutOfMemory | ||
# pragma push_macro("OutOfMemory") | ||
# undef OutOfMemory | ||
Transform<ALErrorCode::OutOfMemory> OutOfMemory; | ||
# pragma pop_macro("OutOfMemory") | ||
# else | ||
Transform<ALErrorCode::OutOfMemory> OutOfMemory; | ||
# endif | ||
#endif | ||
|
||
EnumToClass(void) { } | ||
EnumToClass(Base&& base) | ||
: Base(std::move(base)) | ||
#if defined AL_NO_ERROR | ||
# if defined NoError | ||
# pragma push_macro("NoError") | ||
# undef NoError | ||
, NoError(_base()) | ||
# pragma pop_macro("NoError") | ||
# else | ||
, NoError(_base()) | ||
# endif | ||
#endif | ||
#if defined AL_INVALID_NAME | ||
# if defined InvalidName | ||
# pragma push_macro("InvalidName") | ||
# undef InvalidName | ||
, InvalidName(_base()) | ||
# pragma pop_macro("InvalidName") | ||
# else | ||
, InvalidName(_base()) | ||
# endif | ||
#endif | ||
#if defined AL_INVALID_ENUM | ||
# if defined InvalidEnum | ||
# pragma push_macro("InvalidEnum") | ||
# undef InvalidEnum | ||
, InvalidEnum(_base()) | ||
# pragma pop_macro("InvalidEnum") | ||
# else | ||
, InvalidEnum(_base()) | ||
# endif | ||
#endif | ||
#if defined AL_INVALID_VALUE | ||
# if defined InvalidValue | ||
# pragma push_macro("InvalidValue") | ||
# undef InvalidValue | ||
, InvalidValue(_base()) | ||
# pragma pop_macro("InvalidValue") | ||
# else | ||
, InvalidValue(_base()) | ||
# endif | ||
#endif | ||
#if defined AL_INVALID_OPERATION | ||
# if defined InvalidOperation | ||
# pragma push_macro("InvalidOperation") | ||
# undef InvalidOperation | ||
, InvalidOperation(_base()) | ||
# pragma pop_macro("InvalidOperation") | ||
# else | ||
, InvalidOperation(_base()) | ||
# endif | ||
#endif | ||
#if defined AL_OUT_OF_MEMORY | ||
# if defined OutOfMemory | ||
# pragma push_macro("OutOfMemory") | ||
# undef OutOfMemory | ||
, OutOfMemory(_base()) | ||
# pragma pop_macro("OutOfMemory") | ||
# else | ||
, OutOfMemory(_base()) | ||
# endif | ||
#endif | ||
{ } | ||
}; | ||
|
||
} // namespace enums | ||
|
Oops, something went wrong.