X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fadt%2Fset.h;h=8236152fcab907f77cec4330c7b4c87501afaecd;hb=ef5f65eb6b79824a5523a18d6a114c5466d95d53;hp=f0991d719bfe4fb88d5fd50fdc65e4eabf9528c5;hpb=b2a0aff70d9876c1b2ff7aa9ba8aa9024d1128c5;p=libfirm diff --git a/ir/adt/set.h b/ir/adt/set.h index f0991d719..8236152fc 100644 --- a/ir/adt/set.h +++ b/ir/adt/set.h @@ -1,23 +1,30 @@ /* - * Project: libFIRM - * File name: ir/adt/set.h - * Purpose: Declarations for set. - * Author: Markus Armbruster - * Modified by: - * Created: 1999 by getting from fiasco - * CVS-ID: $Id$ - * Copyright: (c) 1995, 1996 Markus Armbruster - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. */ /** - * @file set.h - * - * Declarations for set. + * @file + * @brief hashset: datastructure containing objects accessible by their key + * @author Markus Armbruster + * @verison $Id$ */ - -#ifndef _SET_H -#define _SET_H +#ifndef FIRM_ADT_SET_H +#define FIRM_ADT_SET_H #include @@ -172,6 +179,14 @@ void *set_next (set *set); */ void set_break (set *set); +/** + * Iterates over an set. + * + * @param set the set + * @param entry the iterator + */ +#define foreach_set(set, entry) for (entry = set_first(set); entry; entry = set_next(set)) + /* implementation specific */ #define new_set(cmp, slots) (SET_TRACE (new_set) ((cmp), (slots))) #define set_find(set, key, size, hash) \