v1.3.2.0
Loading...
Searching...
No Matches
Enums.h
1
/*
2
This file is part of the WASimCommander project.
3
https://github.com/mpaperno/WASimCommander
4
5
COPYRIGHT: (c) Maxim Paperno; All Rights Reserved.
6
7
This file may be used under the terms of either the GNU General Public License (GPL)
8
or the GNU Lesser General Public License (LGPL), as published by the Free Software
9
Foundation, either version 3 of the Licenses, or (at your option) any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
Copies of the GNU GPL and LGPL are included with this project
17
and are available at <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#ifdef min
23
#undef min
24
#undef max
25
#endif
26
#include <type_traits>
27
28
#ifdef WSMCMND_ENUM_EXPORT
29
#undef WSMCMND_ENUM_EXPORT
30
#undef WSMCMND_ENUM_NAMESPACE
31
#endif
32
33
//#include "client/WASimClient.h"
34
#define WSMCMND_ENUM_EXPORT public
35
#define WSMCMND_ENUM_NAMESPACE WASimCommander::CLI::Enums
36
#include "enums_impl.h"
37
#include "client/enums_impl.h"
38
39
/// WASimCommander::CLI::Enums namespace. C++/CLI specific definitions only.
40
/// See documentation for `WASimCommander::Enums` and `WASimCommander::Client` namespaces for main API and Client enum classes respectively.
41
namespace
WASimCommander::CLI::Enums
42
{
43
44
/// Custom "+" operator for strong C++ enum types to cast to underlying type.
45
template <typename T, std::enable_if_t<std::is_enum<T>::value,
bool
> =
true
>
46
constexpr
auto
operator+
(T e)
noexcept
{
return
static_cast<
std::underlying_type_t<T>
>
(e); }
47
48
/// <summary> Method return status values; HRESULT "alias" </summary>
49
public enum class
HR
50
{
51
OK
= S_OK,
///< Success status.
52
FAIL
= E_FAIL,
///< General error status,
53
INVALIDARG
= E_INVALIDARG,
///< Invalid method argument.
54
NOT_CONNECTED
= int(
/*ERROR_NOT_CONNECTED*/
2250L | (
/*FACILITY_WIN32*/
7 << 16) | 0x80000000),
///< Error result: server not connected.
55
TIMEOUT
= int(
/*ERROR_TIMEOUT*/
1460L | (
/*FACILITY_WIN32*/
7 << 16) | 0x80000000),
///< Error result: timeout communicating with server.
56
};
57
58
}
WASimCommander::CLI::Enums
WASimCommander::CLI::Enums namespace. C++/CLI specific definitions only. See documentation for WASimC...
Definition
Enums.h:42
WASimCommander::CLI::Enums::HR
HR
Method return status values; HRESULT "alias".
Definition
Enums.h:50
WASimCommander::CLI::Enums::HR::TIMEOUT
@ TIMEOUT
Error result: timeout communicating with server.
Definition
Enums.h:55
WASimCommander::CLI::Enums::HR::INVALIDARG
@ INVALIDARG
Invalid method argument.
Definition
Enums.h:53
WASimCommander::CLI::Enums::HR::FAIL
@ FAIL
General error status,.
Definition
Enums.h:52
WASimCommander::CLI::Enums::HR::NOT_CONNECTED
@ NOT_CONNECTED
Error result: server not connected.
Definition
Enums.h:54
WASimCommander::CLI::Enums::HR::OK
@ OK
Success status.
Definition
Enums.h:51
WASimCommander::CLI::Enums::operator+
constexpr auto operator+(T e) noexcept
Custom "+" operator for strong C++ enum types to cast to underlying type.
Definition
Enums.h:46
src
WASimClient_CLI
Enums.h
Generated for WASimCommander v1.3.2.0 by
1.13.2