SampleHandler.h 2.11 KB
Newer Older
Francois Gygi committed
1 2
////////////////////////////////////////////////////////////////////////////////
//
Francois Gygi committed
3 4 5 6 7 8 9 10 11 12 13 14
// Copyright (c) 2008 The Regents of the University of California
//
// This file is part of Qbox
//
// Qbox is distributed 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.
// See the file COPYING in the root directory of this distribution
// or <http://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////////////////////
//
Francois Gygi committed
15 16 17
// SampleHandler.h
//
////////////////////////////////////////////////////////////////////////////////
Francois Gygi committed
18
// $Id: SampleHandler.h,v 1.9 2008-08-13 06:39:43 fgygi Exp $
Francois Gygi committed
19 20 21 22 23

#ifndef SAMPLEHANDLER_H
#define SAMPLEHANDLER_H

#include "StructureHandler.h"
24
#include <string>
Francois Gygi committed
25
#include <vector>
Francois Gygi committed
26 27 28 29 30 31 32
class DoubleMatrix;
class Sample;
class Wavefunction;

class SampleHandler : public StructureHandler
{
  private:
33

Francois Gygi committed
34
  Sample& s_;
Francois Gygi committed
35
  std::vector<std::vector<std::vector<double> > > &dmat_;
Francois Gygi committed
36 37 38 39
  DoubleMatrix& gfdata_;
  Wavefunction& wfvtmp_;

  public:
40

Francois Gygi committed
41
  bool read_wf,read_wfv;
42 43 44
  int& nx_;
  int& ny_;
  int& nz_;
45

Francois Gygi committed
46 47 48 49 50
  // Start of the root element in the structure being handled
  virtual void startElement(const XMLCh* const uri,const XMLCh* const localname,
      const XMLCh* const qname, const Attributes& attributes);

  // End of the root element in the structure being handled
51
  virtual void endElement(const XMLCh* const uri, const XMLCh* const localname,
52
      const XMLCh* const qname, std::string& content);
53

Francois Gygi committed
54 55
  // start a subhandler
  virtual StructureHandler* startSubHandler(const XMLCh* const uri,
56
    const XMLCh* const localname, const XMLCh* const qname,
Francois Gygi committed
57
    const Attributes& attributes);
58

Francois Gygi committed
59 60
  // end a subhandler
  virtual void endSubHandler(const XMLCh* const uri,
61
    const XMLCh* const localname, const XMLCh* const qname,
Francois Gygi committed
62 63
    const StructureHandler* const subHandler);

64
  SampleHandler(Sample& s, DoubleMatrix& gfdata, int& nx, int& ny, int& nz,
Francois Gygi committed
65 66
                std::vector<std::vector<std::vector<double> > > &dmat,
                Wavefunction& wfvtmp);
Francois Gygi committed
67 68 69
  ~SampleHandler();
};
#endif