class pipc

Class pipc: base class for a simple encapsulation of the system V IPC (extensible to other IPC - eg NT)

Inheritance:


Public Methods

int get_id()
get the identifier of the resource
key_t get_key()
get the (unique) key of the resource
int get_size()
get the size of the resource
int get_status()
return the status of the last IPC command
int i_created()
returns true if the process created the IPC,
pipc(int size, key_t key = 1, char *filename = NULL)
constructor
static int remove(int id)
forces the removal of the IPC
~pipc()
Dtor

Protected Methods

static key_t get_existing_key( char *filename, key_t key )
given the filename and base key return the existing key
static key_t get_key( char *filename, key_t key = 1, int create = -1 )
get a key, if create == 0 then return only an exising key
static key_t get_new_key( char *filename, key_t key )
given the filename and base key return a new key

Protected

protected data members for access from derived class
int id
identifier
int size
size
key_t key
the unique key
int status
status of the last command
time_t time_created
time when the resource was created
int created
whether the process was the one that created the resource (or just attached to it)
static char* pcIpcCleanupFile
Pointer to the cleanup file name that has to be created if we want to have a script at the end that eliminates all IPC resources

Documentation

Class pipc: base class for a simple encapsulation of the system V IPC (extensible to other IPC - eg NT).

pipc is a base class that has member functions that are common to all IPC resources, such as getting a unique key, returning a status or the size of the resource.

MODIFICATIONS:

pipc(int size, key_t key = 1, char *filename = NULL)
constructor.
Note that you must specify the key and filename if you want to have several resources at the same time.

~pipc()
Dtor

static int remove(int id)
forces the removal of the IPC

int get_status()
return the status of the last IPC command

int get_size()
get the size of the resource

int get_id()
get the identifier of the resource

key_t get_key()
get the (unique) key of the resource

int i_created()
returns true if the process created the IPC,

static key_t get_key( char *filename, key_t key = 1, int create = -1 )
get a key, if create == 0 then return only an exising key

static key_t get_existing_key( char *filename, key_t key )
given the filename and base key return the existing key

static key_t get_new_key( char *filename, key_t key )
given the filename and base key return a new key

protected data members for access from derived class

int id
identifier

int size
size

key_t key
the unique key

int status
status of the last command

time_t time_created
time when the resource was created

int created
whether the process was the one that created the resource (or just attached to it)

static char* pcIpcCleanupFile
Pointer to the cleanup file name that has to be created if we want to have a script at the end that eliminates all IPC resources


Direct child classes:
pshm
psem
Author:
C.Witzig
Date: May 4, 97
Version:
Last update April 27, 99

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de