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

📄 ladder.h

📁 barcode readers [ from Image]
💻 H
字号:
//
// Ladder
//   A pipeline that consists of two parallel pipelines that are combined by a "Join" function.
//   Any image input is passed down both pipelines and the results of each are combined in the
//   join function, giving the result. Unlike a real ladder, the two pipelines do not have to
//   be the same length, but they must both give exactly one result for one input. The input
//   image is replicated so that both pipelines can modify it if they wish.
//
// 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 Ladder_h
#define Ladder_h

#include "Image.h"
#include "PipelineStage.h"

#include <e32cons.h>

namespace Core
{
	// Abstract class that defines the method used to combine the images
	class MJoin
	{
		// Lifecycle
	public:
		virtual ~MJoin() {};

	protected:
		MJoin() {}

		// Operations
	public:
		virtual CImage DoJoinL(CImage, CImage) = 0;
	};

	class CLadder :
		public MPipelineStage
	{
	public:
		IMPORT_C static CLadder* NewL(MPipelineStage* pipe1, MPipelineStage* pipe2, MJoin* MJoin);

		~CLadder(void);

	private:
		CLadder(MPipelineStage* pipe1, MPipelineStage* pipe2, MJoin* join);

		// Operations
	public:
		///////////////////// Overrides ////////////////////////
		//
		// Overrides from MPipelineStage:
		//
			// Operations
		public:
			Core::CImage FrontL();
			void PushL(Core::CImage pImg);

			// Accessors
		public:

			bool Empty() const;

		//
		//
		/////////////////// End of overrides ///////////////////

	private:
		// Attributes
		bool ibEmpty;
		Core::CImage iResult;
		MPipelineStage* iPipe1;
		MPipelineStage* iPipe2;
		MJoin* iJoin;
		Core::CImage iImage;
	};
};

#endif // Ladder_h

⌨️ 快捷键说明

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