File: Poco.SharedMemory.html

package info (click to toggle)
poco-doc 1.3.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 10,076 kB
  • ctags: 9,611
  • sloc: makefile: 31
file content (101 lines) | stat: -rw-r--r-- 7,081 bytes parent folder | download | duplicates (2)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::SharedMemory</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.html" class="namespace">Poco</a></h1>
<h1 class="symbol">class SharedMemory</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Foundation<br />
<b>Package:</b> Processes<br />
<b>Header:</b> Poco/SharedMemory.h</p>
<h2>Description</h2>
<div class="description">
<p>Create and manage a shared memory object. </p>
<p>A <a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a> object has value semantics, but is implemented using a handle/implementation idiom. Therefore, multiple <a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a> objects can share a single, reference counted SharedMemoryImpl object. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.SharedMemory.html#9944" title="Poco::SharedMemory::begin()">begin</a>, <a href="Poco.SharedMemory.html#9945" title="Poco::SharedMemory::end()">end</a>, <a href="Poco.SharedMemory.html#9940" title="Poco::SharedMemory::operator =()">operator&nbsp;=</a>, <a href="Poco.SharedMemory.html#9942" title="Poco::SharedMemory::swap()">swap</a></p>
<h2>Enumerations</h2>
<h3><a name="9923">AccessMode</a></h3>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="9924">AM_READ</a> = 0</p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="9925">AM_WRITE</a></p>
<div class="description">
<p></p>
</div>
<h2>Constructors</h2>
<h3><a name="9926">SharedMemory</a></h3>
<p class="decl"><a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a>();</p>
<div class="description">
<p>Default constructor creates an unmapped <a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a> object.  No clients can connect to an unmapped <a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a> object. </p>
</div>
<h3><a name="9937">SharedMemory</a></h3>
<p class="decl"><a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a> &amp; other<br />);</p>
<div class="description">
<p>Creates a <a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a> object by copying another one. </p>
</div>
<h3><a name="9933">SharedMemory</a></h3>
<p class="decl"><a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.File.html" title="class Poco::File">File</a> &amp; file,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.SharedMemory.html#9923" title="enum  Poco::SharedMemory::AccessMode">AccessMode</a> mode,<br />&nbsp;&nbsp;&nbsp;&nbsp;const void * addrHint = 0<br />);</p>
<div class="description">
<p>Maps the entire contents of file into a shared memory segment. </p>
<p>An address hint can be passed to the system, specifying the desired start address of the shared memory area. Whether the hint is actually honored is, however, up to the system. Windows platform will generally ignore the hint. </p>
</div>
<h3><a name="9927">SharedMemory</a></h3>
<p class="decl"><a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; name,<br />&nbsp;&nbsp;&nbsp;&nbsp;std::size_t size,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.SharedMemory.html#9923" title="enum  Poco::SharedMemory::AccessMode">AccessMode</a> mode,<br />&nbsp;&nbsp;&nbsp;&nbsp;const void * addrHint = 0,<br />&nbsp;&nbsp;&nbsp;&nbsp;bool server = true<br />);</p>
<div class="description">
<p>Creates or connects to a shared memory object with the given name. </p>
<p>For maximum portability, name should be a valid Unix filename and not contain any slashes or backslashes. </p>
<p>An address hint can be passed to the system, specifying the desired start address of the shared memory area. Whether the hint is actually honored is, however, up to the system. Windows platform will generally ignore the hint. </p>
<p>If server is set to false, the shared memory region will be unlinked by calling shm_unlink (on POSIX platforms) when the <a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a> object is destroyed. The server parameter is ignored on Windows platforms. </p>
</div>
<h2>Destructor</h2>
<h3><a name="9939">~SharedMemory</a></h3>
<p class="decl">~<a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="9944">begin</a></h3>
<p class="decl">char * begin() const;</p>
<div class="description">
<p>Returns the start address of the shared memory segment. Will be NULL for illegal segments. </p>
</div>
<h3><a name="9945">end</a></h3>
<p class="decl">char * end() const;</p>
<div class="description">
<p>Returns the one-past-end end address of the shared memory segment.  Will be NULL for illegal segments. </p>
</div>
<h3><a name="9940">operator =</a></h3>
<p class="decl"><a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a> &amp; operator = (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a> &amp; other<br />);</p>
<div class="description">
<p>Assigns another <a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a> object. </p>
</div>
<h3><a name="9942">swap</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void swap(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a> &amp; other<br />);</p>
<div class="description">
<p>Swaps the <a href="Poco.SharedMemory.html" title="class Poco::SharedMemory">SharedMemory</a> object with another one. </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>