<commit_before>/*
 * 	SnapFind (Release 0.9)
 *      An interactive image search application
 *
 *      Copyright (c) 2002-2005, Intel Corporation
 *      All Rights Reserved
 *
 *  This software is distributed under the terms of the Eclipse Public
 *  License, Version 1.0 which can be found in the file named LICENSE.
 *  ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS SOFTWARE CONSTITUTES
 *  RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT
 */

#ifndef	_SEARCH_SET_H_
#define	_SEARCH_SET_H_	1

#include <iostream>
#include <list>
#include <vector>
//#include <iterator>
#include "rgb.h"
#include "lib_searchlet.h"
#include "img_search.h"

using namespace	std;


/* forward declaration */
class search_set;

typedef  list<img_search *>::iterator	search_iter_t;

/* function proto type for a callback when the set changes */
typedef  void (*sset_notify_fn)(search_set *set
                               );
typedef  vector<sset_notify_fn>::iterator	cb_iter_t;

class search_set
{
public:
	search_set();
	virtual 	~search_set();

	void		add_search(img_search *new_search);
	void		remove_search(img_search *old_search);

	void		reset_search_iter(search_iter_t *iter);
	img_search *get_next_search(search_iter_t *iter);

	img_search     *find_search(char *name);

	/* calls to add new dependency or reset the list */
	void		add_dep(img_search *dep_search);
	void		clear_deps();


	/* get pointers to the current iteration */
	/* XXX this can probably be done better.  */
	void 		reset_dep_iter(search_iter_t *iter);
	img_search *get_next_dep(search_iter_t *iter);
<commit_msg>added iterator to interface for find_search<commit_after>/*
 * 	SnapFind (Release 0.9)
 *      An interactive image search application
 *
 *      Copyright (c) 2002-2005, Intel Corporation
 *      All Rights Reserved
 *
 *  This software is distributed under the terms of the Eclipse Public
 *  License, Version 1.0 which can be found in the file named LICENSE.
 *  ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS SOFTWARE CONSTITUTES
 *  RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT
 */

#ifndef	_SEARCH_SET_H_
#define	_SEARCH_SET_H_	1

#include <iostream>
#include <list>
#include <vector>
//#include <iterator>
#include "rgb.h"
#include "lib_searchlet.h"
#include "img_search.h"

using namespace	std;


/* forward declaration */
class search_set;

typedef  list<img_search *>::iterator	search_iter_t;

/* function proto type for a callback when the set changes */
typedef  void (*sset_notify_fn)(search_set *set
                               );
typedef  vector<sset_notify_fn>::iterator	cb_iter_t;

class search_set
{
public:
	search_set();
	virtual 	~search_set();

	void		add_search(img_search *new_search);
	void		remove_search(img_search *old_search);

	void		reset_search_iter(search_iter_t *iter);
	img_search *get_next_search(search_iter_t *iter);

	img_search     *find_search(char *name, search_iter_t *iter);

	/* calls to add new dependency or reset the list */
	void		add_dep(img_search *dep_search);
	void		clear_deps();


	/* get pointers to the current iteration */
	/* XXX this can probably be done better.  */
	void 		reset_dep_iter(search_iter_t *iter);
	img_search *get_next_dep(search_iter_t *iter);

{'fraction_non_alphanumeric': 0.09167974882260596, 'fraction_numerical': 0.00816326530612245, 'mean_word_length': 4.138709677419355, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5970677', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1055, 'n_words': 317}