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>
|
| 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
|
|
virtual | ~Index () |
|
|
boost::shared_ptr< Impl > | impl_ |
|
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.
◆ MemoryIndex()
pwiz::data::MemoryIndex::MemoryIndex |
( |
| ) |
|
◆ create()
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().
◆ size()
virtual size_t pwiz::data::MemoryIndex::size |
( |
| ) |
const |
|
virtual |
◆ find() [1/2]
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().
◆ find() [2/2]
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.
◆ impl_
boost::shared_ptr<Impl> pwiz::data::MemoryIndex::impl_ |
|
private |
The documentation for this class was generated from the following file:
- /build/reproducible-path/libpwiz-3.0.18342/pwiz/data/common/MemoryIndex.hpp