annotate OrthancCppClient/SharedLibrary/Laaw/laaw/laaw.h @ 1382:1cd2e09cb0e5

case insensitive search by default
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 29 May 2015 14:46:06 +0200
parents d380222b4c2a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
528
a65f808de5bd packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 496
diff changeset
2 * Laaw - Lightweight, Automated API Wrapper
a65f808de5bd packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 496
diff changeset
3 * Copyright (C) 2010-2013 Jomago - Alain Mazy, Benjamin Golinvaux,
a65f808de5bd packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 496
diff changeset
4 * Sebastien Jodogne
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 *
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 * This program is free software: you can redistribute it and/or
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * modify it under the terms of the GNU General Public License as
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * published by the Free Software Foundation, either version 3 of the
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * License, or (at your option) any later version.
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 *
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * In addition, as a special exception, the copyright holders of this
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * program give permission to link the code of its release with the
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * that use the same license as the "OpenSSL" library), and distribute
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * the linked executables. You must obey the GNU General Public License
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * in all respects for all of the code used other than "OpenSSL". If you
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * modify file(s) with this exception, you may extend this exception to
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * your version of the file(s), but you are not obligated to do so. If
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * you do not wish to do so, delete this exception statement from your
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * version. If you delete this exception statement from all source files
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * in the program, then also delete it here.
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 *
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 * This program is distributed in the hope that it will be useful, but
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * WITHOUT ANY WARRANTY; without even the implied warranty of
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * General Public License for more details.
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 *
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 * You should have received a copy of the GNU General Public License
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * along with this program. If not, see <http://www.gnu.org/licenses/>.
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 **/
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 #pragma once
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 #include "laaw-exports.h"
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 #include <stddef.h>
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 #include <string>
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 #if (LAAW_PARSING == 1)
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 #define LAAW_API __attribute__((deprecated("")))
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 #define LAAW_API_INTERNAL __attribute__((deprecated("")))
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 #define LAAW_API_OVERLOAD(name) __attribute__((deprecated("")))
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 #define LAAW_API_PROPERTY __attribute__((deprecated("")))
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 #define LAAW_API_STATIC_CLASS __attribute__((deprecated("")))
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 #define LAAW_API_CUSTOM(name, value) __attribute__((deprecated("")))
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 #else
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 #define LAAW_API
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 #define LAAW_API_INTERNAL
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 #define LAAW_API_OVERLOAD(name)
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 #define LAAW_API_PROPERTY
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 #define LAAW_API_STATIC_CLASS
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 #define LAAW_API_CUSTOM(name, value)
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 #endif
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 namespace Laaw
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 {
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 /**
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 * This is the base class from which all the public exceptions in
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 * the SDK should derive.
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 **/
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 class LaawException
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 {
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 private:
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 std::string what_;
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 public:
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 LaawException()
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 {
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 }
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 LaawException(const std::string& what) : what_(what)
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 {
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 }
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 LaawException(const char* what) : what_(what)
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 {
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 }
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 virtual const char* What() const
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 {
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 return what_.c_str();
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 }
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 };
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 }