#pragma once #include #include #include // typemaps namespace xs { template <> struct Typemap : TypemapBase { static inline panda::log::Level in (SV* sv) { int l = SvIV(sv); if (l < (int)panda::log::Level::VerboseDebug || l > (int)panda::log::Level::Emergency) throw panda::exception("invalid log level"); return (panda::log::Level)l; } static inline Sv out (panda::log::Level l, const Sv& = {}) { return Simple((int)l); } }; template struct Typemap : TypemapObject { static panda::string package () { return "XLog::ILogger"; } }; template <> struct Typemap : Typemap { static panda::log::ILoggerSP in (Sv arg); }; template struct Typemap : TypemapObject { static panda::string package () { return "XLog::IFormatter"; } }; template <> struct Typemap : Typemap { static panda::log::IFormatterSP in (Sv arg); }; template struct Typemap : TypemapObject { static panda::string package () { return "XLog::Module"; } }; }