strus  0.17
Public Member Functions | List of all members
strus::DatabaseCursorInterface::Slice Class Reference

Chunk data structure without ownership for keys and values of the database cursor. More...

#include <databaseCursorInterface.hpp>

Public Member Functions

 Slice ()
 Defaul constructor. More...
 
 Slice (const char *ptr_, std::size_t size_)
 Constructor. More...
 
 Slice (const Slice &o)
 Copy constructor. More...
 
const char * ptr () const
 Get the pointer to data. More...
 
std::size_t size () const
 Get the size of the data in bytes. More...
 
std::string tostring () const
 Return the data as a string. More...
 
 operator std::string () const
 Cast of the data to a string. More...
 
bool defined () const
 Evaluate if the chunk is defined or a NULL reference. More...
 

Detailed Description

Chunk data structure without ownership for keys and values of the database cursor.

Constructor & Destructor Documentation

strus::DatabaseCursorInterface::Slice::Slice ( )
inline

Defaul constructor.

strus::DatabaseCursorInterface::Slice::Slice ( const char *  ptr_,
std::size_t  size_ 
)
inline

Constructor.

Parameters
[in]ptr_pointer to data chunk
[in]size_size of ptr_ in bytes
strus::DatabaseCursorInterface::Slice::Slice ( const Slice o)
inline

Copy constructor.

Parameters
[in]ochunk reference to copy

Member Function Documentation

bool strus::DatabaseCursorInterface::Slice::defined ( ) const
inline

Evaluate if the chunk is defined or a NULL reference.

Returns
true, if yes
strus::DatabaseCursorInterface::Slice::operator std::string ( ) const
inline

Cast of the data to a string.

const char* strus::DatabaseCursorInterface::Slice::ptr ( ) const
inline

Get the pointer to data.

Returns
the pointer
std::size_t strus::DatabaseCursorInterface::Slice::size ( ) const
inline

Get the size of the data in bytes.

Returns
the size
std::string strus::DatabaseCursorInterface::Slice::tostring ( ) const
inline

Return the data as a string.


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