ProteoWizard
Classes | Public Types | Public Member Functions | List of all members
pwiz::data::Index Class Referenceabstract

generic interface for creating and using an index on a stream of serialized objects More...

#include <Index.hpp>

Inheritance diagram for pwiz::data::Index:
pwiz::data::BinaryIndexStream pwiz::data::MemoryIndex

Classes

struct  Entry
 generic type identifying an indexed item by string id, ordinal index, and stream offset More...
 

Public Types

typedef boost::iostreams::stream_offset stream_offset
 
typedef boost::shared_ptr< EntryEntryPtr
 

Public Member Functions

virtual void create (std::vector< Entry > &entries)=0
 create the index from specified list of entries; the list is non-const because the index implementation may resort the list More...
 
virtual size_t size () const =0
 returns the number of entries in the index More...
 
virtual EntryPtr find (const std::string &id) const =0
 returns the entry for the specified string id, or null if the id is not in the index More...
 
virtual EntryPtr find (size_t index) const =0
 returns the entry for the specified ordinal index, or null if the ordinal is not in the index More...
 
virtual ~Index ()
 

Detailed Description

generic interface for creating and using an index on a stream of serialized objects

Definition at line 39 of file Index.hpp.

Member Typedef Documentation

§ stream_offset

typedef boost::iostreams::stream_offset pwiz::data::Index::stream_offset

Definition at line 43 of file Index.hpp.

§ EntryPtr

typedef boost::shared_ptr<Entry> pwiz::data::Index::EntryPtr

Definition at line 53 of file Index.hpp.

Constructor & Destructor Documentation

§ ~Index()

virtual pwiz::data::Index::~Index ( )
inlinevirtual

Definition at line 68 of file Index.hpp.

68 {}

Member Function Documentation

§ create()

virtual void pwiz::data::Index::create ( std::vector< Entry > &  entries)
pure virtual

create the index from specified list of entries; the list is non-const because the index implementation may resort the list

Implemented in pwiz::data::BinaryIndexStream, and pwiz::data::MemoryIndex.

§ size()

virtual size_t pwiz::data::Index::size ( ) const
pure virtual

returns the number of entries in the index

Implemented in pwiz::data::BinaryIndexStream, and pwiz::data::MemoryIndex.

§ find() [1/2]

virtual EntryPtr pwiz::data::Index::find ( const std::string &  id) const
pure virtual

returns the entry for the specified string id, or null if the id is not in the index

Implemented in pwiz::data::BinaryIndexStream, and pwiz::data::MemoryIndex.

§ find() [2/2]

virtual EntryPtr pwiz::data::Index::find ( size_t  index) const
pure virtual

returns the entry for the specified ordinal index, or null if the ordinal is not in the index

Implemented in pwiz::data::BinaryIndexStream, and pwiz::data::MemoryIndex.


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