// genDElement - An abstract data element library
// Copyright (C) 2013-2026 Eric Bechet, Frederic Duboeuf
//
// See the LICENSE file for license information.
// Please report all bugs and problems to <bechet@cadxfem.org> or <duboeuf@outlook.com>.
//
// Initial design: Frederic Duboeuf (rev.1511)


#ifndef _GEN_DATA_POLICIES_H_
#define _GEN_DATA_POLICIES_H_

#include <string>

#include "genDataGroup.h"

template<class E> class DElementBase;
class nothing;
template<class DE> class nothingTemplate;

template<class E,class D> struct DataPolicies
{
  static void addData(genDataGroup* datas, const char* s, DElementBase<E>* de) {datas->setData(s,new D(s,de));}
};

template<class E> struct DataPolicies<E,nothing>
{
  static void addData(genDataGroup* datas, const char* s, DElementBase<E>* de) {}
};

template<class E, class DE> struct DataPolicies<E,nothingTemplate<DE> >
{
  static void addData(genDataGroup* datas, const char* s, DElementBase<E>* de) {}
};


#endif // _GEN_DATA_POLICIES_H_
