COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
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[](int i) const;
62  int holds_object(int);
63  int grow(ApplicationProcess *a, int s); // __alpha
64  void set(int i, const coDistributedObject *elem);
65  void print();
66 };
67 }
68 #endif
~coShmPtrArray()
Definition: coShmPtrArray.h:60
void setPtr(int no, int o)
Definition: coShmPtrArray.h:51
coShmPtrArray()
Definition: coShmPtrArray.h:40
Definition: covise_shm.h:481
Definition: coShmPtrArray.h:37
GLdouble s
Definition: khronos-glext.h:6441
const int SHMPTRARRAY
Definition: covise_shm.h:122
Definition: covise_appproc.h:19
GLboolean GLboolean GLboolean GLboolean a
Definition: khronos-glext.h:6895
#define DOEXPORT
Definition: coExport.h:307
GLenum type
Definition: khronos-glext.h:6279
coShmPtrArray(int no, int o)
Definition: coShmPtrArray.h:42
Definition: coDistributedObject.h:295
void print_exit(int line, const char *filename, int how)
Definition: coLog.cpp:69
void setPtr(int no, shmSizeType o)
Definition: covise_shm.h:537