remove \r
[extl.git] / extl / platform_ / error / platform_error_base.h
blob5f009523a43d1428a94d2bf44d382bba13065aa5
1 /* ///////////////////////////////////////////////////////////////////////
2 * File: platform_error_base.h
4 * Created: 08.03.31
5 * Updated: 08.11.20
7 * Brief: The platform_error_base class
9 * [<Home>]
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
13 #ifndef EXTL_PLATFORM_ERROR_BASE_H
14 #define EXTL_PLATFORM_ERROR_BASE_H
16 /*!\file platform_error_base.h
17 * \brief The platform_error_base class
19 #ifndef __cplusplus
20 # error platform_error_base.h need be supported by c++.
21 #endif
23 /* ///////////////////////////////////////////////////////////////////////
24 * Includes
26 #include "prefix.h"
28 /* ///////////////////////////////////////////////////////////////////////
29 * ::extl::platform namespace
31 EXTL_PLATFORM_BEGIN_WHOLE_NAMESPACE
33 /*!\brief platform_error_base class
35 * \ingroup extl_group_error
37 class platform_error_base
38 : public error_base
40 /// \name Types
41 /// @{
42 public:
43 typedef error_base base_type;
44 typedef platform_error_base class_type;
45 typedef base_type::code_type code_type;
46 typedef base_type::string_type string_type;
47 typedef base_type::char_type char_type;
48 /// @}
50 /// \name Constructors
51 /// @{
52 public:
53 explicit_k platform_error_base(char_type const* reason = NULL, code_type error_code = 0)
54 : base_type(reason, error_code)
56 /// @}
58 /// \name Helpers
59 /// @{
60 protected:
61 virtual char_type const* get_default_reason() const
63 return "unknown platform error";
65 /// @}
68 /* ///////////////////////////////////////////////////////////////////////
69 * ::extl::platform namespace
71 EXTL_PLATFORM_END_WHOLE_NAMESPACE
73 /* //////////////////////////////////////////////////////////////////// */
74 #endif /* EXTL_PLATFORM_ERROR_BASE_H */
75 /* //////////////////////////////////////////////////////////////////// */