/***************************************************************************
 *   Copyright (C) 2004 by Hans Oischinger                                 *
 *   hans.oischinger@kdemail.net                                           *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it 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.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.             *
 ***************************************************************************/
#ifndef VISITOR_H
#define VISITOR_H


class ElementNode;
class VectorElement;
class AnimateElement;
class AnimateTransformElement;
class AnimateLengthElement;
class AnimateNumberElement;
class DocumentElement;
class GroupElement;
class UseElement;
class DefsElement;
class ElementSelection;
class StopElement;
class LinearGradient;
class RadialGradient;
/**
abstract Visitor base class
 
@author Hans Oischinger
*/
class Visitor
{
public:
  Visitor();
  virtual ~Visitor();

  virtual bool visit( ElementNode& element );
  virtual bool visit( DocumentElement& element );
  virtual bool visit( VectorElement& element );
//   virtual bool visit( AnimateElement& element );  // TODO: remove?!
  virtual bool visit( AnimateTransformElement& element );
  virtual bool visit( AnimateLengthElement& element );
  virtual bool visit( AnimateNumberElement& element );
  virtual bool visit( GroupElement& element );
  virtual bool visit( UseElement& element );
  virtual bool visit( DefsElement& element );
  virtual bool visit( ElementSelection& element );
  virtual bool visit( StopElement& element );
  virtual bool visit( LinearGradient& element );
  virtual bool visit( RadialGradient& element );

  bool success() const { return m_success; }

protected:
  bool m_success;
};

#endif
