AtomSetHandler.h 1.47 KB
Newer Older
Francois Gygi committed
1 2 3 4 5
////////////////////////////////////////////////////////////////////////////////
//
// AtomSetHandler.h
//
////////////////////////////////////////////////////////////////////////////////
6
// $Id: AtomSetHandler.h,v 1.3 2007-10-19 16:24:04 fgygi Exp $
Francois Gygi committed
7 8 9 10 11 12

#ifndef ATOMSETHANDLER_H
#define ATOMSETHANDLER_H

#include "StructureHandler.h"
#include "D3vector.h"
13
#include <string>
Francois Gygi committed
14 15 16 17 18 19 20

class AtomSet;
class Species;

class AtomSetHandler : public StructureHandler
{
  private:
21

Francois Gygi committed
22
  AtomSet& as_;
23 24
  std::string current_atom_name, current_atom_species;
  std::string current_species_name;
Francois Gygi committed
25 26 27 28
  D3vector current_atom_position, current_atom_velocity;
  Species* current_species;

  public:
29

Francois Gygi committed
30 31 32 33 34
  // 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
35
  virtual void endElement(const XMLCh* const uri, const XMLCh* const localname,
36
      const XMLCh* const qname, std::string& content);
37

Francois Gygi committed
38 39
  // start a subhandler
  virtual StructureHandler* startSubHandler(const XMLCh* const uri,
40
    const XMLCh* const localname, const XMLCh* const qname,
Francois Gygi committed
41
    const Attributes& attributes);
42

Francois Gygi committed
43 44
  // end a subhandler
  virtual void endSubHandler(const XMLCh* const uri,
45
    const XMLCh* const localname, const XMLCh* const qname,
Francois Gygi committed
46 47 48 49 50 51
    const StructureHandler* const subHandler);

  AtomSetHandler(AtomSet& as);
  ~AtomSetHandler();
};
#endif