readerfactory.h

来自「把html转成txt 把html转成txt」· C头文件 代码 · 共 39 行

H
39
字号
//---------------------------------------------------------------------------

#ifndef ReaderFactoryH
#define ReaderFactoryH
#include <map>
#include <istream>
#include "ReaderInterface.h"
#include "WriterInterface.h"
#include "FileFormat.h"
#include "shared_ptr.h"
#include "DebugLog.h"
// This class uses an abstract factory to hide the details of
// the writer instantiation

//---------------------------------------------------------------------------
namespace DoxEngine
{

	class ReaderFactory
	{
		public:
			virtual ReadInterface* Create(std::istream &stream, WriterInterface &writer, DebugLog& newLog) = 0;
	};


  typedef shared_ptr<ReaderFactory> ReaderFactoryPtr;
	typedef std::map<const FileFormat, ReaderFactoryPtr> ReaderFactories;

	class ReaderFactoriesSingleton
	{
		public:
			// This function should only be called from the main thread
			static ReaderFactories& GetReaderFactories();
      
	};
}

#endif

⌨️ 快捷键说明

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