/*
    C++ Mesh Generation Library
    Copyright (c) 2000echet <eric at bechet dot ca>

    This file is part of the C++ Mesh Generation Library.

    See the NOTICE & LICENSE files for conditions.
*/
#ifndef FM_AOMDELEMENT_H
#define FM_AOMDELEMENT_H


#include "mEntity.h"
#include "mVertex.h"

#include <vector>
#include <algorithm>

using namespace std;

namespace FM
{
  class AOMDNode;

  class AOMDElement
  {
  public:
    AOMDElement() :paomd ( ( AOMD::mEntity* ) 0 ) {}
    AOMDElement ( AOMD::mEntity *e ) :paomd ( e ) {}
    virtual void GetNodes ( vector<AOMDNode> &tab ) const ;
    virtual void GetNeighbors ( vector<AOMDElement> &tab ) const;
    virtual void CommonNodes ( const AOMDElement &other,vector<AOMDNode> &tabcommon,vector<AOMDNode> &tabother ) const ;
    virtual void CommonNodes ( const AOMDElement &other,vector<AOMDNode> &tabcommon,vector<AOMDNode> &tabother,vector<AOMDNode> &tabother2 ) const ;

    virtual void Print ( void )
    {
      paomd->print();
    }

    virtual int GetDim() const
    {
      return paomd->getLevel();
    }
    virtual bool operator < ( const AOMDElement &other ) const
    {
      return ( ( void* ) ( paomd ) < ( void* ) ( other.paomd ) );
    }
    virtual bool operator == ( const AOMDElement &other ) const
    {
      return ( ( void* ) ( paomd ) == ( void* ) ( other.paomd ) );
    }
  private:
    AOMD::mEntity *paomd;
  };

}
#endif //FM_ELEMENT_H
 
