foobar2000 SDK  2015-08-03
console.cpp
Go to the documentation of this file.
1 #include "foobar2000.h"
2 
3 
4 void console::info(const char * p_message) {print(p_message);}
5 void console::error(const char * p_message) {complain("Error", p_message);}
6 void console::warning(const char * p_message) {complain("Warning", p_message);}
7 
10 
12 {
13  print_location(src->get_location());
14 }
15 
17 {
18  FB2K_console_formatter() << src;
19 }
20 
21 void console::complain(const char * what, const char * msg) {
22  FB2K_console_formatter() << what << ": " << msg;
23 }
24 void console::complain(const char * what, std::exception const & e) {
25  complain(what, e.what());
26 }
27 
28 void console::print(const char* p_message)
29 {
33  while(e.next(ptr)) ptr->print(p_message,~0);
34  }
35 }
36 
37 void console::printf(const char* p_format,...)
38 {
39  va_list list;
40  va_start(list,p_format);
41  printfv(p_format,list);
42  va_end(list);
43 }
44 
45 void console::printfv(const char* p_format,va_list p_arglist)
46 {
48  uPrintfV(temp,p_format,p_arglist);
49  print(temp);
50 }
void warning(const char *p_message)
Definition: console.cpp:6
void SHARED_EXPORT uPrintfV(pfc::string_base &out, const char *fmt, va_list arglist)
void info(const char *p_message)
Definition: console.cpp:4
void info_location(const playable_location &src)
Definition: console.cpp:8
void complain(const char *what, const char *msg)
Definition: console.cpp:21
void printf(const char *,...)
Definition: console.cpp:37
void print(const char *)
Definition: console.cpp:28
std::exception exception
Definition: primitives.h:193
void print_location(const playable_location &src)
Definition: console.cpp:16
void error(const char *p_message)
Definition: console.cpp:5
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 printfv(const char *, va_list p_arglist)
Definition: console.cpp:45
string8_t< pfc::alloc_fast_aggressive > string8_fastalloc
Definition: string_base.h:436