//
// C++ Interface: eaddelementcmd
//
// Description:
//
//
// Author: Hans Oischinger <hans.oischinger@kdemail.net>, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef EADDELEMENTCMD_H
#define EADDELEMENTCMD_H

#include "ecommand.h"

class ElementNode;
/**
Create/Add new elements
 
@author Hans Oischinger
*/
class EAddElementCMD : public ECommand
{
public:
  /**
   * Adds newElement as child of parent
   * after neighbour or before neighbour if before is true
   */
  EAddElementCMD( ElementNode* newElement, ElementNode* parent,
                  ElementNode* neighbour=0, bool before = false);
  ~EAddElementCMD();

  void execute();
  void unexecute();
private:
  bool m_remove;
  ElementNode *m_element;
  ElementNode *m_parent;
  ElementNode *m_neighbour;
  bool m_before;
};

#endif
