Share Library (C++)
Detail souboru
Zdrojový kód
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ShareLibrary: Share::SharedSegment Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.2 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div class="nav">
<a class="el" href="namespaceShare.html">Share</a>::<a class="el" href="classShare_1_1SharedSegment.html">SharedSegment</a></div>
<h1>Share::SharedSegment Class Reference<br>
<small>
[<a class="el" href="group__backend.html">Internal library classes</a>]</small>
</h1><!-- doxytag: class="Share::SharedSegment" -->Platform independent shared segment representation.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="SharedSegment_8h-source.html">SharedSegment.h</a>></code>
<p>
<a href="classShare_1_1SharedSegment-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classShare_1_1SharedSegment.html#f76d62c2fee51190a95b28ced330a546">SharedSegment</a> (const char *name, size_t size) throw (ShareException)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight"><b>Create</b> <b>and</b> <b>attach</b> new shared segment with given name and size. <a href="#f76d62c2fee51190a95b28ced330a546"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classShare_1_1SharedSegment.html#971ccf6b9e91d369a5a6174053ea8fcc">SharedSegment</a> (const char *name) throw (ShareException)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Attach to already existing shared segment. <a href="#971ccf6b9e91d369a5a6174053ea8fcc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classShare_1_1SharedSegment.html#dba89073f74148a74c4fcb903093449c">~SharedSegment</a> () throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Detach from shared segment. <a href="#dba89073f74148a74c4fcb903093449c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classShare_1_1SharedSegment.html#2c0f33002b07e8d03074d9c202edd69a">name</a> () const</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight"><dl class="return" compact><dt><b>Returns:</b></dt><dd>Return name of shared segment. </dd></dl>
<a href="#2c0f33002b07e8d03074d9c202edd69a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classShare_1_1SharedSegment.html#80325577f1be0f6cc94eb598923b3510">atAddress</a> () const</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight"><dl class="return" compact><dt><b>Returns:</b></dt><dd>Return attached shared segment address. </dd></dl>
<a href="#80325577f1be0f6cc94eb598923b3510"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classShare_1_1SharedSegment.html#163d57fcad780c64f8dd9719096220a5">destroy</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy shared segment. <a href="#163d57fcad780c64f8dd9719096220a5"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Platform independent shared segment representation.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Implementation of this class was taken from <b>MSDTk</b>. </dd></dl>
<p>
<p>
Definition at line <a class="el" href="SharedSegment_8h-source.html#l00036">36</a> of file <a class="el" href="SharedSegment_8h-source.html">SharedSegment.h</a>.<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="f76d62c2fee51190a95b28ced330a546"></a><!-- doxytag: member="Share::SharedSegment::SharedSegment" ref="f76d62c2fee51190a95b28ced330a546" args="(const char *name, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Share::SharedSegment::SharedSegment </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"> throw (<a class="el" href="classShare_1_1ShareException.html">ShareException</a>)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Create</b> <b>and</b> <b>attach</b> new shared segment with given name and size.
<p>
If segment with given name already exists, <a class="el" href="classShare_1_1ShareException.html" title="General exception carrying text message inside.">ShareException</a> is thrown. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>Name of segment created. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>Size of segment created. This size is fixed in this version of library. </td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classShare_1_1ShareException.html" title="General exception carrying text message inside.">ShareException</a></em> </td><td>Library-specific exception derived from std::bad_alloc </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="971ccf6b9e91d369a5a6174053ea8fcc"></a><!-- doxytag: member="Share::SharedSegment::SharedSegment" ref="971ccf6b9e91d369a5a6174053ea8fcc" args="(const char *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Share::SharedSegment::SharedSegment </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>name</em> </td>
<td> ) </td>
<td width="100%"> throw (<a class="el" href="classShare_1_1ShareException.html">ShareException</a>)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Attach to already existing shared segment.
<p>
If segment with given name does not exists, <a class="el" href="classShare_1_1ShareException.html" title="General exception carrying text message inside.">ShareException</a> is thrown. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>Name of shared segment to attach to. </td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classShare_1_1ShareException.html" title="General exception carrying text message inside.">ShareException</a></em> </td><td>Library-specific exception derived from std::bad_alloc </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="dba89073f74148a74c4fcb903093449c"></a><!-- doxytag: member="Share::SharedSegment::~SharedSegment" ref="dba89073f74148a74c4fcb903093449c" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Share::SharedSegment::~SharedSegment </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"> throw ()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Detach from shared segment.
<p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="2c0f33002b07e8d03074d9c202edd69a"></a><!-- doxytag: member="Share::SharedSegment::name" ref="2c0f33002b07e8d03074d9c202edd69a" args="() const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* Share::SharedSegment::name </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return name of shared segment. </dd></dl>
<p>
<p>
Definition at line <a class="el" href="SharedSegment_8h-source.html#l00064">64</a> of file <a class="el" href="SharedSegment_8h-source.html">SharedSegment.h</a>.
</div>
</div><p>
<a class="anchor" name="80325577f1be0f6cc94eb598923b3510"></a><!-- doxytag: member="Share::SharedSegment::atAddress" ref="80325577f1be0f6cc94eb598923b3510" args="() const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* Share::SharedSegment::atAddress </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return attached shared segment address. </dd></dl>
<p>
<p>
Definition at line <a class="el" href="SharedSegment_8h-source.html#l00069">69</a> of file <a class="el" href="SharedSegment_8h-source.html">SharedSegment.h</a>.
</div>
</div><p>
<a class="anchor" name="163d57fcad780c64f8dd9719096220a5"></a><!-- doxytag: member="Share::SharedSegment::destroy" ref="163d57fcad780c64f8dd9719096220a5" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Share::SharedSegment::destroy </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Destroy shared segment.
<p>
<dl class="attention" compact><dt><b>Attention:</b></dt><dd>On Win32 platform is segment destoroyed automatically by OS, when there are no more references to segment. </dd></dl>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>sharelib/<a class="el" href="SharedSegment_8h-source.html">SharedSegment.h</a></ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 26 17:43:02 2007 for ShareLibrary by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
</body>
</html>