Kyoto Tycoon

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

kyototycoon::UpdateLogger::Reader::Reader | ( |  | ) | `[explicit]`

Default constructor.

kyototycoon::UpdateLogger::Reader::~Reader | ( |  | ) |

Destructor.

## Member Function Documentation

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

Open the reader.

Parameters:

  ulog | the update logger.
  ts | the maximum time stamp of already read logs.

Returns:
  true on success, or false on failure.

bool kyototycoon::UpdateLogger::Reader::close | ( |  | ) |

Close the reader.

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

Read the next message.

Parameters:

  sp | the pointer to the variable into which the size of the region of the return value is assigned.
  tsp | the 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.