GCC Code Coverage Report


Directory: src/gate/
File: src/gate/exceptions.hpp
Date: 2026-12-03 19:36:00
Exec Total Coverage
Lines: 81 95 85.3%
Functions: 143 169 84.6%
Branches: 17 36 47.2%

Line Branch Exec Source
1 /* GATE PROJECT LICENSE:
2 +----------------------------------------------------------------------------+
3 | Copyright (c) 2018-2026, Stefan Meislinger <sm@opengate.at> |
4 | All rights reserved. |
5 | |
6 | Redistribution and use in source and binary forms, with or without |
7 | modification, are permitted provided that the following conditions are met:|
8 | |
9 | 1. Redistributions of source code must retain the above copyright notice, |
10 | this list of conditions and the following disclaimer. |
11 | 2. Redistributions in binary form must reproduce the above copyright |
12 | notice, this list of conditions and the following disclaimer in the |
13 | documentation and/or other materials provided with the distribution. |
14 | |
15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"|
16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
18 | ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
25 | THE POSSIBILITY OF SUCH DAMAGE. |
26 +----------------------------------------------------------------------------+
27 */
28
29 /** @file
30 * @brief C++ exception base classes and utilities
31 * @ingroup gatecore_cpp
32 */
33
34 #ifndef GATE_EXECEPTIONS_HPP_INCLUDED
35 #define GATE_EXECEPTIONS_HPP_INCLUDED
36
37 #include "gate/gate_core_api.hpp"
38 #include "gate/gatetypes.hpp"
39 #include "gate/results.hpp"
40 #include "gate/memalloc.hpp"
41
42 namespace gate
43 {
44
45 /// @brief
46 class GATE_CORE_CPP_API Throwable
47 {
48 public:
49 virtual ~Throwable() noexcept;
50
51 virtual result_t getResult() const noexcept = 0;
52 virtual char const* getMessage() const noexcept = 0;
53 virtual char const* getSource() const noexcept = 0;
54 virtual int32_t getErrorCode() const noexcept = 0;
55
56 };
57
58
59
60 /// @brief
61 class GATE_CORE_CPP_API Error : public Throwable
62 {
63 public:
64 explicit Error(result_t result, char const* source = 0, int32_t errCode = 0) noexcept;
65 virtual ~Error() noexcept;
66
67 virtual result_t getResult() const noexcept;
68 virtual char const* getMessage() const noexcept;
69 virtual char const* getSource() const noexcept;
70 virtual int32_t getErrorCode() const noexcept;
71
72 private:
73 gate_error_info_t info;
74 };
75
76
77 /// @brief
78 class GATE_CORE_CPP_API Exception : public Throwable
79 {
80 public:
81 explicit Exception(result_t result, char const* msg = 0, char const* src = 0, int32_t errCode = 0) noexcept;
82 explicit Exception(exception_info_t const& xinfo);
83 virtual ~Exception() noexcept;
84
85 virtual result_t getResult() const noexcept;
86 virtual char const* getMessage() const noexcept;
87 virtual char const* getSource() const noexcept;
88 virtual int32_t getErrorCode() const noexcept;
89
90 private:
91 exception_info_t info;
92 };
93
94
95 /// @brief
96 class GATE_CORE_CPP_API ExceptionInfo : public exception_info_t
97 {
98 public:
99 ExceptionInfo();
100 ExceptionInfo(result_t result, int32_t errorCode, char const* source, char const* message);
101 ExceptionInfo(exception_info_t const& src);
102
103 bool_t failed() const noexcept;
104 bool_t succeeded() const noexcept;
105 void raise() const;
106 };
107
108
109 /// @brief
110 /// @param errObj
111 /// @return
112 GATEXX_ATTR_NORETURN GATE_CORE_CPP_API extern void raise(Error errObj);
113
114
115 /// @brief
116 /// @param resultCode
117 /// @param src
118 /// @param errCode
119 /// @return
120 GATEXX_ATTR_NORETURN GATE_CORE_CPP_API extern void raiseError(result_t resultCode, char const* src = 0, int32_t errCode = 0);
121
122 #define GATEXX_CHECK_ERROR(resultCode) do { if(GATE_FAILED(resultCode)) ::gate::raiseError(resultCode, GATE_CURRENT_FUNCTION_NAME, 0); } while(0)
123 #define GATEXX_RAISE_ERROR(resultCode) ::gate::raiseError(resultCode, GATE_CURRENT_FUNCTION_NAME, 0)
124
125
126 /// @brief
127 /// @param xcptObj
128 /// @return
129 GATEXX_ATTR_NORETURN GATE_CORE_CPP_API extern void raise(Exception xcptObj);
130
131
132 /// @brief
133 /// @param resultCode
134 /// @param msg
135 /// @param src
136 /// @param errCode
137 /// @return
138 GATEXX_ATTR_NORETURN GATE_CORE_CPP_API extern void raiseException(result_t resultCode, char const* msg = 0, char const* src = 0, int32_t errCode = 0);
139
140 #define GATEXX_CHECK_EXCEPTION(resultCode) do { if(GATE_FAILED(resultCode)) ::gate::raiseException(resultCode, 0, GATE_CURRENT_FUNCTION_NAME, 0); } while(0)
141 #define GATEXX_RAISE_EXCEPTION(resultCode, message, nativeErrorCode) ::gate::raiseException(resultCode, message, GATE_CURRENT_FUNCTION_NAME, nativeErrorCode)
142
143
144 /// @brief
145 /// @tparam T
146 template<class T>
147 class ErrorPublisher
148 {
149 public:
150 static void publish(T const& errObj, char const* source);
151 };
152
153 template<>
154 class ErrorPublisher<result_t>
155 {
156 public:
157 ✗ static void publish(result_t const& errType, char const* source)
158 {
159 ✗ raise(Error(errType, source));
160 ✗ }
161 };
162
163
164 /// @brief
165 /// @tparam T
166 template<class T>
167 class ExceptionPublisher
168 {
169 public:
170 static void publish(T const& errObj, char const* source);
171 };
172
173 template<>
174 class ExceptionPublisher<result_t>
175 {
176 public:
177 ✗ static void publish(result_t const& xcptType, char const* source)
178 {
179 ✗ raise(Exception(xcptType, 0, source));
180 ✗ }
181 };
182
183
184
185 /// @brief
186 /// @tparam T
187 /// @tparam ID
188 template<class T, class ID>
189 class ResultValue
190 {
191 public:
192 typedef ResultValue<T, ID> self_t;
193 typedef T item_t;
194 private:
195 item_t item;
196 public:
197
198 71 ResultValue(item_t const& src)
199 71 : item(src)
200 {
201 71 }
202 ResultValue(self_t const& src)
203 : item(src.item)
204 {
205 }
206 self_t& operator=(self_t const& src)
207 {
208 this->item = src.item;
209 return *this;
210 }
211 102 ~ResultValue()
212 {
213 102 }
214 item_t& get() noexcept
215 {
216 return this->item;
217 }
218 102 item_t const& get() const noexcept
219 {
220 102 return this->item;
221 }
222 };
223
224 struct ResultSuccessId {};
225 struct ResultErrorId {};
226
227
228 /// @brief
229 /// @tparam TRESULTTYPE
230 /// @param resultType
231 /// @return
232 template<class TRESULTTYPE>
233 57 ResultValue<TRESULTTYPE, ResultSuccessId> makeOk(TRESULTTYPE const& resultType)
234 {
235 57 return ResultValue<TRESULTTYPE, ResultSuccessId>(resultType);
236 }
237
238
239 /// @brief
240 /// @tparam TERRORTYPE
241 /// @param errType
242 /// @return
243 template<class TERRORTYPE>
244 1 ResultValue<TERRORTYPE, ResultErrorId> makeErr(TERRORTYPE const& errType)
245 {
246 1 return ResultValue<TERRORTYPE, ResultErrorId>(errType);
247 }
248
249
250 /// @brief
251 /// @param errCode
252 /// @return
253 GATE_CORE_CPP_API extern ResultValue<result_t, ResultErrorId> makeErr(result_t const& errCode);
254
255
256 /// @brief
257 /// @param errCode
258 /// @return
259 GATE_CORE_CPP_API extern ResultValue<result_t, ResultErrorId> makeErrResult(results::ResultType const& errCode);
260
261 struct Void {};
262
263
264 /// @brief
265 /// @tparam T
266 /// @tparam E
267 template<class T = Void, class E = result_t>
268 class Result
269 {
270 public:
271 typedef T value_t;
272 typedef E error_t;
273 typedef Result<T, E> self_t;
274
275 typedef ResultValue<T, ResultSuccessId> ResultSuccessType;
276 typedef ResultValue<E, ResultErrorId> ResultErrorType;
277 private:
278 value_t* ptrValue;
279 error_t* ptrError;
280 union
281 {
282 gate_c_maxalign_t dummy;
283 char valueContent[sizeof(value_t)];
284 char errorContent[sizeof(error_t)];
285 } content;
286
287 public:
288 63240 bool_t empty() const noexcept
289 {
290
2/4
✓ Branch 0 taken 63076 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 63076 times.
✗ Branch 3 not taken.
63240 return (this->ptrValue == NULL) && (this->ptrError == NULL);
291 }
292
293
294 void createValue()
295 {
296 if (!this->empty())
297 {
298 GATEXX_RAISE_ERROR(results::InvalidState);
299 }
300 else
301 {
302 value_t* ptrMem = reinterpret_cast<value_t*>(&this->content.valueContent[0]);
303 gate::constructType(ptrMem);
304 this->ptrValue = ptrMem;
305 }
306 }
307 63074 void createValue(value_t const& src)
308 {
309
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 63052 times.
63074 if (!this->empty())
310 {
311 ✗ GATEXX_RAISE_ERROR(results::InvalidState);
312 }
313 else
314 {
315 63074 value_t* ptrMem = reinterpret_cast<value_t*>(&this->content.valueContent[0]);
316 63074 gate::copyConstructType(ptrMem, src);
317 63074 this->ptrValue = ptrMem;
318 }
319 63074 }
320
321 void createError()
322 {
323 if (!this->empty())
324 {
325 GATEXX_RAISE_ERROR(results::InvalidState);
326 }
327 else
328 {
329 error_t* ptrMem = reinterpret_cast<error_t*>(&this->content.errorContent[0]);
330 gate::constructType(ptrMem);
331 this->ptrError = ptrMem;
332 }
333 }
334
335 45 void createError(error_t const& src)
336 {
337
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 24 times.
45 if (!this->empty())
338 {
339 ✗ GATEXX_RAISE_ERROR(results::InvalidState);
340 }
341 else
342 {
343 45 error_t* ptrMem = reinterpret_cast<error_t*>(&this->content.errorContent[0]);
344 45 gate::copyConstructType(ptrMem, src);
345 45 this->ptrError = ptrMem;
346 }
347 45 }
348
349 63016 Result()
350 : ptrValue(NULL),
351 ptrError(NULL),
352 63016 content()
353 {
354 63016 }
355
356 57 Result(ResultSuccessType const& successType)
357 : ptrValue(NULL),
358 ptrError(NULL),
359 57 content()
360 {
361 57 this->createValue(successType.get());
362 57 }
363
364 28 Result(ResultErrorType const& errorType)
365 : ptrValue(NULL),
366 ptrError(NULL),
367 28 content()
368 {
369 28 this->createError(errorType.get());
370 28 }
371
372 Result(self_t const& src)
373 : ptrValue(NULL),
374 ptrError(NULL),
375 content()
376 {
377 if (src.hasValue())
378 {
379 this->createValue(src.value());
380 }
381 else if (src.hasError())
382 {
383 this->createError(src.error());
384 }
385 else
386 {
387 // An empty result is not allowed to be copied
388 GATEXX_RAISE_ERROR(results::InvalidState);
389 }
390 }
391
392 123751 void reset()
393 {
394
2/2
✓ Branch 0 taken 63052 times.
✓ Branch 1 taken 24 times.
123751 if (this->ptrValue)
395 {
396 123717 destructType(this->ptrValue);
397 123717 this->ptrValue = NULL;
398 }
399
1/2
✓ Branch 0 taken 24 times.
✗ Branch 1 not taken.
34 else if (this->ptrError)
400 {
401 34 destructType(this->ptrError);
402 34 this->ptrError = NULL;
403 }
404 123751 }
405
406 9 self_t& operator=(self_t const& src)
407 {
408
1/2
✓ Branch 0 taken 9 times.
✗ Branch 1 not taken.
9 if (this != &src)
409 {
410 9 this->reset();
411
1/2
✓ Branch 1 taken 9 times.
✗ Branch 2 not taken.
9 if (src.hasValue())
412 {
413 9 this->createValue(src.value());
414 }
415 ✗ else if (src.hasError())
416 {
417 ✗ this->createError(src.error());
418 }
419 }
420 9 return *this;
421 }
422
423 123736 ~Result()
424 {
425 123736 this->reset();
426 123736 }
427
428 121043 bool_t hasValue() const noexcept
429 {
430 121043 return this->ptrValue != NULL;
431 }
432
433 121389 value_t& value() const noexcept
434 {
435
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 61356 times.
121389 if (!this->ptrValue)
436 {
437 ✗ gate::panic(results::NullPointer, "Result<>::value()");
438 }
439 121389 return *this->ptrValue;
440 }
441
442 24 void checkError(char const* source) const
443 {
444
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 12 times.
24 if (this->ptrError)
445 {
446 ✗ ErrorPublisher<error_t>::publish(*this->ptrError, source);
447 }
448 24 }
449
450 15 void checkException(char const* source) const
451 {
452
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 15 times.
15 if (this->ptrError)
453 {
454 ✗ ExceptionPublisher<error_t>::publish(*this->ptrError, source);
455 }
456 15 }
457
458 24 value_t& valueOrError() const
459 {
460 24 checkError("Result::valueOrError");
461 24 return value();
462 }
463
464 2 value_t& valueOrExcept() const
465 {
466 2 checkException("Result::valueOrExcept");
467 2 return value();
468 }
469
470 1392 bool_t hasError() const noexcept
471 {
472 1392 return this->ptrError != NULL;
473 }
474
475 15 error_t& error() const noexcept
476 {
477
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
15 if (!this->ptrError)
478 {
479 ✗ gate::panic(results::NullPointer, "Result<>::error()");
480 }
481 15 return *this->ptrError;
482 }
483
484 bool_t operator!() const noexcept
485 {
486 return !this->hasValue();
487 }
488 value_t& operator*() noexcept
489 {
490 return this->value();
491 }
492 value_t const& operator*() const noexcept
493 {
494 return this->value();
495 }
496 };
497
498 typedef Result<Void, result_t> VoidResult;
499
500
501
502 GATE_CORE_CPP_API extern VoidResult makeOk(void);
503
504
505
506 /// @brief
507 /// @tparam TRESULTTYPE
508 /// @param resultCode
509 /// @param resultType
510 /// @return
511 template<class TRESULTTYPE>
512 61830 Result<TRESULTTYPE, result_t> makeResult(result_t const& resultCode, TRESULTTYPE const& resultType)
513 {
514 61830 Result<TRESULTTYPE, result_t> ret;
515
2/2
✓ Branch 0 taken 61828 times.
✓ Branch 1 taken 2 times.
61830 if (GATE_SUCCEEDED(resultCode))
516 {
517
1/2
✓ Branch 1 taken 61828 times.
✗ Branch 2 not taken.
61828 ret.createValue(resultType);
518 }
519 else
520 {
521
1/2
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
2 ret.createError(resultCode);
522 }
523 61830 return ret;
524 }
525
526 // NOTICE: Old compilers like OpenWATCOM cannot link templated ResultValue<E> into Result<T,E>.
527 // Therefore we need a makeErr() that provides the T-Result too.
528 template<class TRESULTTYPE>
529 Result<TRESULTTYPE, result_t> makeErr(result_t const& errorCode, TRESULTTYPE const& resultInfo)
530 {
531 Result<TRESULTTYPE, result_t> ret;
532 ret.createError(errorCode);
533 return ret;
534 }
535 template<class TRESULTTYPE>
536 Result<TRESULTTYPE, result_t> makeErr(results::ResultType const& errorCode, TRESULTTYPE const& resultInfo)
537 {
538 Result<TRESULTTYPE, result_t> ret;
539 ret.createError(static_cast<result_t>(errorCode));
540 return ret;
541 }
542
543
544 GATE_CORE_CPP_API extern Result<Void, result_t> makeResult(result_t const& resultCode);
545
546
547 #if defined(GATE_EXCEPTIONS_ADVANCED)
548
549 namespace exceptions
550 {
551
552 template<int RESULT>
553 class GATE_CORE_CPP_API ResultException : public Exception
554 {
555 public:
556 ResultException(char const* msg = 0, char const* src = 0, int32_t errCode = 0)
557 : Exception(RESULT, (msg ? msg : gate_result_text(RESULT)), src, errCode)
558 {
559 }
560 };
561
562
563 /* GENERIC ERRORS */
564 typedef ResultException<GATE_RESULT_ERROR> Error;
565 typedef ResultException<GATE_RESULT_FAILED> Failed;
566 typedef ResultException<GATE_RESULT_CANCELED> Canceled;
567 typedef ResultException<GATE_RESULT_INVALIDARG> InvalidArg;
568 typedef ResultException<GATE_RESULT_ACCESSDENIED> AccessDenied;
569 typedef ResultException<GATE_RESULT_PERMISSIONDENIED> PermissionDenied;
570 typedef ResultException<GATE_RESULT_NOTDEFINED> NotDefined;
571 typedef ResultException<GATE_RESULT_NOTAVAILABLE> NotAvailable;
572 typedef ResultException<GATE_RESULT_NOTIMPLEMENTED> NotImplemented;
573 typedef ResultException<GATE_RESULT_NOMATCH> NoMatch;
574 typedef ResultException<GATE_RESULT_NOTSUPPORTED> NotSupported;
575 typedef ResultException<GATE_RESULT_NOTREQUIRED> NotRequired;
576 typedef ResultException<GATE_RESULT_NOTREADY> NotReady;
577 typedef ResultException<GATE_RESULT_SECURITYBREACH> SecurityBreach;
578 typedef ResultException<GATE_RESULT_ALREADYEXISTS> AlreadyExists;
579 typedef ResultException<GATE_RESULT_INVALIDSTATE> InvalidState;
580
581 /* RESOURCE ACCESS ERRORS */
582 typedef ResultException<GATE_RESULT_OUTOFMEMORY> OutOfMemory;
583 typedef ResultException<GATE_RESULT_OUTOFRESOURCES> OutOfResources;
584 typedef ResultException<GATE_RESULT_OUTOFBOUNDS> OutOfBounds;
585 typedef ResultException<GATE_RESULT_NULLPOINTER> NullPointer;
586 typedef ResultException<GATE_RESULT_BADCAST> BadCast;
587 typedef ResultException<GATE_RESULT_ARITHMETICERROR> ArithmeticError;
588 typedef ResultException<GATE_RESULT_OVERFLOW> Overflow;
589 typedef ResultException<GATE_RESULT_UNDERFLOW> Underflow;
590 typedef ResultException<GATE_RESULT_LOCKED> Locked;
591 typedef ResultException<GATE_RESULT_TIMEOUT> Timeout;
592 typedef ResultException<GATE_RESULT_BADADDRESS> BadAddress;
593 typedef ResultException<GATE_RESULT_BLOCKED> Blocked;
594 typedef ResultException<GATE_RESULT_DEVICEERROR> DeviceError;
595
596 /* EXECUTION ERRORS */
597 typedef ResultException<GATE_RESULT_EXECUTIONFAILED> ExecutionFailed;
598 typedef ResultException<GATE_RESULT_EXECUTIONINTERRUPTED> ExecutionInterrupted;
599 typedef ResultException<GATE_RESULT_CRITICALERROR> CriticalError;
600 typedef ResultException<GATE_RESULT_UNKNOWNEXCEPTION> UnknownException;
601 typedef ResultException<GATE_RESULT_PRECONDITIONFAILED> PreconditionFailed;
602 typedef ResultException<GATE_RESULT_PREPARATIONFAILED> PreparationFailed;
603 typedef ResultException<GATE_RESULT_BADINSTRUCTION> BadInstruction;
604
605 /* DATA ERRORS */
606 typedef ResultException<GATE_RESULT_INVALIDHEADER> InvalidHeader;
607 typedef ResultException<GATE_RESULT_INVALIDDATA> InvalidData;
608 typedef ResultException<GATE_RESULT_INVALIDCONTENT> InvalidContent;
609 typedef ResultException<GATE_RESULT_INCORRECTSIZE> IncorrectSize;
610 typedef ResultException<GATE_RESULT_INCORRECTTYPE> IncorrectType;
611 typedef ResultException<GATE_RESULT_ENDOFSTREAM> EndOfStream;
612 typedef ResultException<GATE_RESULT_INVALIDINPUT> InvalidInput;
613 typedef ResultException<GATE_RESULT_INVALIDOUTPUT> InvalidOutput;
614 typedef ResultException<GATE_RESULT_BUFFERTOOSMALL> BufferTooSmall;
615 typedef ResultException<GATE_RESULT_NODATA> NoData;
616
617 /* PROGRAM ERRORS */
618 typedef ResultException<GATE_RESULT_APPLICATIONERROR> ApplicationError;
619 typedef ResultException<GATE_RESULT_LOGICALERROR> LogicalError;
620 typedef ResultException<GATE_RESULT_USERERROR> UserError;
621
622 /* UNSPECIFIED ERRORS */
623 typedef ResultException<GATE_RESULT_UNKNOWNERROR> UnknownError;
624
625 } // end of namespace exceptions
626 #endif
627
628
629 #if defined(GATEXX_NO_EXCEPTIONS)
630 // no exception handling (raising exceptions would panic/abort)
631 # define GATEXX_TRY_CATCHINFO(exceptionInfoRef, codeblock) \
632 do { \
633 codeblock ; \
634 exceptionInfoRef = ExceptionInfo(); \
635 } while(0);
636
637 # define GATEXX_TRY_IGNORE(codeblock) \
638 do { \
639 codeblock ; \
640 } while(0);
641
642 # define GATEXX_TRY_CATCHALL(trycode, catchcode) \
643 do { \
644 trycode ; \
645 } while(0);
646
647 # define GATEXX_RETHROW ::gate::panic(::gate::results::UnknownException, "Rethrown Exception");
648
649
650 #else
651 // catch exceptions with default try-catch
652
653 # define GATEXX_TRY_CATCHINFO(exceptionInfoRef, codeblock) \
654 try { \
655 codeblock ; \
656 exceptionInfoRef = ExceptionInfo(); \
657 } \
658 catch(...) { \
659 exceptionInfoRef = Catch::currentException(); \
660 }
661
662 # define GATEXX_TRY_IGNORE(codeblock) \
663 try { \
664 codeblock ; \
665 } \
666 catch(...) { }
667
668 # define GATEXX_TRY_CATCHALL(trycode, catchcode) \
669 try { \
670 trycode ; \
671 } catch (...) { \
672 catchcode ; \
673 }
674
675 # define GATEXX_RETHROW throw
676
677 #endif
678
679 } // end if namespace gate
680
681 #endif
682