foobar2000 SDK  2015-08-03
Data Structures | Functions
console Namespace Reference

Data Structures

class  formatter
 
class  timer_scope
 

Functions

void complain (const char *what, const char *msg)
 
void complain (const char *what, std::exception const &e)
 
void error (const char *p_message)
 
void info (const char *p_message)
 
void info_location (const playable_location &src)
 
void info_location (const metadb_handle_ptr &src)
 
void print (const char *)
 
void print_location (const playable_location &src)
 
void print_location (const metadb_handle_ptr &src)
 
void printf (const char *,...)
 
void printfv (const char *, va_list p_arglist)
 
void warning (const char *p_message)
 

Detailed Description

Namespace with functions for sending text to console. All functions are fully multi-thread safe, though they must not be called during dll initialization or deinitialization (e.g. static object constructors or destructors) when service system is not available.

Function Documentation

void console::complain ( const char *  what,
const char *  msg 
)

Definition at line 21 of file console.cpp.

21  {
22  FB2K_console_formatter() << what << ": " << msg;
23 }
void console::complain ( const char *  what,
std::exception const &  e 
)

Definition at line 24 of file console.cpp.

24  {
25  complain(what, e.what());
26 }
void complain(const char *what, const char *msg)
Definition: console.cpp:21
void console::error ( const char *  p_message)

Definition at line 5 of file console.cpp.

5 {complain("Error", p_message);}
void complain(const char *what, const char *msg)
Definition: console.cpp:21
void console::info ( const char *  p_message)

Definition at line 4 of file console.cpp.

4 {print(p_message);}
void print(const char *)
Definition: console.cpp:28
void console::info_location ( const playable_location src)

Definition at line 8 of file console.cpp.

8 {print_location(src);}
void print_location(const playable_location &src)
Definition: console.cpp:16
void console::info_location ( const metadb_handle_ptr src)

Definition at line 9 of file console.cpp.

9 {print_location(src);}
void print_location(const playable_location &src)
Definition: console.cpp:16
void console::print ( const char *  p_message)

Definition at line 28 of file console.cpp.

29 {
33  while(e.next(ptr)) ptr->print(p_message,~0);
34  }
35 }
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
Definition: service.h:55
bool next(service_ptr_t< t_query > &p_out)
Definition: service.h:587
bool are_services_available()
Tests whether services are available at this time. They are not available only during DLL startup or ...
void console::print_location ( const playable_location src)

Definition at line 16 of file console.cpp.

17 {
18  FB2K_console_formatter() << src;
19 }
void console::print_location ( const metadb_handle_ptr src)

Definition at line 11 of file console.cpp.

12 {
13  print_location(src->get_location());
14 }
void print_location(const playable_location &src)
Definition: console.cpp:16
void console::printf ( const char *  p_format,
  ... 
)

Definition at line 37 of file console.cpp.

38 {
39  va_list list;
40  va_start(list,p_format);
41  printfv(p_format,list);
42  va_end(list);
43 }
void printfv(const char *, va_list p_arglist)
Definition: console.cpp:45
void console::printfv ( const char *  p_format,
va_list  p_arglist 
)

Definition at line 45 of file console.cpp.

46 {
48  uPrintfV(temp,p_format,p_arglist);
49  print(temp);
50 }
void SHARED_EXPORT uPrintfV(pfc::string_base &out, const char *fmt, va_list arglist)
void print(const char *)
Definition: console.cpp:28
string8_t< pfc::alloc_fast_aggressive > string8_fastalloc
Definition: string_base.h:436
void console::warning ( const char *  p_message)

Definition at line 6 of file console.cpp.

6 {complain("Warning", p_message);}
void complain(const char *what, const char *msg)
Definition: console.cpp:21