/***************************************************************************

    supportware
    Copyright (C) 2001-2008 by c.holzheuer
    c.holzheuer@sourceworx.org

    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 DDITEMSET_H
#define DDITEMSET_H

#include <dditemtree.h>
#include <dditemfactory.h> 


using namespace std;


/// dditemset: enthält alle templates einer site
/**
	FIX! Neu ladbar machen!
*/


class dditemset : public dditemtree
{

public:

  dditemset();
  virtual ~dditemset();
	dditem* clone() const;
  
  // erzeugung
  void init_items(  const ddstring& basepath, const ddstring& sitepath="" );

  bool create_from_extend( dditemtree& current, const ddstring& key );
  
protected:
 
  void create_from_string(  dditemtree& current, const ddstring& src );
  bool create_from_key( dditemtree& current, const ddstring& key, const ddstring& src, size_t& end );
  void create_from_file( dditemtree& current, const ddstring& key, ddioinfo& file );
 
	ddioinfo      _dirinfo;
	dditemfactory _factory;

};

#endif
