container4perl.h

来自「该软件可以方便的把HTML网页解析成一棵Tree」· C头文件 代码 · 共 68 行

H
68
字号
/***	HTML::Tree**	mod/HTML/Tree/container4perl.h****	Copyright (C) 2001  Paul J. Lucas****	This program is free software; you can redistribute it and/or modify**	it under the terms of the GNU General Public License as published by**	the Free Software Foundation; either version 2 of the License, or**	(at your option) any later version.****	This program 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 General Public License for more details.****	You should have received a copy of the GNU General Public License**	along with this program; if not, write to the Free Software**	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.*/#ifndef	container4perl_H#define	container4perl_H#include "HTML_Tree.h"//*****************************************************************************//// SYNOPSIS//	template< class Container > struct container4perl//// DESCRIPTION////	A container4perl is a wrapper around an STL container class to be used//	to implement tied data structures in Perl.  It bundles in a single//	iterator since each hash in Perl has exactly one iterator for it.//// NOTE////	FYI, since this wrapper merely contains a reference to the container,//	there in fact can be more than one iterator for it; however, this fact//	is of little use to Perl.//// SEE ALSO////	Larry Wall, et al.  "Programming Perl," 2nd ed., O'Reilly and//	Associates, Inc., Sebastopol, CA, 1996, pp. 159-160.////*****************************************************************************{	typedef Container container_type;	typedef typename container_type::const_iterator const_iterator;	container4perl( container_type &c ) : container_( c ) { }	container_type	&container_;	const_iterator	iter_;};//// In the case of HTML::Tree, we want to wrap an Element_Node's attributes to// make them accessible via a tied hash.//typedef	container4perl< HTML_Tree::Element_Node::attribute_map > atts4perl;#endif	/* container4perl_H */

⌨️ 快捷键说明

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