-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config_8hpp.html
181 lines (155 loc) · 10.4 KB
/
Config_8hpp.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<html>
<head>
<meta name="keywords" content="0MQ, ZeroMQ, C++, multipart, message, library, open source, ZmqMessage" />
<meta name="description" content="ZmqMessage is free open source C++ library for sending and receiving ZeroMQ multipart messages"/>
<meta name="google-site-verification" content="0EvtpfjffSrc0fDV9ubKQVfq3IV55KY5d59hXHg9M34" />
<title>ZmqMessage: include/zmqmessage/Config.hpp File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<style>
/* must override a few items to get the style background color */
</style>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-25607292-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<table class="zm_headbar">
<tr>
<td>
<span><a href="index.html">Overview</a></span>
<span><a href="zm_tutorial.html">Tutorial</a></span>
<span><a href="namespaceZmqMessage.html">API reference</a></span>
<span><a href="examples.html">Examples</a></span>
<span><a href="zm_build.html">Build</a></span>
<span><a href="https://github.com/zmqmessage/zmqmessage/">Download</a></span>
</td>
<td align="right" class="zm_greynote">ZmqMessage 0.1 - 21 Oct 2011</td>
</tr></table>
<hr style="height: 3px;">
<!-- Generated by Doxygen 1.4.7 -->
<h1>include/zmqmessage/Config.hpp File Reference</h1>Basic compile time configurations for <a class="el" href="namespaceZmqMessage.html">ZmqMessage</a> library. <a href="#_details">More...</a>
<p>
<code>#include "zmq.hpp"</code><br>
<code>#include <string></code><br>
<code>#include <stdexcept></code><br>
<p>
<a href="Config_8hpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceZmqMessage.html">ZmqMessage</a></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classZmqMessage_1_1DefaultExceptionTemplate.html">ZmqMessage::DefaultExceptionTemplate< Tag ></a></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="Config_8hpp.html#4c1baa6349b90bb0dc128873a3c282fc">ZMQMESSAGE_STRING_CLASS</a> std::string</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="Config_8hpp.html#8769c6cb38fa7dba84a6554cbb8641e8">ZMQMESSAGE_LOG_STREAM_NONE</a> if(1); else std::cerr</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="Config_8hpp.html#8e9c1420bf7e575af14c594795c4d9c0">ZMQMESSAGE_LOG_TERM</a> std::endl</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="Config_8hpp.html#437a821081a9a1d4a9e4515afcc76a17">ZMQMESSAGE_EXCEPTION_MACRO</a>(name)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="Config_8hpp.html#520d00f537999b0db0acbdce717acb56">ZMQMESSAGE_WRAP_ZMQ_ERROR</a> 1</td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef zmq::error_t </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceZmqMessage.html#b6d56fe86e2309d7182d41d2e0f3c76a">ZmqMessage::ZmqErrorType</a></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceZmqMessage.html#c7ae57b28bfcee4a53aa803974d11331">ZmqMessage::throw_zmq_error</a> (const char *err)</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Basic compile time configurations for <a class="el" href="namespaceZmqMessage.html">ZmqMessage</a> library.
<p>
Copyright (c) 2010-2011 Phorm, Inc. GNU LGPL v 3.0, see <a href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html">http://www.gnu.org/licenses/lgpl-3.0-standalone.html</a> <dl compact><dt><b>Author:</b></dt><dd>Andrey Skryabin <<a href="mailto:[email protected]">[email protected]</a>>, et al. </dd></dl>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="437a821081a9a1d4a9e4515afcc76a17"></a><!-- doxytag: member="Config.hpp::ZMQMESSAGE_EXCEPTION_MACRO" ref="437a821081a9a1d4a9e4515afcc76a17" args="(name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ZMQMESSAGE_EXCEPTION_MACRO </td>
<td>(</td>
<td class="paramtype">name </td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment"><span class="keyword">class </span>name##_tag {}; \
typedef ::ZmqMessage::DefaultExceptionTemplate<name##_tag> name
</pre></div>Macro to generate exception class definition by exception name. It enables you to adapt <a class="el" href="namespaceZmqMessage.html">ZmqMessage</a> to you application exception policy (and hierarchy). By default, we generate simple derivative from std::logic_error. Note, that final semicolon (';') will be appended at end where macro is used, so it's not needed in macro definition. Note, that this constant is overridable either for application builds without shared library or during compiling shared library.
</div>
</div><p>
<a class="anchor" name="8769c6cb38fa7dba84a6554cbb8641e8"></a><!-- doxytag: member="Config.hpp::ZMQMESSAGE_LOG_STREAM_NONE" ref="8769c6cb38fa7dba84a6554cbb8641e8" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ZMQMESSAGE_LOG_STREAM_NONE if(1); else std::cerr </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Use this constant to disable logging completely. <div class="fragment"><pre class="fragment"><span class="preprocessor"> #define ZMQMESSAGE_LOG_STREAM ZMQMESSAGE_LOG_STREAM_NONE</span>
</pre></div>
</div>
</div><p>
<a class="anchor" name="8e9c1420bf7e575af14c594795c4d9c0"></a><!-- doxytag: member="Config.hpp::ZMQMESSAGE_LOG_TERM" ref="8e9c1420bf7e575af14c594795c4d9c0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ZMQMESSAGE_LOG_TERM std::endl </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Streamable literal that is appended (<<) to every log record. If your logging system doesn-t require terminal (such as new line) you can <div class="fragment"><pre class="fragment"><span class="preprocessor"> #define ZMQMESSAGE_LOG_TERM ""</span>
</pre></div> Note, that this constant is overridable either for application builds without shared library or during compiling shared library. Defining this setting in your application headers during building with shared library takes no effect.
</div>
</div><p>
<a class="anchor" name="4c1baa6349b90bb0dc128873a3c282fc"></a><!-- doxytag: member="Config.hpp::ZMQMESSAGE_STRING_CLASS" ref="4c1baa6349b90bb0dc128873a3c282fc" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ZMQMESSAGE_STRING_CLASS std::string </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Class that is default string representation. Must satisfy the requirements of the string concept. String concept requires a class to be both constructible on const char* and size_t and have data() and length() accessor methods: <div class="fragment"><pre class="fragment"> <span class="keyword">class </span>MyString
{
MyString(<span class="keyword">const</span> <span class="keywordtype">char</span>*, size_t);
<span class="keyword">const</span> <span class="keywordtype">char</span>* data() <span class="keyword">const</span>;
size_t length() <span class="keyword">const</span>;
};
</pre></div> It's possible (and desirable) for it not to copy and own the memory, but just wrap the external memory region. For example, take a look at <a class="el" href="classStringFace.html">StringFace</a> class from examples. By default, std::string is used. You may define this setting both if you are linking against shared library or using library as built-in (see <a class="el" href="zm_tutorial.html#ref_linking_options">linking options</a>)
</div>
</div><p>
<a class="anchor" name="520d00f537999b0db0acbdce717acb56"></a><!-- doxytag: member="Config.hpp::ZMQMESSAGE_WRAP_ZMQ_ERROR" ref="520d00f537999b0db0acbdce717acb56" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ZMQMESSAGE_WRAP_ZMQ_ERROR 1 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
if defined, <code>zmq::error_t</code> will be wrapped with exception generated according to <a class="el" href="Config_8hpp.html#437a821081a9a1d4a9e4515afcc76a17">ZMQMESSAGE_EXCEPTION_MACRO</a> and named <code>ZmqException</code>. Otherwise, it's thrown upwards as is. For non header-only builds must be the same in shared library and client code, just like <a class="el" href="Config_8hpp.html#437a821081a9a1d4a9e4515afcc76a17">ZMQMESSAGE_EXCEPTION_MACRO</a>
</div>
</div><p>
<hr style="height: 3px;">
<div class="zm_greynote">
ZmqMessage 0.1 — open source software, <a href="mailto:[email protected]">[email protected]</a>
</div>
</body>
</html>