Public Member Functions | Public Attributes

TBT Class Reference

Time Based Text player and recorder class. More...

#include <tbt.h>

List of all members.

Public Member Functions

int init ()
 this should be called before starting use of TBT
void append (uint64_t key)
 append a key marked at the time this function is called
uint64_t getkey ()
 wait the time delta of the key and then returns it
int load (char *filename)
 load a .tbt binary file
int save_bin (char *filename)
 save a .tbt file in binary format
int load_ascii (char *filename)
 load a .tbt ASCII file
int save_ascii (char *filename)
 save a .tbt ASCII file, in plain text format
int save_html (char *filename)
 save a .html page suitable for web browsers
int save_doku (char *filename)
 save a dokuwiki page
void clear ()
 deletes all current keys and frees memory

Public Attributes

int position
 current position incremented by getkey calls
Linklist * buffer
 the linklist of all TBTEntry:: currently loaded or recorded
bool quit
 quit switch (facility for running loops)

Detailed Description

Time Based Text player and recorder class.

This class offers an easy programming interface to implement TBT applicatons that playback, convert and record new message sequences.

It works as a memory buffer holding the time based text: for example it can load TBT files, edit them adding and removing entries, save the result into a new file. Its high-level API includes methods to read/write to files of various formats (ascii, binary or html)

TBT also offers access to the lower-lever interface, providing access to the actual sequence of entries collected: it's member TBT::buffer is a Linklist where TBTEntry units can be directly accessed.

Definition at line 59 of file tbt.h.


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