⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nllayout.h

📁 一些unix下的c/c++的util包
💻 H
字号:
/**
 * 日志布局抽象基类
 * @file NLLayout.h
 * @date 2006年11月9日
 * @author 周志武
 * @version 1.0.0: 初始版本
 **/

 
#ifndef _NLLAYOUT_H_
#define _NLLAYOUT_H_
#include <iosfwd>
#include <string>

namespace nlkit
{
    class NLEvent;
	/**
	Extend this abstract class to create your own log layout format.
	*/
	class NLLayout 
	{
	public:

		virtual ~NLLayout() {}

		/**
		Implement this method to create your own layout format.
		*/
		virtual void format(std::ostream& output, const NLEvent& event) const = 0;

		/**
		Returns the content type output by this layout. The base class
		returns "text/plain".
		*/
		virtual std::string getContentType() const { return ("text/plain"); }

		/**
		Append the header for the layout format. The base class does
		nothing.
		*/
		virtual void appendHeader(std::ostream& output) {}

		/**
		Append the footer for the layout format. The base class does
		nothing.
		*/
		virtual void appendFooter(std::ostream& output) {}
	};
} 

#endif // _NLLAYOUT_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -