/*
 * Scenario.cpp - TaskJuggler
 *
 * Copyright (c) 2001, 2002, 2003, 2004 by Chris Schlaeger <cs@suse.de>
 *
 * 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: Scenario.cpp 657 2004-03-28 17:19:07Z cs $
 */

#include "Scenario.h"
#include "ScenarioList.h"
#include "Project.h"

Scenario::Scenario(Project* p, const QString& i, const QString& n,
                   Scenario* pr)
    : CoreAttributes(p, i, n, pr)
{
    p->addScenario(this);
    enabled = TRUE;
    projectionMode = FALSE;
    optimize = FALSE;
}

Scenario::~Scenario()
{
    project->deleteScenario(this);
}

ScenarioListIterator 
Scenario::getSubListIterator() const
{
    return ScenarioListIterator(*sub);
}

