Class to access a named mapped segment published from another process.
More...
#include <mapped.h>
Public Member Functions |
|
void | copy (unsigned member, T *buffer) |
|
volatile T * | get (unsigned member) |
| unsigned | getCount (void) |
| | Get count of typed member objects held in this map.
|
| | mapped_view (char *name) |
| | Map existing named memory segment.
|
| volatile T * | operator() (unsigned member) |
| | Access typed member object in the mapped segment.
|
| volatile T & | operator[] (unsigned member) |
| | Reference typed member object in the mapped segment.
|
Additional Inherited Members |
| void | copy (size_t offset, void *buffer, size_t size) |
| | Copy memory from specific offset within the mapped memory segment.
|
| caddr_t | getStart (void) |
| | Get starting address of mapped segment.
|
| size_t | len (void) |
| | Get size of mapped segment.
|
| | MappedMemory (char *name, size_t size) |
| | Construct a read/write access mapped shared segment of memory of a known size.
|
| | MappedMemory (char *name) |
| | Provide read-only mapped access to an existing named shared memory segment.
|
| void * | offset (size_t offset) |
| | Get memory from a specific offset within the mapped memory segment.
|
| | operator bool () |
| | Test if map active.
|
| bool | operator! () |
| | Test if map is inactive.
|
|
void | release (void) |
| | Unmap memory segment.
|
| void * | sbrk (size_t size) |
| | Extend size of managed heap on shared memory segment.
|
|
virtual | ~MappedMemory () |
| | Unmap memory segment.
|
| void | create (char *name, size_t size=(size_t) 0) |
| | Supporting function to construct a new or access an existing shared memory segment.
|
|
virtual void | fault (void) |
| | Handler to invoke in derived class when accessing outside the shared memory segment boundary.
|
| static void | disable (void) |
| | An API that allows "disabling" of publishing shared memory maps.
|
| static void | remove (char *name) |
| | Destroy a previously existing memory segment under the specified name.
|
Detailed Description
template<class T>
class ucommon::mapped_view< T >
Class to access a named mapped segment published from another process.
This offers a simple typed vector interface to access the shared memory segment in read-only mode.
- Author:
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 463 of file mapped.h.
Constructor & Destructor Documentation
Map existing named memory segment.
The size of the map is derived from the existing map alone.
- Parameters:
-
| name | of memory segment to map. |
Definition at line 471 of file mapped.h.
Member Function Documentation
Get count of typed member objects held in this map.
- Returns:
- count of typed member objects.
Definition at line 500 of file mapped.h.
Access typed member object in the mapped segment.
- Parameters:
-
- Returns:
- typed object pointer.
Definition at line 479 of file mapped.h.
Reference typed member object in the mapped segment.
- Parameters:
-
- Returns:
- typed object reference.
Definition at line 487 of file mapped.h.
The documentation for this class was generated from the following file: