blob: 5c01c7a3f2e13c3297e3185fd9a684b400373dd9 (
plain)
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
|
<html>
<head>
<title>Apache Qpid : CppApiGuide</title>
<link rel="stylesheet" href="styles/site.css" type="text/css" />
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
<tr>
<td valign="top" class="pagebody">
<div class="pageheader">
<span class="pagetitle">
Apache Qpid : CppApiGuide
</span>
</div>
<div class="pagesubheading">
This page last changed on Sep 26, 2007 by <font color="#0050B2">gsim@redhat.com</font>.
</div>
<h1><a name="CppApiGuide-C%5CpublicAPIguidelines."></a>C++ public API guidelines.</h1>
<p>These guidelines are for the public client API to be released in qpid 1.0. The "plugin" API exposed for bdbstore should eventually follow these guidelines but it can be deferred.</p>
<h2><a name="CppApiGuide-Publicheaderfiles"></a>Public header files</h2>
<p>Public headers under: qpid/cpp/src/include </p>
<p>Non-unit client tests should be built with -I include and <em>without</em> -I . so that missing public headers can be quickly identified.</p>
<p> Only src/include headers are installed with package qpidc-devel. Package qpidd-devel should only install src/include headers, but for 1.0 it may still install private headers.</p>
<h2><a name="CppApiGuide-PIMPLidiom"></a>PIMPL idiom</h2>
<p>Value classes needed by the user (e.g. framing data types, message content) are exposed as normal classes in public headers.</p>
<p>Service classes (e.g. Session, Connection etc) use the pimpl idiom for compatibility isolation. See <a href="http://en.wikipedia.org/wiki/Pimpl" title="Visit page outside Confluence">http://en.wikipedia.org/wiki/Pimpl</a>.</p>
<h2><a name="CppApiGuide-Threadsafety"></a>Thread safety</h2>
<p>I believe making the session thread safe will make it simpler to use in various circumstances (some of which may be unforeseen). I don't think it necessarily adds significant overhead (though this is something we can verify).</p>
<div class="tabletitle">
<a name="comments">Comments:</a>
</div>
<table border="0" width="100%">
<tr>
<td >
<a name="comment-66761"></a>
<font class="smallfont"><p>= Namespaces in Client Applications =</p>
<p>Currently, a client application needs the following namespaces:</p>
<p>using namespace qpid::client;<br/>
using namespace qpid::framing;</p>
<p>Why should someone writing a client application need to know about the framing namespace? And is 'framing' really the best name to describe this namespace?</p></font>
<div align="left" class="smallfont" style="color: #666666; width: 98%; margin-bottom: 10px;">
<img src="icons/comment_16.gif" height="16" width="16" border="0" align="absmiddle"/>
Posted by jonathan.robie@redhat.com at Sep 20, 2007 06:58
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="12" background="border/border_bottom.gif"><img src="border/spacer.gif" width="1" height="1" border="0"/></td>
</tr>
<tr>
<td align="center"><font color="grey">Document generated by Confluence on Apr 22, 2008 02:47</font></td>
</tr>
</table>
</body>
</html>
|