COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
covise_shm.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 EC_SHM_H
9 #define EC_SHM_H
10 
11 #include <covise/covise.h>
12 
13 #if !defined(_WIN32)
14 #define SHARED_MEMORY
15 #endif
16 
17 #ifdef _CRAYT3E
18 #define HANDLE unsigned int
19 #endif
20 
21 #include <util/coTypes.h>
22 #include <util/coLog.h>
23 
24 #include <util/covise_list.h>
25 //#include <net/covise_msg.h>
26 #include <net/message.h>
27 #include <covise/covise_global.h>
28 #ifdef _WIN32
29 #include <windows.h>
30 #include <windowsx.h>
31 #endif
32 
33 /***********************************************************************\
34  ** **
35  ** Shared Memory Classes Version: 2.0 **
36  ** **
37  ** **
38  ** Description : All classes that deal with the creation and **
39  ** administration of shared memory. **
40  ** The SharedMemory class handles the operating system **
41  ** part of the shared memory management. **
42  ** is a utility class to organize the used **
43  ** and unused parts of the shared memory. **
44  ** ShmAccess allows only the access to the shared **
45  ** memory areas, not the allocation or return of **
46  ** allocated regions. **
47  ** coShmAlloc does all the administration of the shared **
48  ** memory regions, using trees with nodes which point **
49  ** to used and free parts. Here all allocation of **
50  ** regions in the shared memory takes place. **
51  ** coShmPtr and its subclassses provide an easy **
52  ** access to and initialization of pointers in **
53  ** the shared memory areas. **
54  ** **
55  ** Classes : SharedMemory, ShmAccess, coShmAlloc, **
56  ** coShmPtr, coCharcoShmPtr, coShortcoShmPtr, coIntcoShmPtr, **
57  ** LongcoShmPtr, coFloatcoShmPtr, DoublecoShmPtr **
58  ** **
59  ** Copyright (C) 1993 by University of Stuttgart **
60  ** Computer Center (RUS) **
61  ** Allmandring 30 **
62  ** 7000 Stuttgart 80 **
63  ** **
64  ** **
65  ** Author : A. Wierse (RUS) **
66  ** **
67  ** History : **
68  ** 15.04.93 Ver 1.0 **
69  ** 26.05.93 Ver 2.0 design reworked, basic data **
70  ** types clarified, compound data **
71  ** types added. **
72  ** **
73 \***********************************************************************/
74 namespace covise
75 {
76 class SharedMemory;
77 class DataManagerProcess;
78 
79 const int SIZEOF_ALIGNMENT = 8;
80 
82 {
83  ACC_DENIED = 0x0,
84  ACC_NONE = 0x1,
90 };
91 
92 // IDs for the data type encoding (for IPC)
93 #ifndef YAC
94 const int NONE = 0;
95 //const int CHAR = 1;
96 //const int SHORT = 2;
97 //const int INT = 3;
98 //const int LONG = 4;
99 //const int FLOAT = 5;
100 //const int DOUBLE = 6;
101 //const int CHARSHMPTR = 7;
102 //const int SHORTSHMPTR = 8;
103 //const int INTSHMPTR = 9;
104 //const int LONGSHMPTR = 10;
105 //const int FLOATSHMPTR = 11;
106 //const int DOUBLESHMPTR = 12;
107 const int CHARSHMARRAY = 13;
108 const int SHORTSHMARRAY = 14;
109 const int INTSHMARRAY = 15;
110 #ifdef __GNUC__
111 #undef LONGSHMARRAY
112 #endif
113 const int LONGSHMARRAY = 16;
114 const int FLOATSHMARRAY = 17;
115 const int DOUBLESHMARRAY = 18;
116 const int EMPTYCHARSHMARRAY = 13 | 0x80;
117 const int EMPTYSHORTSHMARRAY = 14 | 0x80;
118 const int EMPTYINTSHMARRAY = 15 | 0x80;
119 const int EMPTYLONGSHMARRAY = 16 | 0x80;
120 const int EMPTYFLOATSHMARRAY = 17 | 0x80;
121 const int EMPTYDOUBLESHMARRAY = 18 | 0x80;
122 const int SHMPTRARRAY = 19;
123 const int CHARSHM = 20;
124 const int SHORTSHM = 21;
125 const int INTSHM = 22;
126 #ifdef __GNUC__
127 #undef LONGSHM
128 #endif
129 const int LONGSHM = 23;
130 const int FLOATSHM = 24;
131 const int DOUBLESHM = 25;
132 const int USERDEFINED = 26;
133 const int SHMPTR = 27;
134 const int COVISE_OBJECTID = 28;
135 const int DISTROBJ = 29;
136 const int STRINGSHMARRAY = 30;
137 const int STRING = 31; // CHARPTR == STRING
138 const int UNKNOWN = 37;
139 const int COVISE_NULLPTR = 38;
140 const int COVISE_OPTIONAL = 39;
141 const int I_SLIDER = 40;
142 const int F_SLIDER = 41;
143 const int PER_FACE = 42;
144 const int PER_VERTEX = 43;
145 const int OVERALL = 44;
146 const int FLOAT_SLIDER = 45;
147 const int FLOAT_VECTOR = 46;
148 const int COVISE_BOOLEAN = 47;
149 const int BROWSER = 48;
150 const int CHOICE = 49;
151 const int FLOAT_SCALAR = 50;
152 const int COMMAND = 51;
153 const int MMPANEL = 52;
154 const int TEXT = 53;
155 const int TIMER = 54;
156 const int PASSWD = 55;
157 const int CLI = 56;
158 const int ARRAYSET = 57;
159 // do not exceed 127 (see EMPTY... = | 0x80)
160 const int COLORMAP_MSG = 58;
161 const int INT_SLIDER = 59;
162 const int INT_SCALAR = 60;
163 const int INT_VECTOR = 61;
164 const int COLOR_MSG = 62;
165 const int COLORMAPCHOICE_MSG = 63;
166 const int MATERIAL_MSG = 64;
167 
168 #endif
169 
170 const int START_EVEN = 0;
171 const int START_ODD = 4;
172 
173 const int OBJ_OVERWRITE = 0;
174 const int OBJ_NO_OVERWRITE = 1;
175 
176 const int SET_CREATE = 0;
177 
179 {
180 public:
182  {
183  }
185  {
186  }
187  char *ptr;
188  int fd;
189  long size;
190  void print()
191  {
192  }
193 };
194 
196 {
197 public:
199  static void *large_new(long size);
200  static void large_delete(void *);
201 };
202 typedef unsigned int shmSizeType;
203 typedef unsigned int ArrayLengthType;
204 typedef void(shmCallback)(int shmKey, shmSizeType size, char *address);
205 
207 
209 {
211  friend class DataManagerProcess;
212  static class SharedMemory **shm_array;
214  static int global_seq_no;
216 #if defined SHARED_MEMORY
217  int shmfd; // POSIX shared memory
218  int shmid; // SysV shared memory
219 #elif defined(_WIN32)
220  HANDLE handle;
221  HANDLE filemap;
222 #endif
224  char *data;
225  enum state
226  {
230  valid
231  };
233  int key;
234  int seq_no;
235  int noDelete;
236 
237 public:
239  SharedMemory(int shm_key, shmSizeType shm_size, int noDelete = 0);
240  SharedMemory(int *shm_key, shmSizeType shm_size);
241  ~SharedMemory();
242  static shmCallback *shmC;
243 #if defined(__hpux) || defined(_SX)
244  void *get_pointer(int no);
245 #else
246  void *get_pointer(int no)
247  {
249  {
250  return &(shm_array[no - 1]->data[2 * sizeof(int)]);
251  }
252  print_comment(__LINE__, __FILE__, "getting pointer: 0x0");
253  return NULL;
254  };
255 #endif
256  void *get_pointer()
257  {
258  return &(data[2 * sizeof(int)]);
259  };
261  {
262  return next;
263  }
265  {
266  return seq_no;
267  };
269  {
270  return (shmstate == attached);
271  };
272  int detach();
273  int get_key()
274  {
275  return key;
276  };
278  {
279  return size;
280  };
281  void get_shmlist(int *);
282  void print(){};
283  static int num_attached()
284  {
285  return global_seq_no;
286  }
287 };
288 // minimal allocation size for SHM segments - 64 MB
289 
291 {
292 private:
293  ShmConfig();
294  ~ShmConfig();
295  size_t minSegSize;
297 
298 public:
299  static ShmConfig *the();
300  static size_t getMallocSize();
301 };
302 
303 const int MAX_NO_SHM = 1000;
304 
305 const int COMPARE_ADDRESS = 1;
306 const int COMPARE_SIZE = 2;
307 
308 class coShmPtr;
309 class coShmAlloc;
310 
312 {
313 protected:
314  static SharedMemory *shm;
315 
316 public:
317  ShmAccess(int k);
318  ShmAccess(int *k);
319  ShmAccess(char *, int noDelete = 1);
320  ~ShmAccess();
321  void add_new_segment(int k, shmSizeType size);
322  void *get_pointer(int no)
323  {
324  return shm->get_pointer(no);
325  };
326  void *get_pointer()
327  {
328  return shm->get_pointer();
329  };
330  int get_key()
331  {
332  return shm->get_key();
333  };
334 };
335 
336 class PackElement;
337 class coShmPtrArray;
338 class coDistributedObject;
339 
341 {
342  friend int covise_decode_list(List<PackElement> *, char *, DataManagerProcess *, char);
343  friend coShmPtr *covise_extract_list(List<PackElement> *pack_list, char);
344  friend class coShmPtrArray;
345  friend class coDistributedObject; //__alpha
346 protected:
349  int type;
350  void *ptr;
351 
352 public:
354  {
355  shm_seq_no = 0;
356  offset = 0;
357  type = NONE;
358  ptr = NULL;
359  };
361  {
362  return shm_seq_no;
363  };
365  {
366  return offset;
367  };
368  int get_type()
369  {
370  return type;
371  };
372  void *getPtr()
373  {
374  return ptr;
375  };
376  void print();
377 };
378 
380 {
381 protected:
382  friend class ShmMessage;
383  friend class DmgrMessage;
384  friend class coShmAlloc;
385  friend class coDistributedObject;
386  friend class DataManagerProcess;
388  inline void recalc()
389  {
390  if (shmptr == NULL)
391  shmptr = get_shared_memory();
392  ptr = (void *)((char *)shmptr->get_pointer(shm_seq_no) + offset);
393  type = *(int *)ptr; // the type is an integer at the beginning of the memory area
394  };
395 
396 public:
398  : coShmItem(){};
400  {
401  shm_seq_no = no;
402  offset = o;
403  if (!(shm_seq_no == 0 && offset == 0))
404  recalc();
405  };
407  {
408  shm_seq_no = *(int *)msg->data;
409  offset = *(int *)(&msg->data[sizeof(int)]);
410  recalc();
411  };
412  void setPtr(int no, shmSizeType o)
413  {
414  shm_seq_no = no;
415  offset = o;
416  recalc();
417  };
418  void *getDataPtr() const
419  {
420  return (void *)((char *)ptr + sizeof(int)); // extra int is the type
421  };
422  // first integer holds type
423 };
424 
425 template <typename DataType, int typenum>
426 class coDataShm : public coShmPtr
427 {
428 public:
430  {
431  }
433  : coShmPtr(no, o)
434  {
435  if (type != typenum)
436  {
437  cerr << "wrong type from shared memory in coDataShm constructor: was" << type << ", expected " << typenum << endl;
438  print_exit(__LINE__, __FILE__, 1);
439  }
440  };
441  DataType get() const
442  {
443  return *((DataType *)(((char *)ptr) + sizeof(int)));// int is the type
444  }
445  operator DataType() const
446  {
447  return *((DataType *)(((char *)ptr) + sizeof(int)));// extra int is the type
448  }
449  DataType set(DataType val)
450  {
451  return (*((DataType *)(((char *)ptr) + sizeof(int))) = val);// extra int is the type
452  }
453  DataType &operator=(const DataType &c)
454  {
455  return *((DataType *)(((char *)ptr) + sizeof(int))) = c;// extra int is the type
456  }
457  void setPtr(int no, shmSizeType o)
458  {
459  coShmPtr::setPtr(no, o);
460  if (type != typenum)
461  {
462  cerr << "wrong type associated in coDataShm->setPtr: was" << type << ", expected " << typenum << endl;
463  print_exit(__LINE__, __FILE__, 1);
464  }
465  };
466 };
467 
468 INST_TEMPLATE2(template class SHMEXPORT coDataShm<char, CHARSHM>)
469 typedef coDataShm<char, CHARSHM> coCharShm;
470 INST_TEMPLATE2(template class SHMEXPORT coDataShm<short, SHORTSHM>)
471 typedef coDataShm<short, SHORTSHM> coShortShm;
472 INST_TEMPLATE2(template class SHMEXPORT coDataShm<int, INTSHM>)
473 typedef coDataShm<int, INTSHM> coIntShm;
474 INST_TEMPLATE2(template class SHMEXPORT coDataShm<long, LONGSHM>)
475 typedef coDataShm<long, LONGSHM> coLongShm;
476 INST_TEMPLATE2(template class SHMEXPORT coDataShm<float, FLOATSHM>)
477 typedef coDataShm<float, FLOATSHM> coFloatShm;
478 INST_TEMPLATE2(template class SHMEXPORT coDataShm<double, DOUBLESHM>)
479 typedef coDataShm<double, DOUBLESHM> coDoubleShm;
480 
482 {
483 protected:
484  friend class Message;
485  friend class ShmMessage;
486  friend class coShmAlloc;
487  friend class coDistributedObject;
490  inline void recalc()
491  {
492  if (shmptr == NULL)
493  shmptr = get_shared_memory();
494  if (shm_seq_no != 0)
495  {
496  ptr = (void *)((char *)shmptr->get_pointer(shm_seq_no) + offset);
497  type = *(int *)ptr;
498  length = *(int *)((char *)ptr + sizeof(int)); // int type ArrayLengthType length
499  }
500  else
501  {
502  ptr = NULL;
503  type = *(int *)ptr & 0x7F; // empty array here
504  length = 0; // there is no array yet!!
505  }
506  };
507 
508 public:
510  : coShmItem()
511  {
512  length = 0;
513  }
514 
516  {
517  shm_seq_no = no;
518  offset = o;
519  if (!(shm_seq_no == 0 && offset == 0))
520  recalc();
521  }
522 
524  {
525  shm_seq_no = *(int *)msg->data;
526  offset = *(int *)(&msg->data[sizeof(int)]);
527  recalc();
528  }
530  {
531  length = l;
532  }
534  {
535  return length;
536  }
537  void setPtr(int no, shmSizeType o)
538  {
539  shm_seq_no = no;
540  offset = o;
541  recalc();
542  }
543  void *getDataPtr() const
544  {
545  if (ptr)
546  return (void *)((char *)ptr + sizeof(int) + sizeof(ArrayLengthType));
547  // first integer holds type, second holds length
548  else
549  {
550  // inform datamanager that array is needed now!!
551  return NULL; // for now!!
552  }
553  }
554 };
555 
556 template <typename DataType, int typenum>
558 {
559 public:
561  : coShmArray()
562  {
563  }
565  : coShmArray(no, o)
566  {
567  if (type != typenum)
568  {
569  cerr << "wrong type in coDataShmArray constructor from shared memory: expected " << typenum << ", was " << type << endl;
570  print_exit(__LINE__, __FILE__, 1);
571  }
572  }
573  void setPtr(int no, shmSizeType o)
574  {
575  coShmArray::setPtr(no, o);
576  if (type != typenum)
577  {
578  cerr << "wrong type in coDataShmArray->setPtr constructor from shared memory: expected " << typenum << ", was " << type << endl;
579  print_exit(__LINE__, __FILE__, 1);
580  }
581  if (length < 0)
582  {
583  cerr << "error in array length (< 0)\n";
584  }
585  };
586  DataType &operator[](size_t i)
587  {
588  if (i >= 0 && i < length)
589  return ((DataType *)(((char *)ptr) + sizeof(int)+sizeof(ArrayLengthType)))[i];
590  // else
591  cerr << "Access error for coDataShmArray\n"
592  << i << " not in 0.." << length - 1 << endl;
593  assert(i >= 0 && i < length);
594  return null_return;
595  }
596 
597  const DataType &operator[](size_t i) const
598  {
599  if (i >= 0 && i < length)
600  return ((DataType *)(((char *)ptr) + 2 * sizeof(int)))[i];
601  // else
602  cerr << "Access error for coDataShmArray\n"
603  << i << " not in 0.." << length - 1 << endl;
604  assert(i >= 0 && i < length);
605  return null_return;
606  }
607 
608 private:
609  static DataType null_return;
610 };
611 
612 template <typename DataType, int typenum>
614 
615 class SHMEXPORT coCharShmArray : public coDataShmArray<char, CHARSHMARRAY>
616 {
617 public:
619  {
620  }
622  : coDataShmArray<char, CHARSHMARRAY>(no, o)
623  {
624  }
625  int setString(const char *c)
626  {
627  char *chptr = (char *)getDataPtr();
628  if (chptr == NULL)
629  return 0;
630 
631  ArrayLengthType i = 0;
632  while (c[i] != '\0' && i < length)
633  {
634  chptr[i] = c[i];
635  i++;
636  }
637  if (i < length)
638  chptr[i] = '\0';
639  return i;
640  }
641 };
642 
643 INST_TEMPLATE2(template class SHMEXPORT coDataShmArray<short, SHORTSHMARRAY>)
651 INST_TEMPLATE2(template class SHMEXPORT coDataShmArray<double, DOUBLESHMARRAY>)
653 
655 {
656 public:
658  {
659  }
661  : coDataShmArray<char *, STRINGSHMARRAY>(no, o)
662  {
663  }
664  char *operator[](int i);
665  const char *operator[](int i) const;
666  void stringPtrSet(int no, int sn, shmSizeType of)
667  {
668  char *cptr = (char *)ptr;
669  int pos = 2*sizeof(int)/*(seq_nr+key)*/ + no*(sizeof(int)+sizeof(shmSizeType));
670  *((int *)(cptr+pos)) = sn;
671  *((int *)(cptr+pos+sizeof(int))) = of;
672  }
673  void stringPtrGet(int no, int *sn, shmSizeType *of)
674  {
675  char *cptr = (char *)ptr;
676  int pos = 2*sizeof(int)/*(seq_nr+key)*/ + no*(sizeof(int)+sizeof(shmSizeType));
677  *sn = *((int *)(cptr+pos));
678  *of = *((int *)(cptr+pos+sizeof(int)));
679  }
680 };
681 }
682 #endif
const int FLOAT_SLIDER
Definition: covise_shm.h:146
const int SET_CREATE
Definition: covise_shm.h:176
const int EMPTYDOUBLESHMARRAY
Definition: covise_shm.h:121
void * get_pointer(int no)
Definition: covise_shm.h:246
void recalc()
Definition: covise_shm.h:388
static ShmConfig * theShmConfig
Definition: covise_shm.h:296
int get_type()
Definition: covise_shm.h:368
coCharShmArray(int no, shmSizeType o)
Definition: covise_shm.h:621
const DataType & operator[](size_t i) const
Definition: covise_shm.h:597
Definition: covise_shm.h:195
access_type
Definition: covise_shm.h:81
const int EMPTYCHARSHMARRAY
Definition: covise_shm.h:116
#define INST_TEMPLATE2(x, y)
Definition: coExport.h:37
int is_attached()
Definition: covise_shm.h:268
void setPtr(int no, shmSizeType o)
Definition: covise_shm.h:457
const int INT_SLIDER
Definition: covise_shm.h:161
void * get_pointer()
Definition: covise_shm.h:256
const int OBJ_NO_OVERWRITE
Definition: covise_shm.h:174
const int PER_FACE
Definition: covise_shm.h:143
DataType set(DataType val)
Definition: covise_shm.h:449
SharedMemory()
Definition: covise_shm.h:238
const int OVERALL
Definition: covise_shm.h:145
char * ptr
Definition: covise_shm.h:187
Definition: covise_shm.h:178
void * getDataPtr() const
Definition: covise_shm.h:543
const int COVISE_NULLPTR
Definition: covise_shm.h:139
void print()
Definition: covise_shm.h:190
coStringShmArray()
Definition: covise_shm.h:657
Definition: dmgr.h:387
const int COVISE_OBJECTID
Definition: covise_shm.h:134
static int num_attached()
Definition: covise_shm.h:283
shmSizeType size
Definition: covise_shm.h:223
char * data
Definition: covise_shm.h:224
const int SIZEOF_ALIGNMENT
Definition: covise_shm.h:79
const int EMPTYSHORTSHMARRAY
Definition: covise_shm.h:117
Definition: covise_shm.h:481
int type
Definition: covise_shm.h:349
static SharedMemory * shmptr
Definition: covise_shm.h:387
const int PASSWD
Definition: covise_shm.h:156
ArrayLengthType length
Definition: covise_shm.h:488
#define SHMEXPORT
Definition: coExport.h:265
void recalc()
Definition: covise_shm.h:490
int key
Definition: covise_shm.h:233
DataType & operator=(const DataType &c)
Definition: covise_shm.h:453
Definition: coShmPtrArray.h:37
const int TIMER
Definition: covise_shm.h:155
void * get_pointer(int no)
Definition: covise_shm.h:322
coDataShm(int no, shmSizeType o)
Definition: covise_shm.h:432
const int LONGSHMARRAY
Definition: covise_shm.h:113
Definition: covise_shm.h:227
coDataShmArray(int no, shmSizeType o)
Definition: covise_shm.h:564
unsigned int ArrayLengthType
Definition: covise_shm.h:203
static List< MMapEntry > * mmaplist
Definition: covise_shm.h:198
const int CHARSHMARRAY
Definition: covise_shm.h:107
~MMapEntry()
Definition: covise_shm.h:184
void print()
Definition: covise_shm.h:282
#define NULL
Definition: covise_list.h:22
state shmstate
Definition: covise_shm.h:232
state
Definition: covise_shm.h:225
const int COMPARE_SIZE
Definition: covise_shm.h:306
Definition: message.h:111
shmSizeType get_offset()
Definition: covise_shm.h:364
void stringPtrSet(int no, int sn, shmSizeType of)
Definition: covise_shm.h:666
const int CHOICE
Definition: covise_shm.h:150
void * getPtr()
Definition: covise_shm.h:372
Definition: covise_shm.h:83
Definition: covise_shm.h:290
const int SHORTSHMARRAY
Definition: covise_shm.h:108
coCharShmArray()
Definition: covise_shm.h:618
const int COVISE_BOOLEAN
Definition: covise_shm.h:148
size_t minSegSize
Definition: covise_shm.h:295
const int SHMPTRARRAY
Definition: covise_shm.h:122
Definition: covise_shm.h:87
const int FLOAT_VECTOR
Definition: covise_shm.h:147
const int DOUBLESHMARRAY
Definition: covise_shm.h:115
Definition: covise_shm.h:229
int get_seq_no()
Definition: covise_shm.h:264
const int PER_VERTEX
Definition: covise_shm.h:144
coShmPtr * covise_extract_list(List< PackElement > *, char)
char * data
Definition: message.h:138
int get_key()
Definition: covise_shm.h:273
int shmid
Definition: covise_shm.h:218
const int BROWSER
Definition: covise_shm.h:149
Definition: covise_shm.h:615
const int ARRAYSET
Definition: covise_shm.h:158
ArrayLengthType get_length() const
Definition: covise_shm.h:533
GLsizeiptr size
Definition: khronos-glext.h:6610
DataType & operator[](size_t i)
Definition: covise_shm.h:586
const int INT_VECTOR
Definition: covise_shm.h:163
const int MMPANEL
Definition: covise_shm.h:153
const int COMPARE_ADDRESS
Definition: covise_shm.h:305
GLuint GLfloat * val
Definition: khronos-glext.h:7898
void setPtr(int no, shmSizeType o)
Definition: covise_shm.h:573
const int START_ODD
Definition: covise_shm.h:171
static class SharedMemory ** shm_array
Definition: covise_shm.h:212
coShmPtr()
Definition: covise_shm.h:397
static int global_seq_no
Definition: covise_shm.h:214
int shm_seq_no
Definition: covise_shm.h:347
coShmItem()
Definition: covise_shm.h:353
const int INTSHM
Definition: covise_shm.h:125
Definition: covise_msg.h:87
Definition: covise_shm.h:89
int covise_decode_list(List< PackElement > *, char *, DataManagerProcess *, char)
static shmCallback * shmC
Definition: covise_shm.h:242
Definition: dmgr.h:185
const GLubyte * c
Definition: khronos-glext.h:9864
coDataShm()
Definition: covise_shm.h:429
Definition: covise_list.h:53
Definition: covise_shm.h:86
void setPtr(int no, shmSizeType o)
Definition: covise_shm.h:412
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
static List< SharedMemory > * shmlist
Definition: covise_shm.h:213
coShmPtr(int no, shmSizeType o)
Definition: covise_shm.h:399
const int USERDEFINED
Definition: covise_shm.h:132
const int I_SLIDER
Definition: covise_shm.h:141
Definition: covise_shm.h:379
int noDelete
Definition: covise_shm.h:235
const int START_EVEN
Definition: covise_shm.h:170
coShmPtr(Message *msg)
Definition: covise_shm.h:406
const int FLOATSHM
Definition: covise_shm.h:130
GLenum type
Definition: khronos-glext.h:6279
void * ptr
Definition: covise_shm.h:350
const int EMPTYINTSHMARRAY
Definition: covise_shm.h:118
void stringPtrGet(int no, int *sn, shmSizeType *of)
Definition: covise_shm.h:673
const int MATERIAL_MSG
Definition: covise_shm.h:166
int setString(const char *c)
Definition: covise_shm.h:625
const int MAX_NO_SHM
Definition: covise_shm.h:303
const int INT_SCALAR
Definition: covise_shm.h:162
Definition: covise_shm.h:228
const int DISTROBJ
Definition: covise_shm.h:135
void print_comment(int line, const char *filename, const char *fmt,...)
Definition: coLog.cpp:25
GLuint address
Definition: khronos-glext.h:10368
const int EMPTYLONGSHMARRAY
Definition: covise_shm.h:119
Definition: covise_shm.h:311
double length(EDGE_VECTOR &vector)
Definition: CuttingSurfaceGPMUtil.h:70
coShmArray()
Definition: covise_shm.h:509
coDataShmArray()
Definition: covise_shm.h:560
class SharedMemory * next
Definition: covise_shm.h:215
const int COMMAND
Definition: covise_shm.h:152
static SharedMemory * shm
Definition: covise_shm.h:314
const int INTSHMARRAY
Definition: covise_shm.h:109
const int TEXT
Definition: covise_shm.h:154
const int FLOAT_SCALAR
Definition: covise_shm.h:151
const int LONGSHM
Definition: covise_shm.h:129
const int STRINGSHMARRAY
Definition: covise_shm.h:136
Definition: covise_shm.h:557
const int OBJ_OVERWRITE
Definition: covise_shm.h:173
Definition: covise_shm.h:88
Definition: covise_shm.h:85
coShmArray(int no, shmSizeType o)
Definition: covise_shm.h:515
const int UNKNOWN
Definition: covise_shm.h:138
static DataType null_return
Definition: covise_shm.h:609
int get_shm_seq_no()
Definition: covise_shm.h:360
void * get_pointer()
Definition: covise_shm.h:326
const int FLOATSHMARRAY
Definition: covise_shm.h:114
Definition: covise_shm.h:654
coShmArray(Message *msg)
Definition: covise_shm.h:523
const int SHORTSHM
Definition: covise_shm.h:124
Definition: coDistributedObject.h:295
const int CLI
Definition: covise_shm.h:157
const int NONE
Definition: covise_shm.h:94
shmSizeType offset
Definition: covise_shm.h:348
GLintptr offset
Definition: khronos-glext.h:6611
const int COLOR_MSG
Definition: covise_shm.h:164
int fd
Definition: covise_shm.h:188
void print_exit(int line, const char *filename, int how)
Definition: coLog.cpp:69
Definition: covise_shm.h:84
SHMEXPORT SharedMemory * get_shared_memory()
Definition: covise_shm.cpp:88
long size
Definition: covise_shm.h:189
static SharedMemory * shmptr
Definition: covise_shm.h:489
void( shmCallback)(int shmKey, shmSizeType size, char *address)
Definition: covise_shm.h:204
const int COVISE_OPTIONAL
Definition: covise_shm.h:140
int shmfd
Definition: covise_shm.h:217
int seq_no
Definition: covise_shm.h:234
const int CHARSHM
Definition: covise_shm.h:123
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: khronos-glext.h:6354
const int COLORMAPCHOICE_MSG
Definition: covise_shm.h:165
Definition: covise_shm.h:208
Definition: dmgr.h:213
const int SHMPTR
Definition: covise_shm.h:133
SharedMemory * get_next_shm()
Definition: covise_shm.h:260
void set_length(ArrayLengthType l)
Definition: covise_shm.h:529
int get_key()
Definition: covise_shm.h:330
GLenum GLuint GLenum GLsizei length
Definition: khronos-glext.h:6279
const int F_SLIDER
Definition: covise_shm.h:142
void setPtr(int no, shmSizeType o)
Definition: covise_shm.h:537
const int DOUBLESHM
Definition: covise_shm.h:131
MMapEntry()
Definition: covise_shm.h:181
const int STRING
Definition: covise_shm.h:137
void * getDataPtr() const
Definition: covise_shm.h:418
coStringShmArray(int no, shmSizeType o)
Definition: covise_shm.h:660
Definition: covise_shm.h:340
const int EMPTYFLOATSHMARRAY
Definition: covise_shm.h:120
shmSizeType get_size()
Definition: covise_shm.h:277
Definition: covise_shm.h:426
const int COLORMAP_MSG
Definition: covise_shm.h:160
unsigned int shmSizeType
Definition: covise_shm.h:202