fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/akutil/sharedMemory.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     sharedMemory.h  -  description
00003 
00004     begin                : Thu Jun 29 2000
00005     copyright            : (C) 2000 by Andreas Kopmann
00006     email                : kopmann@hpe.fzk.de
00007  ***************************************************************************/
00008 
00009 
00010 
00011 // Shared Memory für Linux
00012 // Sys V style
00013 
00014 #ifndef _INC_SHAREDMEMORY_1234_INCLUDED
00015 #define _INC_SHAREDMEMORY_1234_INCLUDED
00016 
00017 #include <cstdio>
00018 
00019 #include <sys/types.h>
00020 #include <sys/ipc.h>
00021 #include <sys/shm.h>
00022 
00023 
00028 class sharedMemory
00029 {
00030 public:
00031 
00032    sharedMemory(int size,const char *dir="~");
00033 
00034    char *getReference();
00035    void remove();
00036 
00042    int getSize();
00043 
00044 private:
00045    int shmid;
00046    char *shmptr;
00047 
00048 };
00049 
00050 #endif