Xpace
Xpace::Store Class Reference

A Store is a hierarchically organized dataset, suitable for managing structured text and multidimensional (OLAP) data. More...

#include <store.h>

Classes

class  cantOpen
 
class  Sink
 A write-only, forward (by document) cursor into a Store. More...
 

Public Types

enum  Status {
  Continue, Parent, Child, Sibling,
  Done
}
 The result of getting data from a node. More...
 
enum  AddressBy { AB_location, AB_childName, AB_childNum }
 The LOC param to Sink. More...
 
typedef std::vector< uintLocation
 A location within a source. More...
 

Public Member Functions

 Store (const String &config, StoreAccess access=SA_readOnly)
 
bool operator! () const
 
String getName () const
 
String getConfig () const
 
uint64 getDocCount () const
 
SinkgetSink ()
 
bool forEach (Sink *sink, Store::AddressBy addressBy, const std::vector< Store::Location > &nodes=std::vector< Store::Location >()) const
 Call a Sink for each node in Store order. More...
 
 DECLARE_IMPL (Store)
 

Static Public Member Functions

static const char * TAG ()
 Configuration tag for a Store. More...
 

Static Public Attributes

static const char * CLASSTREE_TAG
 Configuration tag for a ClassTree. More...
 
static const char * NAME_TAG
 Configuration tag for a Store's name. More...
 

Detailed Description

A Store is a hierarchically organized dataset, suitable for managing structured text and multidimensional (OLAP) data.

Definition at line 26 of file store.h.

Member Typedef Documentation

typedef std::vector<uint> Xpace::Store::Location

A location within a source.

IDs of ancestor nodes and self/target

Definition at line 64 of file store.h.

Member Enumeration Documentation

The result of getting data from a node.

Enumerator
Continue 

in the middle of content

Parent 

end of this content and children, parent next

Child 

end of this content, child next

Sibling 

end of this content and children, sibling next

Done 

(sub)tree has been traversed; no further movement possible

Definition at line 67 of file store.h.

The LOC param to Sink.

Enumerator
AB_location 

LOC = Location.

AB_childName 

LOC = const String&: the node's name (relative to parent)

AB_childNum 

LOC = uint: the node's number (relative to parent)

Definition at line 97 of file store.h.

Constructor & Destructor Documentation

Xpace::Store::Store ( const String config,
StoreAccess  access = SA_readOnly 
)
explicit
Parameters
configthe Store's Configuration
accesshow the Store will be opened
Exceptions
File_Cant_Open
File_Cant_Read

Member Function Documentation

static const char* Xpace::Store::TAG ( )
static

Configuration tag for a Store.

bool Xpace::Store::operator! ( ) const
Returns
true if the store is empty or does not exist
String Xpace::Store::getName ( ) const
Returns
the Store's name
String Xpace::Store::getConfig ( ) const
Returns
the Store's configuration
uint64 Xpace::Store::getDocCount ( ) const
Returns
the number of Documents in the store
Sink* Xpace::Store::getSink ( )
Returns
the (only) Sink to this table
bool Xpace::Store::forEach ( Sink sink,
Store::AddressBy  addressBy,
const std::vector< Store::Location > &  nodes = std::vector< Store::Location >() 
) const

Call a Sink for each node in Store order.

Parameters
sinkcalled for each node
addressByuse this set of callbacks to Sink
nodesif not empty, return these nodes in store order
Returns
true iff sink always returned true, false otherwise
Xpace::Store::DECLARE_IMPL ( Store  )

Member Data Documentation

const char* Xpace::Store::CLASSTREE_TAG
static

Configuration tag for a ClassTree.

Definition at line 30 of file store.h.

const char* Xpace::Store::NAME_TAG
static

Configuration tag for a Store's name.

Definition at line 31 of file store.h.


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

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