Kyoto Tycoon
Public Member Functions
kyototycoon::UpdateLogger::Reader Class Reference

Reader of update logs. More...

#include <ktulog.h>

List of all members.

Public Member Functions

 Reader ()
 Default constructor.
 ~Reader ()
 Destructor.
bool open (UpdateLogger *ulog, uint64_t ts=0)
 Open the reader.
bool close ()
 Close the reader.
char * read (size_t *sp, uint64_t *tsp)
 Read the next message.

Detailed Description

Reader of update logs.


Constructor & Destructor Documentation

Default constructor.

Destructor.


Member Function Documentation

bool kyototycoon::UpdateLogger::Reader::open ( UpdateLogger ulog,
uint64_t  ts = 0 
)

Open the reader.

Parameters:
ulogthe update logger.
tsthe maximum time stamp of already read logs.
Returns:
true on success, or false on failure.

Close the reader.

char* kyototycoon::UpdateLogger::Reader::read ( size_t *  sp,
uint64_t *  tsp 
)

Read the next message.

Parameters:
spthe pointer to the variable into which the size of the region of the return value is assigned.
tspthe pointer to the variable into which the time stamp is assigned.
Returns:
the pointer to the region of the message, or NULL on failure. Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use.