|
ProteoWizard
|
index implementation in a stream (intended for fstreams but any iostream works); find(string id) is O(logN); find(ordinal index) is O(1); memory footprint is negligible More...
#include <BinaryIndexStream.hpp>
Public Member Functions | |
| BinaryIndexStream (boost::shared_ptr< std::iostream > indexStreamPtr) | |
| 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< Entry > | EntryPtr |
index implementation in a stream (intended for fstreams but any iostream works); find(string id) is O(logN); find(ordinal index) is O(1); memory footprint is negligible
Definition at line 38 of file BinaryIndexStream.hpp.
| pwiz::data::BinaryIndexStream::BinaryIndexStream | ( | boost::shared_ptr< std::iostream > | indexStreamPtr | ) |
|
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(), and testThreadSafety().
|
virtual |
returns the number of entries in the index
Implements pwiz::data::Index.
Referenced by test(), and testThreadSafety().
|
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(), and testThreadSafetyWorker().
|
virtual |
returns the entry for the specified ordinal index, or null if the ordinal is not in the index
Implements pwiz::data::Index.
|
private |
Definition at line 50 of file BinaryIndexStream.hpp.
1.8.1.1