def logging_cpp_repr(self): methods = \ indent(' ' * 2, "\n\n".join(function.logging_cpp_repr() for function in self.functions)) name = self.cpp_name() service_name = CppService.cpp_name(self) service_qname = CppService.cpp_qname(self) return """\ template <class %(service_name)sT, int VerboseLevel> class %(name)s final : public %(service_qname)s { public: %(name)s(::std::shared_ptr<%(service_name)sT> impl) : impl_(impl) { } virtual ~%(name)s() { } public: %(methods)s private: static inline ::std::string to_string(const ::thryft::Base& object) { ::thryft::protocol::JsonOutputProtocol oprot; object.write(oprot); return oprot.to_string(); } static inline ::std::string to_string(const ::thryft::native::Variant& variant) { return variant.operator std::string(); } private: ::std::shared_ptr<%(service_name)sT> impl_; };""" % locals()
def cpp_name(self): return 'Logging' + CppService.cpp_name(self)
def cpp_name(self): return "Logging" + CppService.cpp_name(self)