// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: selectable.iC,v 1.8 2003/08/26 08:04:09 oliver Exp $
//

BALL_INLINE 
void Selectable::clear()
	
{
  selected_ = false;
}

BALL_INLINE 
void Selectable::set(const Selectable& selectable, bool /* deep */)
	
{
  selected_ = selectable.selected_;
}

BALL_INLINE 
const Selectable& Selectable::operator = (const Selectable& selectable)
	
{
  set(selectable);

  return *this;
}
    
BALL_INLINE 
void Selectable::get(Selectable& selectable, bool deep) const
	
{
  selectable.set(*this, deep);
}

BALL_INLINE 
void Selectable::deselect()
	
{
  selected_ = false;
}

BALL_INLINE 
void Selectable::select()
	
{
  selected_ = true;
}

BALL_INLINE 
void Selectable::swap(Selectable& selectable)
	
{
  bool temp = selected_;
  selected_ = selectable.selected_;
  selectable.selected_ = temp;
}

BALL_INLINE 
bool Selectable::isSelected() const
	
{
  return selected_;
}

BALL_INLINE 
bool Selectable::operator == (const Selectable& selectable) const 
	
{
	return (selected_ == selectable.selected_);
}

BALL_INLINE 
bool Selectable::operator != (const Selectable& selectable) const 
	
{
	return !(selected_ == selectable.selected_);
}
