Provided by: libbobcat-dev_3.19.01-1ubuntu1_amd64 bug

NAME

       FBB::Sharedpos - Shared Memory offset controller

SYNOPSIS

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

DESCRIPTION

       The  class  SharedPos  is  a support class for Bobcat’s shared memory handling classes. It
       controls the shared memory read/write ofset and  ensures  that  shared  memory  operations
       never exceed the shared memory’s 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’s member functions offset refers to the read/write offset
       within the available shared memory.

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 offsets for a shared memory  segment.  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’s 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’s
              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 FBB::SharedPos object into out.

       The copy and move assignment operators are available.

MEMBER FUNCTIONS

       o      bool atMaxOffset() const:
              Returns true if offset equals the maximum offset that can be used for  the  current
              shared memory segment.
              The behavior of this member is undefined until setup has been called.

       o      size_t blockIdx() const:
              The index of the shared segment data block in which offset is located is returned.

       o      size_t blockOffset() const:
              The index within the shared segment data block matching offset is returned.

       o      bool eof() const:
              Returns  true if offset exceeds the maximum offset of any character ever written to
              the shared memory pointed at by sharedData. 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.
              The behavior of this member is undefined until setup has been called.

       o      std::streamsize eos() const:
              The offset just beyond the maximum offset for the current shared segment data block
              is returned.
              The behavior of this member is undefined until setup has been called.

       o      std::streamsize maxOffset() const:
              The  maximum  possible  offset  that can be used for the currently monitored shared
              memory segment is returned. Zero is returned until setup has been called.

       o      std::streamsize offset() const:
              The offset within the currently monitored shared memory segment is  returned.  Zero
              is returned until setup has been called.

       o      void setup(SharedSegment *sharedData):
              The  SharedPos  object  is  reset to monitor the offset of a new FBB::SharedSegment
              object.  The  SharedSegment  *  must  point  to  a   SharedSegment   segment   (cf.
              sharedsegment(3bobcat))  that  must  exist  until  the  end  of  the FBB::SharedPos
              object’s lifetime or until the next reset call.  Immediately  after  calling  reset
              offset has the value 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 shared memory segment before calling this member. See also
              the sharedsegment(3bobcat) man-page.
              The behavior of this member is undefined until setup has been called.

       o      std::ios::pos_type  seek(std::ios::off_type   offset,   std::ios::seekdir   way   =
              std::ios::beg):
              The  monitored offset is changed to this member’s offset argument, relative to way.
              Seeking beyond eof is OK; -1 is returned when seeking beyond maxOffset  or  seeking
              before the shared segment’s 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),
       sharedmemory(3bobcat),            sharedmutex(3bobcat),            sharedsegment(3bobcat),
       sharedstream(3bobcat), sharedstreambuf(3bobcat)

BUGS

       None Reported.

DISTRIBUTION FILES

       o      bobcat_3.19.01-x.dsc: detached signature;

       o      bobcat_3.19.01-x.tar.gz: source archive;

       o      bobcat_3.19.01-x_i386.changes: change log;

       o      libbobcat1_3.19.01-x_*.deb: debian package holding the libraries;

       o      libbobcat1-dev_3.19.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’s Own Base Classes And Templates’.

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).