Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::SharedMemoryLister Class Reference

Format list output for shared memory segments. More...

#include <shm_lister.h>

Inheritance diagram for fawkes::SharedMemoryLister:

List of all members.

Public Member Functions

virtual ~SharedMemoryLister ()
 virtual destructor
virtual void print_header ()=0
 Print header of the table.
virtual void print_footer ()=0
 Print footer of the table.
virtual void print_no_segments ()=0
 Print this if no matching segment was found.
virtual void print_no_orphaned_segments ()=0
 Print this if no matching orphaned segment was found.
virtual void print_info (const SharedMemoryHeader *header, int shm_id, int semaphore, unsigned int mem_size, const void *memptr)=0
 Print info about segment.

Detailed Description

Format list output for shared memory segments.

Implement this function specific to your SharedMemoryHeader to printout data about the shared memory segments.

Author:
Tim Niemueller

Definition at line 38 of file shm_lister.h.


Constructor & Destructor Documentation

virtual fawkes::SharedMemoryLister::~SharedMemoryLister ( )
inlinevirtual

virtual destructor

Definition at line 42 of file shm_lister.h.


Member Function Documentation

virtual void fawkes::SharedMemoryLister::print_footer ( )
pure virtual

Print footer of the table.

This should fit on the terminal and thus have a width of at most 79 columns.

Implemented in firevision::SharedMemoryImageBufferLister, firevision::SharedMemoryLookupTableLister, and fawkes::BlackBoardSharedMemoryLister.

Referenced by fawkes::SharedMemory::erase(), fawkes::SharedMemory::erase_orphaned(), and fawkes::SharedMemory::list().

virtual void fawkes::SharedMemoryLister::print_header ( )
pure virtual

Print header of the table.

This should fit on the terminal and thus have a width of at most 79 columns.

Implemented in firevision::SharedMemoryImageBufferLister, firevision::SharedMemoryLookupTableLister, and fawkes::BlackBoardSharedMemoryLister.

Referenced by fawkes::SharedMemory::erase(), fawkes::SharedMemory::erase_orphaned(), and fawkes::SharedMemory::list().

virtual void fawkes::SharedMemoryLister::print_info ( const SharedMemoryHeader header,
int  shm_id,
int  semaphore,
unsigned int  mem_size,
const void *  memptr 
)
pure virtual

Print info about segment.

This method is called for every matching shared memory segment. You should print a line of information (maybe more than one line if needed) about the segment.

Parameters:
headerThe data-specific header
shm_idThe id of the shared memory segment
semaphoreSemaphore key of the given shared memory segment
mem_sizethe total memory size
memptrpointer to the data segment.

Implemented in firevision::SharedMemoryImageBufferLister, firevision::SharedMemoryLookupTableLister, and fawkes::BlackBoardSharedMemoryLister.

Referenced by fawkes::SharedMemory::erase(), fawkes::SharedMemory::erase_orphaned(), and fawkes::SharedMemory::list().

virtual void fawkes::SharedMemoryLister::print_no_orphaned_segments ( )
pure virtual

Print this if no matching orphaned segment was found.

Called by SharedMemory::erase_orphaned() if no matching segment could be found.

Implemented in firevision::SharedMemoryImageBufferLister, firevision::SharedMemoryLookupTableLister, and fawkes::BlackBoardSharedMemoryLister.

Referenced by fawkes::SharedMemory::erase_orphaned().

virtual void fawkes::SharedMemoryLister::print_no_segments ( )
pure virtual

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