ProteoWizard
Public Member Functions | Private Attributes
pwiz::data::MemoryIndex Class Reference

index implementation in memory; find(string id) is O(logN); find(ordinal index) is O(1); memory footprint is basically (number of entries * 2) More...

#include <MemoryIndex.hpp>

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

List of all members.

Public Member Functions

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

Private Attributes

boost::shared_ptr< Impl > impl_

Additional Inherited Members

- Public Types inherited from pwiz::data::Index
typedef
boost::iostreams::stream_offset 
stream_offset
typedef boost::shared_ptr< EntryEntryPtr

Detailed Description

index implementation in memory; find(string id) is O(logN); find(ordinal index) is O(1); memory footprint is basically (number of entries * 2)

Definition at line 37 of file MemoryIndex.hpp.


Constructor & Destructor Documentation

pwiz::data::MemoryIndex::MemoryIndex ( )

Member Function Documentation

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

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

Implements pwiz::data::Index.

Referenced by test().

virtual size_t pwiz::data::MemoryIndex::size ( ) const
virtual

returns the number of entries in the index

Implements pwiz::data::Index.

Referenced by test().

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

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

Implements pwiz::data::Index.

Referenced by test().

virtual EntryPtr pwiz::data::MemoryIndex::find ( size_t  index) const
virtual

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

Implements pwiz::data::Index.


Member Data Documentation

boost::shared_ptr<Impl> pwiz::data::MemoryIndex::impl_
private

Definition at line 49 of file MemoryIndex.hpp.


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