AtomSetHandler.h 1.89 KB
Newer Older
Francois Gygi committed
1 2
////////////////////////////////////////////////////////////////////////////////
//
Francois Gygi committed
3 4 5 6
// Copyright (c) 2008 The Regents of the University of California
//
// This file is part of Qbox
//
Francois Gygi committed
7 8
// Qbox is distributed under the terms of the GNU General Public License
// as published by the Free Software Foundation, either version 2 of
Francois Gygi committed
9 10 11 12 13 14
// 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 18 19 20 21 22 23
// AtomSetHandler.h
//
////////////////////////////////////////////////////////////////////////////////

#ifndef ATOMSETHANDLER_H
#define ATOMSETHANDLER_H

#include "StructureHandler.h"
#include "D3vector.h"
24
#include <string>
Francois Gygi committed
25 26 27 28 29 30 31

class AtomSet;
class Species;

class AtomSetHandler : public StructureHandler
{
  private:
32

Francois Gygi committed
33
  AtomSet& as_;
34 35
  std::string current_atom_name, current_atom_species;
  std::string current_species_name;
Francois Gygi committed
36 37 38 39
  D3vector current_atom_position, current_atom_velocity;
  Species* current_species;

  public:
40

Francois Gygi committed
41 42 43 44 45
  // 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
46
  virtual void endElement(const XMLCh* const uri, const XMLCh* const localname,
47
      const XMLCh* const qname, std::string& content);
48

Francois Gygi committed
49 50
  // start a subhandler
  virtual StructureHandler* startSubHandler(const XMLCh* const uri,
51
    const XMLCh* const localname, const XMLCh* const qname,
Francois Gygi committed
52
    const Attributes& attributes);
53

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

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