Xpace
Xpace::Sink< LOC, RET > Class Template Reference

#include <data.h>

Inheritance diagram for Xpace::Sink< LOC, RET >:
Xpace::SinkBase

Public Member Functions

virtual LOC add (const String &name, DerivedDataType type, LOC location, bool *added=0)
 Add a field by name. More...
 
virtual LOC add (const Configuration &config, LOC location, bool *added=0)
 Add a field from a Configuration. More...
 
virtual RET move (LOC location)
 Move without setting data. More...
 
virtual RET set (LOC location, int64 value)
 Write an int64. More...
 
virtual RET set (LOC location, const DecimalFloat &value)
 Add a DecimalFloat. More...
 
virtual RET set (LOC location, const String8 &value)
 Add a String8. More...
 
virtual RET set (LOC location, const String16 &value)
 Add a String16. More...
 
virtual RET set (LOC location, const DateTime &value)
 Add a DateTime. More...
 
virtual RET set (LOC location, const BytesRef &value)
 Add a BytesRef. More...
 
- Public Member Functions inherited from Xpace::SinkBase
virtual ~SinkBase ()
 
virtual bool setCount (uint64 docs)
 Inform the Sink how many documents/records/rows to expect. More...
 
virtual int64 start (uint64 docNum)
 Begin a new document/record/row, committing current one (if any) More...
 
virtual void close ()
 We're finshed with this Sink. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Xpace::SinkBase
 SinkBase ()
 

Detailed Description

template<typename LOC, typename RET = bool>
class Xpace::Sink< LOC, RET >

Parameters
LOCthe location (absolute or relative) of a datum (e.g. table cell or field)
RETtype of the return value of the functions; usually a bool, true to continue, false to stop

Definition at line 309 of file data.h.

Member Function Documentation

template<typename LOC, typename RET = bool>
virtual LOC Xpace::Sink< LOC, RET >::add ( const String name,
DerivedDataType  type,
LOC  location,
bool added = 0 
)
inlinevirtual

Add a field by name.

Parameters
namethe name of the field
typethe type of the field
locationa proposed location; may be null
Return values
addedtrue iff the field or column was added
Returns
the actual location, NULL to stop

Reimplemented in Xpace::Table::Sink, Xpace::JavaTableSink, and Xpace::TableSinkToStore.

Definition at line 319 of file data.h.

Referenced by Xpace::TranslateStringInt< LOC, STR >::operator()(), Xpace::TranslateStringDateTime< LOC, STR >::TranslateStringDateTime(), Xpace::TranslateStringInt< LOC, STR >::TranslateStringInt(), Xpace::TranslateStringIPv4< LOC, STR >::TranslateStringIPv4(), Xpace::TranslateStringString< LOC, STR >::TranslateStringString(), and Xpace::TranslateStringUint< LOC, STR >::TranslateStringUint().

template<typename LOC, typename RET = bool>
virtual LOC Xpace::Sink< LOC, RET >::add ( const Configuration config,
LOC  location,
bool added = 0 
)
inlinevirtual

Add a field from a Configuration.

Parameters
configthe configuration of the field
locationa proposed location; may be null
Return values
addedtrue iff the column was added
Returns
the actual location, NULL to stop

Reimplemented in Xpace::TableSinkToStore.

Definition at line 335 of file data.h.

template<typename LOC, typename RET = bool>
virtual RET Xpace::Sink< LOC, RET >::move ( LOC  location)
inlinevirtual

Move without setting data.

Parameters
location
Returns
a RET, usually a bool

Definition at line 346 of file data.h.

Referenced by Xpace::TableSinkToStore::BadCode::BadCode().

template<typename LOC, typename RET = bool>
virtual RET Xpace::Sink< LOC, RET >::set ( LOC  location,
const DecimalFloat value 
)
inlinevirtual

Add a DecimalFloat.

Parameters
location
value
Returns
a RET, usually a bool

Reimplemented in Xpace::JavaStoreSink, Xpace::JavaStoreSink, Xpace::JavaTableSink, and Xpace::TableSinkToStore.

Definition at line 368 of file data.h.

template<typename LOC, typename RET = bool>
virtual RET Xpace::Sink< LOC, RET >::set ( LOC  location,
const String8 value 
)
inlinevirtual

Add a String8.

Parameters
location
value
Returns
a RET, usually a bool

Reimplemented in Xpace::JavaStoreSink, Xpace::JavaStoreSink, Xpace::JavaTableSink, and Xpace::TableSinkToStore.

Definition at line 379 of file data.h.

template<typename LOC, typename RET = bool>
virtual RET Xpace::Sink< LOC, RET >::set ( LOC  location,
const String16 value 
)
inlinevirtual

Add a String16.

Parameters
location
value
Returns
a RET, usually a bool

Reimplemented in Xpace::JavaStoreSink, Xpace::JavaStoreSink, Xpace::JavaTableSink, and Xpace::TableSinkToStore.

Definition at line 390 of file data.h.

template<typename LOC, typename RET = bool>
virtual RET Xpace::Sink< LOC, RET >::set ( LOC  location,
const DateTime value 
)
inlinevirtual

Add a DateTime.

Parameters
location
value
Returns
a RET, usually a bool

Reimplemented in Xpace::JavaStoreSink, Xpace::JavaStoreSink, and Xpace::JavaTableSink.

Definition at line 401 of file data.h.

template<typename LOC, typename RET = bool>
virtual RET Xpace::Sink< LOC, RET >::set ( LOC  location,
const BytesRef value 
)
inlinevirtual

Add a BytesRef.

Parameters
location
value
Returns
a RET, usually a bool

Reimplemented in Xpace::JavaStoreSink, Xpace::JavaStoreSink, Xpace::JavaTableSink, and Xpace::TableSinkToStore.

Definition at line 412 of file data.h.


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

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