GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SHAREDPOS (3)

NAME

FBB::Sharedpos - Shared Memory offset controller

CONTENTS

SYNOPSIS

#include <bobcat/sharedpos>
Linking option: -lbobcat

DESCRIPTION

The class SharedPos is a support class for Bobcat\(cqs shared memory handling classes. It controls the shared memory read/write ofset and ensures that shared memory operations never exceed the shared memory\(cqs maximum offset.

The class SharedPos has several public members, but they are primarily useful for other Shared* classes offered by Bobcat. There is probably little use for a stand-alone SharedPos object.

In the descriptions of the class\(cqs member functions offset refers to the read/write offset within a FBB::SharedSegment(3bobcat) object for which SharedPos performs the offset-administration.

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

-

TYPEDEFS AND ENUMS

CONSTRUCTORS

Default, copy and move constructors are available. The default constructor does not yet monitor the offset of an FBB::SharedSegment object. The member reset is used to start monitoring offsets.

OVERLOADED OPERATORS

o void operator++():
The offset is incremented. If this member is called when the offset is equal to the shared memory\(cqs maximum offset an FBB::Exception is thrown.
o void operator+=(size_t len):
The offset is incremented by len. If offset + len exceeds the shared memory\(cqs maximum offset then the offset is set to the maximum offset and an FBB::Exception is thrown.
o std::ostream &operator<<(std::ostream &out, SharedPos const &pos):
Inserts information about the SharedPos object into out.

Copy and move assignment operators are available.

MEMBER FUNCTIONS

Note: the behavior of member functions returning values which refer to information of an FBB::SharedSegment is undefined untill the member reset has been called.

o bool atMaxOffset() const:
Returns true if offset equals the maximum offset that can be used for the configured FBB::SharedSegment object.
o size_t blockIdx() const:
The index of the configured FBB::SharedSegment object\(cqs shared segment data block to which offset refers is returned.
o size_t blockOffset() const:
The offset within the shared segment data block matching the member offset\(cqs return value is returned.
o bool eof() const:
Returns true if offset exceeds the maximum offset of any character ever written to the shared memory to which the SharedPos object interfaces. If eof returns true information may still be written to the shared memory: writting is possible until the maximum shared memory segment offset has been reached.
o std::streamsize eos() const:
The offset just beyond the maximum offset for the current shared segment data block is returned. E.g., if blockIdx returns 5, and the size of the shared segment data blocks equals 2000, then eos returns 12000 (the first offset of segment 6).
o std::streamsize maxOffset() const:
The maximum possible offset that can be used for the currently monitored FBB::SharedSegment is returned.
o std::streamsize offset() const:
The offset within the currently monitored shared memory segment is returned.
o void reset(SharedSegment *sharedData):
The SharedPos object is reset to monitor the offset of the FBB::SharedSegment object whose address is passed as argument to reset. The address must point to a sharedsegment(3bobcat) object that must exist until the end of the SharedPos object\(cqs lifetime or until its next reset call. Immediately after calling reset offset is reset to 0.
o std::streamsize showmanyc() const:
The number of characters that can be read from the current shared segment data block is returned. This member interrogates the number of readable characters in the shared memory segment. This number may change while this member is being executed. In order to receive a stable return value, calling functions should have obtained a lock on the FBB::SharedSegment data before calling this member. See also the sharedsegment(3bobcat) man-page.
o std::ios::pos_type seek(std::ios::off_type offset, std::ios::seekdir origin = std::ios::beg):
The monitored offset is changed to this member\(cqs offset argument, relative to origin. Seeking beyond eof is OK. However, -1 is returned when seeking beyond maxOffset or seeking before the shared segment\(cqs offset 0.

EXAMPLE

See the sharedstream(3bobcat) man page.

FILES

bobcat/sharedpos - defines the class interface

SEE ALSO

bobcat(7), isharedstream(3bobcat), osharedstream(3bobcat), sharedblock(3bobcat), sharedcondition(3bobcat), sharedmemory(3bobcat), sharedmutex(3bobcat), sharedreadme(7bobcat), sharedsegment(3bobcat), sharedstream(3bobcat), sharedstreambuf(3bobcat)

BUGS

None Reported.

DISTRIBUTION FILES

o bobcat_3.25.01-x.dsc: detached signature;
o bobcat_3.25.01-x.tar.gz: source archive;
o bobcat_3.25.01-x_i386.changes: change log;
o libbobcat1_3.25.01-x_*.deb: debian package holding the libraries;
o libbobcat1-dev_3.25.01-x_*.deb: debian package holding the libraries, headers and manual pages;
o http://sourceforge.net/projects/bobcat: public archive location;

BOBCAT

Bobcat is an acronym of ‘Brokken\(cqs Own Base Classes And Templates\(cq.

COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).

Search for    or go to Top of page |  Section 3 |  Main Index


libbobcat-dev_3&.25&.01-x&.tar&.gz FBB::SHAREDPOS (3bobcat) 2005-2015

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.