// GenTextile - A composite textile generator
// Copyright (C) 2011-2026 Eric Bechet, Frederic Duboeuf
//
// See the LICENSE file for license information and contributions.
// Please report all bugs and problems to <bechet@cadxfem.org> or <duboeuf@outlook.com>.


#ifndef _GENDATAT_H_
#define _GENDATAT_H_

#include "genDataIO.h"

class genTextile
{
public :
  enum tenstype{Unknown=-1,Integer,Scalar,Vector,Tensor};
  std::string name;
  std::map<std::string,int> Integers;
  std::map<std::string,double> Scalars;
  std::map<std::string,std::vector<double> > Vectors;
  std::map<std::string,genMatrix<double> > Tensors;
  std::map<std::string,tenstype> AllData;

  std::vector<genTensor1<double> > points; // points
  std::vector<genTensor1<double> > normals; // normale aux points
  std::vector<double> curvatures; // courbure aux points
public :
  genTextile() {}
  friend std::istream & operator>>(std::istream &is, genTextile &obj);
  friend std::ostream & operator<<(std::ostream &os, const genTextile &obj);
};

std::istream & operator>>(std::istream &is, genTextile &obj);
std::ostream & operator<<(std::ostream &os, const genTextile &obj);

class genDataT : public genDataIO
{
public:
  genTextile* T;
public:
  genDataT() : genDataIO(), T(0) {}
  virtual void readInputFile(const std::string &fileName);
  virtual void dumpContent(std::ostream &os);
  virtual ~genDataT()
  {
    if (T) delete T;
  }
};


#endif //_GENDATAT_H_