/*
 * ShiftList.h - TaskJuggler
 *
 * SPDX-FileCopyrightText: 2001, 2002, 2003, 2004 Chris Schlaeger <cs@kde.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * $Id$
 */

#ifndef _ShiftList_h_
#define _ShiftList_h_

#include "CoreAttributesList.h"

class QString;

namespace TJ
{

class Shift;

/**
 * @short Stores a list of Shifts.
 * @author Chris Schlaeger <cs@kde.org>
 */
class ShiftList : public CoreAttributesList
{
public:
    ShiftList()
    {
        sorting[0] = TreeMode;
        sorting[1] = SequenceUp;
    }
    ~ShiftList() override { }

    Shift* getShift(const QString& id) const;

    int compareItemsLevel(CoreAttributes* c1, CoreAttributes* c2,
                                  int level) override;
} ;

/**
 * @short Iterator class for ShiftList objects.
 * @see ShiftList
 * @author Chris Schlaeger <cs@kde.org>
 */
class ShiftListIterator : public virtual CoreAttributesListIterator
{
public:
    explicit ShiftListIterator(const CoreAttributesList& l) :
        CoreAttributesListIterator(l) { }
    ~ShiftListIterator() override { }
    Shift* operator*();
} ;

} // namespace TJ

#endif
