22#ifndef _MEMORYINDEX_HPP_
23#define _MEMORYINDEX_HPP_
43 virtual void create(std::vector<Entry>& entries);
44 virtual size_t size()
const;
generic interface for creating and using an index on a stream of serialized objects
boost::shared_ptr< Entry > EntryPtr
index implementation in memory; find(string id) is O(logN); find(ordinal index) is O(1); memory footp...
boost::shared_ptr< Impl > impl_
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 void create(std::vector< Entry > &entries)
create the index from specified list of entries; the list is non-const because the index implementati...
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