swift
Loading...
Searching...
No Matches
utils.h File Reference

Go to the source code of this file.

Classes

class  XSwiftBus::Logger
 Simple logger class. Don't use it directly, but the _LOG macros instead. More...

Namespaces

namespace  XSwiftBus
 Plugin loaded by X-Plane which publishes a DBus service.

Macros

#define DEBUG_LOG(msg)
 Logger convenience macros.
#define DEBUG_LOG_C(msg, doLog)
 Logger convenience macros.
#define INFO_LOG(msg)
 Logger convenience macros.
#define WARNING_LOG(msg)
 Logger convenience macros.
#define ERROR_LOG(msg)
 Logger convenience macros.

Functions

void XSwiftBus::initXPlanePath ()
 Init global xplane path.

Variables

std::string XSwiftBus::g_xplanePath
 Absolute xplane path.
std::string XSwiftBus::g_sep
 Platform specific dir separator.

Macro Definition Documentation

◆ DEBUG_LOG

#define DEBUG_LOG ( msg)
Value:
(XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::DebugMsg, (msg)))
static void print(const std::string &filePath, int line, MsgType type, const std::string &message)
Print message to X-Plane log.

Logger convenience macros.

Definition at line 46 of file utils.h.

◆ DEBUG_LOG_C

#define DEBUG_LOG_C ( msg,
doLog )
Value:
((doLog) ? XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::DebugMsg, (msg)) : static_cast<void>(0))

Logger convenience macros.

Definition at line 47 of file utils.h.

◆ ERROR_LOG

#define ERROR_LOG ( msg)
Value:
(XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::ErrorMsg, (msg)))

Logger convenience macros.

Definition at line 51 of file utils.h.

◆ INFO_LOG

#define INFO_LOG ( msg)
Value:
(XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::InfoMsg, (msg)))

Logger convenience macros.

Definition at line 49 of file utils.h.

◆ WARNING_LOG

#define WARNING_LOG ( msg)
Value:
(XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::WarningMsg, (msg)))

Logger convenience macros.

Definition at line 50 of file utils.h.