diff options
Diffstat (limited to 'krecipes/src/datablocks/elementlist.h')
-rw-r--r-- | krecipes/src/datablocks/elementlist.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/krecipes/src/datablocks/elementlist.h b/krecipes/src/datablocks/elementlist.h new file mode 100644 index 0000000..1a4f369 --- /dev/null +++ b/krecipes/src/datablocks/elementlist.h @@ -0,0 +1,43 @@ +/*************************************************************************** +* Copyright (C) 2003-2004 by * +* Unai Garro (ugarro@users.sourceforge.net) * +* Jason Kivlighn (jkivlighn@gmail.com) * +* * +* 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. * +***************************************************************************/ +#ifndef ELEMENTLIST_H +#define ELEMENTLIST_H + +#include <qvaluelist.h> +#include <qregexp.h> + +#include "element.h" + +/** +@author Unai Garro +*/ +class ElementList: public QValueList<Element> +{ +public: + ElementList(); + ~ElementList(); + + bool containsId( int id ) const; + bool containsSubSet( ElementList &el ); + + Element findByName( const QString & ) const; + Element findByName( const QRegExp & ) const; + + Element getElement( int index ) const; + + QString join( const QString &sep ) const; + + static ElementList split( const QString &sep, const QString &str ); +}; + +typedef QValueList<int> IDList; + +#endif |