Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::core::Printer Class Reference

Printer. More...

#include <printer.h>

Inheritance diagram for roc::core::Printer:
Collaboration diagram for roc::core::Printer:

Public Types

enum  { BufferSize = 1024 }
 
typedef void(* PrintlnFunc) (const char *buf, size_t bufsz)
 Printing function. More...
 

Public Member Functions

 Printer (PrintlnFunc println_func=NULL)
 Initialize printer. If println_func is NULL, prints text to console. More...
 
 ~Printer ()
 Flush and destroy. More...
 
size_t writef (const char *format,...)
 Write text. More...
 

Detailed Description

Printer.

Definition at line 23 of file printer.h.

Member Typedef Documentation

◆ PrintlnFunc

typedef void(* roc::core::Printer::PrintlnFunc) (const char *buf, size_t bufsz)

Printing function.

Definition at line 30 of file printer.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
BufferSize 

Maximum buffer size.

Definition at line 25 of file printer.h.

Constructor & Destructor Documentation

◆ Printer()

roc::core::Printer::Printer ( PrintlnFunc  println_func = NULL)

Initialize printer. If println_func is NULL, prints text to console.

◆ ~Printer()

roc::core::Printer::~Printer ( )

Flush and destroy.

Member Function Documentation

◆ writef()

size_t roc::core::Printer::writef ( const char *  format,
  ... 
)

Write text.

Returns
size of formatted string (excluding terminating zero byte).

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