|
Open CASCADE Technology
6.5.4
|
IPC Tools -Shared Memory
This is a low level interface for communications.
Using shared memory, processes can use a common area to
communicate.
You can create and delete a shared memory.
#include <OSD_SharedMemory.hxx>
Public Member Functions | |
| DEFINE_STANDARD_ALLOC | OSD_SharedMemory () |
| Allocates room for shared memory name. This is to be used with 'Open'. In this case, the process is a client of shared memory. | |
| OSD_SharedMemory (const TCollection_AsciiString &Name, const Standard_Integer size) | |
| Instantiates SharedMemory object with parameters. A name to make sure shared memory is unique and a size in bytes for the size of shared memory. Raises ConstructionError when the name contains characters not in range of ' '...'~'. Raises ProgramError when the size given is negative or null. This is for a server process. | |
| void | Build () |
| Creates a shared memory in the system This is for a server process. | |
| void | Open (const TCollection_AsciiString &Name, const Standard_Integer size) |
| Opens a shared memory Raises ConstructionError when the name contains characters not in range of ' '...'~'. Raises ProgramError when the size given is negative or null. This is for a server process. | |
| void | Delete () |
| Removes a shared memory access. This is used only by a server process ! | |
| Standard_Address | GiveAddress () const |
| Returns address of shared memory. Raises NullObject when the Shared Memory is not created. | |
| Standard_Boolean | Failed () const |
| Returns TRUE if an error occurs | |
| void | Reset () |
| Resets error counter to zero | |
| void | Perror () |
| Raises OSD_Error | |
| Standard_Integer | Error () const |
| Returns error number if 'Failed' is TRUE. | |
| OSD_SharedMemory::OSD_SharedMemory | ( | const TCollection_AsciiString & | Name, |
| const Standard_Integer | size | ||
| ) |
| Standard_Integer OSD_SharedMemory::Error | ( | ) | const |
| Standard_Boolean OSD_SharedMemory::Failed | ( | ) | const |
| void OSD_SharedMemory::Open | ( | const TCollection_AsciiString & | Name, |
| const Standard_Integer | size | ||
| ) |
1.8.0