Xpace
Xpace::IndexList Class Reference

#include <indexlist.h>

Inheritance diagram for Xpace::IndexList:
Xpace::Configurable

Classes

struct  BuildStatus
 bulk build More...
 
class  CantOpen
 
class  CantOpenIndex
 

Public Member Functions

 IndexList ()
 An empty index list. More...
 
 IndexList (const Configuration &config, bool overwrite=false)
 open an already-existing index list, or create one with this Configuration More...
 
 IndexList (const String &iiFile, const String &idFile)
 open an already-existing index list More...
 
 IndexList (const IndexList &rhs)
 create a new reference to a list More...
 
IndexListoperator= (const IndexList &rhs)
 make this refer to a list More...
 
 ~IndexList ()
 
uint getCount () const
 
const ConfigurationgetIndexConfig (uint indexNum) const
 Get the Configuration of an index. More...
 
size_t getIndexByField (const String &tag, size_t pos=0) const
 Find indexes that include a field. More...
 
IndexopenIndex (const String &indexName, uint *indexNum=0, Configuration config=Configuration())
 open an index by name More...
 
const IndexopenIndex (const String &indexName, uint *indexNum=0, Configuration config=Configuration()) const
 
IndexopenIndex (uint indexNum, Configuration config=Configuration())
 open an index by number More...
 
const IndexopenIndex (uint indexNum, Configuration config=Configuration()) const
 
uint addIndex (Index &index)
 
bool write (Index::WriteStatus *st=0)
 write in current state More...
 
bool range (const Configuration &config, Index::WriteStatus *st=0)
 speed up range search for indexes in a list More...
 
- Public Member Functions inherited from Xpace::Configurable
virtual const ConfigurationgetConfig () const =0
 

Static Public Member Functions

static bool merge (const Configuration &config, const std::vector< IndexList * > &list, Index::WriteStatus *st=0)
 merge a list of index lists More...
 

Static Public Attributes

static DECLARE_CONFIG const char * TAG
 

Friends

class indexListImpl
 

Detailed Description

Definition at line 25 of file indexlist.h.

Constructor & Destructor Documentation

Xpace::IndexList::IndexList ( )

An empty index list.

Xpace::IndexList::IndexList ( const Configuration config,
bool  overwrite = false 
)
explicit

open an already-existing index list, or create one with this Configuration

Parameters
configthe Configuration
overwriteif true, delete if list already exists
Exceptions
CantOpen
Xpace::IndexList::IndexList ( const String iiFile,
const String idFile 
)

open an already-existing index list

Parameters
iiFilethe index-index file
idFilethe actual indexes &throw CantOpen
Xpace::IndexList::IndexList ( const IndexList rhs)

create a new reference to a list

Parameters
rhsthe list
Xpace::IndexList::~IndexList ( )

Member Function Documentation

IndexList& Xpace::IndexList::operator= ( const IndexList rhs)

make this refer to a list

Parameters
rhsthe list
uint Xpace::IndexList::getCount ( ) const
Returns
the number of indexes in the list
const Configuration& Xpace::IndexList::getIndexConfig ( uint  indexNum) const

Get the Configuration of an index.

Parameters
indexNumthe index number
Returns
the index's Configuration
size_t Xpace::IndexList::getIndexByField ( const String tag,
size_t  pos = 0 
) const

Find indexes that include a field.

Parameters
tagthe field's tag
poswhich of the indexes containing the field to return
Returns
number of the pos'th index that contains the field, ~0 for none
Index& Xpace::IndexList::openIndex ( const String indexName,
uint indexNum = 0,
Configuration  config = Configuration() 
)

open an index by name

Parameters
indexNamethe index to get
Return values
indexNumfill in the index's number
Returns
the found index, Index() if not found
const Index& Xpace::IndexList::openIndex ( const String indexName,
uint indexNum = 0,
Configuration  config = Configuration() 
) const
Index& Xpace::IndexList::openIndex ( uint  indexNum,
Configuration  config = Configuration() 
)

open an index by number

Parameters
indexNumthe number of the index to get
configif != Configuration(), override index's Configuration with this one
Returns
the found index, Index() if not found
const Index& Xpace::IndexList::openIndex ( uint  indexNum,
Configuration  config = Configuration() 
) const
uint Xpace::IndexList::addIndex ( Index index)
Parameters
indexindex to add
Returns
number of added index
bool Xpace::IndexList::write ( Index::WriteStatus st = 0)

write in current state

Parameters
wstwrite status callback
Returns
true if successful and complete, false if failed or stopped by callback
bool Xpace::IndexList::range ( const Configuration config,
Index::WriteStatus st = 0 
)

speed up range search for indexes in a list

Parameters
configspecifies from/to files, indexes to be oprimized
Returns
true if successful, false if failed of stopped by callback
static bool Xpace::IndexList::merge ( const Configuration config,
const std::vector< IndexList * > &  list,
Index::WriteStatus st = 0 
)
static

merge a list of index lists

Parameters
configmerge to a new index list with this configuration
listlist of lindx lists to merge
Returns
true if successful and complete, false if failed or stopped by callback

Friends And Related Function Documentation

friend class indexListImpl
friend

Definition at line 241 of file indexlist.h.

Member Data Documentation

DECLARE_CONFIG const char* Xpace::IndexList::TAG
static

Definition at line 236 of file indexlist.h.


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

current as of Wed Jun 10 2026 12:00:06