/* ====================================================================
 * Copyright (c) 2009  Martin Hauner
 *                     http://subcommander.tigris.org
 *
 * Subcommander is licensed as described in the file doc/COPYING, which
 * you should have received as part of this distribution.
 * ====================================================================
 */

#ifndef _PROJECTREADER_H
#define _PROJECTREADER_H

// sc
#include "../ProjectTypes.h"
#include "sublib/config/ConfigValue.h"
class ConfigData;

class ProjectReader
{
public:
  ProjectReader( ConfigData*, bool cleanup = false );
  virtual ~ProjectReader();

  void readProjects();
  void getProjects( Projects& projects );

private:
  bool readProject( long num );

  //Project* readProjectRoot( const ConfigValues& values );
  //void readProjectItems( Project* prj, const ConfigValues& values );

  ConfigData* _cfg;
  Projects    _prjs;
  bool        _clr;
};

#endif // _PROJECTREADER_H
