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

📄 pipelinestage.h

📁 barcode readers [ from Image]
💻 H
字号:
// 
// PipelineStage.h
//   This pure abstract class defines the interface to a stage in an image processing pipeline.
//   A stage in an image processing pipeline takes pointers to image objects (object derived from
//   Image) as inputs to its PushL operation and may produce similar objects in its FrontL accessor.
//
//   For reasons of memory efficiency, PipelineStage objects may alter the contents of the objects they
//   are passed. So it is not safe to assume that an object retains its value after a PushL() operation
//   into a pipeline. Since PipelineStage objects are sequenced one after the other, it is also not
//   safe for a PipelineStage object to assume that an object it returns from a FrontL() operation still
//   has the same value when the next PushL() takes place. The only way to make sure of a object's value
//   is to make a copy, which is not exposed to the outside world.
//
//   Pipeline stages retain ownership of any object they create, even those passed on through FrontL(),
//   for example. They must free all objects they create on destruction. They must not destroy any 
//   objects created by others.
//
// Copyright (C) 2003, 2006 by Jon A. Webb (Contact via GMail; username is jonawebb)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// 
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
//

#ifndef MPipelineStage_h
#define MPipelineStage_h

#include "Image.h"

#include <e32cons.h>

namespace Core
{
	class MPipelineStage :
		public CBase
	{
		// Lifecycle
	public:
		virtual ~MPipelineStage() {};

	protected:
		MPipelineStage() {};

		// Operations
	public:
		// PushL sends a new image object into the pipeline stage. 
		IMPORT_C virtual void PushL(Core::CImage) = 0;

		// FrontL returns the first image object resulting from this stage
		// and removes it from the pipeline.
		// It is an error to call FrontL if Empty() returns false.
		IMPORT_C virtual Core::CImage FrontL() = 0;

		// Accessors
	public:
		// Empty returns true if, and only if, there is at least one image object that can 
		// still be un-PopL'd from this stage
		IMPORT_C virtual bool Empty() const = 0;
	};

};
#endif // MPipelineStage_h

⌨️ 快捷键说明

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