/**********************************************************************
 *
 *   FreeDoko a Doppelkopf-Game
 *    
 *   Copyright (C) 2001-2004  by Diether Knof and Borg Enders
 *
 *   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 can find this license in the file 'gpl.txt'.
 *
 *   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., 59 Temple Place, Suite 330, Boston, 
 *   MA  02111-1307  USA
 *
 *  Contact:
 *    Diether Knof dknof@gmx.de
 *    Borg Enders  borg@borgsoft.de
 *
 *********************************************************************/

#include "constants.h"

#ifdef USE_UI_GTKMM

#include "htin.h"
#include "table.h"

#include "../../player/player.h"

namespace UI_GTKMM_NS {

  /**
   **
   ** Constructor
   **
   ** @param	table	the table
   ** @param	player	the player
   **
   ** @return	-
   ** 
   ** @author	Diether Knof
   **
   ** @version	0.6.0
   **
   **/
  HTIN::HTIN(Table* const table, Player const* const player) :
    Base(table),
  player(player)
  {
    DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_INIT,
		  "HTIN::HTIN(table, player)");

    DEBUG_RETURNING(VOID,
		    INFO_GTKMM_HTIN && INFO_GTKMM_INIT,
		    "HTIN::HTIN(table, player)");
  } // HTIN::HTIN(Table* const table, Player const* const player)

  /**
   **
   ** Destruktor
   **
   ** @param	-
   **
   ** @return	-
   ** 
   ** @author	Diether Knof
   **
   ** @version	0.6.0
   **
   **/
  HTIN::~HTIN()
  {
    DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_INIT,
		  "HTIN::~HTIN()");

    DEBUG_RETURNING(VOID,
		    INFO_GTKMM_HTIN && INFO_GTKMM_INIT,
		    "HTIN::~HTIN()");
  } // HTIN::~HTIN()

  /**
   **
   ** -> result
   **
   ** @param	-
   **
   ** @return	the table
   **
   ** @version	0.6.0
   **
   ** @author	Diether Knof
   **
   **/
  Table&
    HTIN::table()
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::table()");

      DEBUG_RETURNING(static_cast<Table&>(*(this->parent)),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::table()");
    } // Table& HTIN::table()

  /**
   **
   ** -> result
   **
   ** @param	-
   **
   ** @return	the table
   **
   ** @version	0.6.0
   **
   ** @author	Diether Knof
   **
   **/
  Table const&
    HTIN::table() const
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::table()");

      DEBUG_RETURNING(static_cast<Table&>(*(this->parent)),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::table()");
    } // Table const& HTIN::table() const

  /**
   **
   ** -> result
   **
   ** @param	-
   **
   ** @return	the position of the object
   **
   ** @version	0.6.0
   **
   ** @author	Diether Knof
   **
   **/
  Position
    HTIN::position() const
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::position()");

      DEBUG_RETURNING(this->table().position(*(this->player)),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::position()");
    } // Position HTIN::position() const

  /**
   **
   ** -> result
   **
   ** @param	-
   **
   ** @return	the rotation of the object
   **
   ** @version	0.6.0
   **
   ** @author	Diether Knof
   **
   **/
  Rotation
    HTIN::rotation() const
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::rotation()");

      DEBUG_RETURNING(this->table().rotation(*(this->player)),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::rotation()");
    } // Rotation HTIN::rotation() const

  /**
   **
   ** -> result
   **
   ** @param	position	the position
   **
   ** @return	the rotation of the object at 'position'
   **
   ** @version	0.6.0
   **
   ** @author	Diether Knof
   **
   **/
  Rotation
    HTIN::rotation(Position const position) const
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::rotation(position)");

      DEBUG_RETURNING(this->table().rotation(position),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::rotation(position)");
    } // Rotation HTIN::rotation(Position const position) const

  /**
   **
   ** -> result
   **
   ** @param	-
   **
   ** @return	the corresponding hand
   **
   ** @version	0.6.0
   **
   ** @author	Diether Knof
   **
   **/
  Hand&
    HTIN::hand()
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::hand()");

      DEBUG_RETURNING(this->table().hand(*(this->player)),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::hand()");
    } // Hand& HTIN::hand()

  /**
   **
   ** -> result
   **
   ** @param	-
   **
   ** @return	the corresponding hand
   **
   ** @version	0.6.0
   **
   ** @author	Diether Knof
   **
   **/
  Hand const&
    HTIN::hand() const
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::hand()");

      DEBUG_RETURNING(this->table().hand(*(this->player)),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::hand()");
    } // Hand const& HTIN::hand() const

  /**
   **
   ** -> result
   **
   ** @param	position	the position
   **
   ** @return	the hand at 'position'
   **
   ** @version	0.6.3
   **
   ** @author	Diether Knof
   **
   **/
  Hand&
    HTIN::hand(Position const position)
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::hand(position)");

      DEBUG_RETURNING(this->table().hand(position),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::hand(position)");
    } // Hand& HTIN::hand(Position const position)

  /**
   **
   ** -> result
   **
   ** @param	-
   **
   ** @return	the corresponding trickpile
   **
   ** @version	0.6.0
   **
   ** @author	Diether Knof
   **
   **/
  TrickPile&
    HTIN::trickpile()
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::trickpile()");

      DEBUG_RETURNING(this->table().trickpile(*(this->player)),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::trickpile()");
    } // TrickPile& HTIN::trickpile()

  /**
   **
   ** -> result
   **
   ** @param	-
   **
   ** @return	the corresponding trickpile
   **
   ** @version	0.6.0
   **
   ** @author	Diether Knof
   **
   **/
  TrickPile const&
    HTIN::trickpile() const
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::trickpile()");

      DEBUG_RETURNING(this->table().trickpile(*(this->player)),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::trickpile()");
    } // TrickPile const& HTIN::trickpile() const

  /**
   **
   ** -> result
   **
   ** @param	position	the position
   **
   ** @return	the trickpile at 'position'
   **
   ** @version	0.6.3
   **
   ** @author	Diether Knof
   **
   **/
  TrickPile&
    HTIN::trickpile(Position const position)
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::trickpile(position)");

      DEBUG_RETURNING(this->table().trickpile(position),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::trickpile(position)");
    } // TrickPile& HTIN::trickpile(Position const position)

  /**
   **
   ** -> result
   **
   ** @param	-
   **
   ** @return	the corresponding icongroup
   **
   ** @version	0.6.1
   **
   ** @author	Diether Knof
   **
   **/
  Icongroup&
    HTIN::icongroup()
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::icongroup()");

      DEBUG_RETURNING(this->table().icongroup(*(this->player)),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::icongroup()");
    } // Icongroup& HTIN::icongroup()

  /**
   **
   ** -> result
   **
   ** @param	-
   **
   ** @return	the corresponding icongroup
   **
   ** @version	0.6.1
   **
   ** @author	Diether Knof
   **
   **/
  Icongroup const&
    HTIN::icongroup() const
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::icongroup()");

      DEBUG_RETURNING(this->table().icongroup(*(this->player)),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::icongroup()");
    } // Icongroup const& HTIN::icongroup() const

  /**
   **
   ** -> result
   **
   ** @param	position	the position
   **
   ** @return	the icongroup at 'position'
   **
   ** @version	0.6.3
   **
   ** @author	Diether Knof
   **
   **/
  Icongroup&
    HTIN::icongroup(Position const position)
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::icongroup(position)");

      DEBUG_RETURNING(this->table().icongroup(position),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::icongroup(position)");
    } // Icongroup& HTIN::icongroup(Position const position)

  /**
   **
   ** -> result
   **
   ** @param	-
   **
   ** @return	the corresponding name
   **
   ** @version	0.6.1
   **
   ** @author	Diether Knof
   **
   **/
  Name&
    HTIN::name()
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::name()");

      DEBUG_RETURNING(this->table().name(*(this->player)),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::name()");
    } // Name& HTIN::name()

  /**
   **
   ** -> result
   **
   ** @param	-
   **
   ** @return	the corresponding name
   **
   ** @version	0.6.1
   **
   ** @author	Diether Knof
   **
   **/
  Name const&
    HTIN::name() const
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::name()");

      DEBUG_RETURNING(this->table().name(*(this->player)),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::name()");
    } // Name const& HTIN::name() const

  /**
   **
   ** -> result
   **
   ** @param	position	the position
   **
   ** @return	the name at 'position'
   **
   ** @version	0.6.3
   **
   ** @author	Diether Knof
   **
   **/
  Name&
    HTIN::name(Position const position)
    {
      DEBUG_CALLING(INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		    "HTIN::name(position)");

      DEBUG_RETURNING(this->table().name(position),
		      INFO_GTKMM_HTIN && INFO_GTKMM_VALUE,
		      "HTIN::name(position)");
    } // Name& HTIN::name(Position const position)

} // namespace UI_GTKMM_NS

#endif // #ifdef USE_UI_GTKMM
