COVISE Core
coShmPtrArray.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef SHM_PTR_ARRAY_H
9 #define SHM_PTR_ARRAY_H
10 
11 #include <covise/covise.h>
12 #include <util/coExport.h>
13 
14 #if !defined(_WIN32)
15 #define SHARED_MEMORY
16 #endif
17 
18 #ifdef _CRAYT3E
19 #define HANDLE unsigned int
20 #endif
21 
22 #include <util/coTypes.h>
23 
24 #include <util/covise_list.h>
25 #include <covise/covise_global.h>
26 #include <shm/covise_shm.h>
27 #ifdef _WIN32
28 #include <windows.h>
29 #include <windowsx.h>
30 #endif
31 
32 namespace covise
33 {
34 
35 class ApplicationProcess;
36 
38 {
39 public:
41  : coShmArray(){};
42  coShmPtrArray(int no, int o)
43  : coShmArray(no, o)
44  {
45  if (type != SHMPTRARRAY)
46  {
47  cerr << "wrong type in coShmPtrArray constructor from shared memory\n";
48  print_exit(__LINE__, __FILE__, 1);
49  }
50  };
51  void setPtr(int no, int o)
52  {
53  coShmArray::setPtr(no, o);
54  if (type != SHMPTRARRAY)
55  {
56  cerr << "wrong type in coShmPtrArray constructor from shared memory\n";
57  print_exit(__LINE__, __FILE__, 1);
58  }
59  };
61  const coDistributedObject *operator[](unsigned int i) const;
62  int holds_object(int);
63  int grow(ApplicationProcess *a, unsigned int s); // __alpha
64  void set(int i, const coDistributedObject *elem);
65  void print();
66 };
67 }
68 #endif
void setPtr(int no, shmSizeType o)
Definition: covise_shm.h:537
~coShmPtrArray()
Definition: coShmPtrArray.h:60
Definition: covise_appproc.h:19
GLdouble s
Definition: khronos-glext.h:6441
Definition: covise_shm.h:481
void print_exit(int line, const char *filename, int how)
Definition: coLog.cpp:69
GLenum type
Definition: khronos-glext.h:6279
const int SHMPTRARRAY
Definition: covise_shm.h:122
void setPtr(int no, int o)
Definition: coShmPtrArray.h:51
Definition: coShmPtrArray.h:37
Definition: coDistributedObject.h:295
coShmPtrArray()
Definition: coShmPtrArray.h:40
coShmPtrArray(int no, int o)
Definition: coShmPtrArray.h:42
#define DOEXPORT
Definition: coExport.h:331
GLboolean GLboolean GLboolean GLboolean a
Definition: khronos-glext.h:6895
std::enable_if< I==sizeof...(Tp), void >::type print(Stream &s, const std::tuple< Tp... > &t)
Definition: tokenbuffer_util.h:68
list of all chemical elements
Definition: coConfig.h:26