UCommon
Public Member Functions
ucommon::mapped_view< T > Class Template Reference

Class to access a named mapped segment published from another process. More...

#include <mapped.h>

Inherits MappedMemory.

Public Member Functions

void copy (unsigned member, T &buffer)
 
unsigned count (void) const
 Get count of typed member objects held in this map. More...
 
const volatile T * get (unsigned member)
 
 mapped_view (const char *name)
 Map existing named memory segment. More...
 
const volatile T * operator() (unsigned member)
 Access typed member object in the mapped segment. More...
 
const volatile T & operator[] (unsigned member)
 Reference typed member object in the mapped segment. More...
 

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 469 of file mapped.h.

Constructor & Destructor Documentation

◆ mapped_view()

template<class T >
ucommon::mapped_view< T >::mapped_view ( const char *  name)
inline

Map existing named memory segment.

The size of the map is derived from the existing map alone.

Parameters
nameof memory segment to map.

Definition at line 480 of file mapped.h.

Member Function Documentation

◆ count()

template<class T >
unsigned ucommon::mapped_view< T >::count ( void  ) const
inline

Get count of typed member objects held in this map.

Returns
count of typed member objects.

Definition at line 509 of file mapped.h.

◆ operator()()

template<class T >
const volatile T* ucommon::mapped_view< T >::operator() ( unsigned  member)
inline

Access typed member object in the mapped segment.

Parameters
memberto access.
Returns
typed object pointer.

Definition at line 488 of file mapped.h.

◆ operator[]()

template<class T >
const volatile T& ucommon::mapped_view< T >::operator[] ( unsigned  member)
inline

Reference typed member object in the mapped segment.

Parameters
memberto access.
Returns
typed object reference.

Definition at line 496 of file mapped.h.

Here is the call graph for this function:

The documentation for this class was generated from the following file: