/*

    Bist: a chemical drawing tool
    Copyright (C) 2008 Valerio Benfante

    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 3 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, see <http://www.gnu.org/licenses/>.
*/
#include <global.hpp>
#include <legame.hpp>


/***********************legame******************/

legame::legame (int nw_id_atomo, int nw_id_legame ,int nw_tipo_legame,
		int comp_r, int comp_g, int comp_b)
  :_id_atomo(nw_id_atomo),
   _id_legame(nw_id_legame),
   _tipo_legame(nw_tipo_legame),
   _cr(comp_r),
   _cg(comp_g),
   _cb(comp_b)
{

}

legame::~legame(){

}


 /**
  *\return true se altro ha lo stesso id di quest'istanza
  **/

bool legame::operator==(legame altro){
  //cout << "LLLLLLLLLLEEEEEEEEE" << id_legame() << " " << altro.id_legame();
  if(id_legame()==altro.id_legame()){
    //cout << "uguale"<< endl;
    return true;

  }else{
    //cout << "diverso"<< endl;
    return false;
  }
}

int legame::id_atomo(){
  return _id_atomo;
}



int legame::id_legame(){
  return _id_legame;
}

int legame::tipo_legame(){
  return _tipo_legame;
}


int legame::cr(){
  return _cr;
}

int legame::cg(){
  return _cg;
}

int legame::cb(){
  return _cb;
}


void legame::id_atomo(int nw){
  _id_atomo=nw;
}

void legame::id_legame(int nw){
  _id_legame=nw;
}
void legame::tipo_legame(int nw){
  _tipo_legame=nw;
}

void legame::cr(int nw){
  _cr=nw;
}

void legame::cg(int nw){
  _cg=nw;
}

void legame::cb(int nw){
  _cb=nw;
}
