VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vlShmPool.h
Go to the documentation of this file.
1 /*********************************************************************
2  ** Copyright (c) 1992-2010 VT MAK
3  ** All rights reserved.
4  *********************************************************************/
9 #pragma once
10 
11 #include "vlString.h"
12 
13 
14 #ifdef _WIN32
15 #include <WinSock2.h>
16 #else
17 #include <sys/types.h>
18 #endif
19 
20 #ifdef DtUSE_UTILITIES_NAMESPACE
21 namespace DtUSE_UTILITIES_NAMESPACE
22 {
23 #endif
24 
25 #ifndef _WIN32
26 key_t DtGetShmKeyFromString(const DtString& name);
27 #endif
28 
36 {
37 public:
38 
44  DtSharedMemoryPoolManager(const DtString& shared_name, unsigned long size);
45 
47  virtual ~DtSharedMemoryPoolManager();
48 
49 private:
54 
55 public:
57  void *address() const;
58 
59 protected:
60 
62  void *myAddr;
63 
64 #ifdef _WIN32
65  HANDLE myMapFile;
66 #else
67  int myId;
68 #endif
69 
70 };
71 
79 {
80 
81 public:
82 
85  DtSharedMemoryPoolClient(const DtString& shared_name);
86 
89  virtual ~DtSharedMemoryPoolClient();
90 
91 private:
92 
95 
97  DtSharedMemoryPoolClient& operator=(const DtSharedMemoryPoolClient &other);
98 
99 public:
100 
102  void *address() const;
103 
104 protected:
105 
107  void *myAddr;
108 #ifdef _WIN32
109  HANDLE myMapFile;
110 #else
111  int myId;
112 #endif
113 };
114 
115 #ifdef DtUSE_UTILITIES_NAMESPACE
116 }
117 #endif
118 

Document ID: Generated on Fri May 15 06:36:13 EDT 2015 from SVN revision 153263
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)