/*  $Id: input_context_generic.cpp,v 1.9 2003/10/05 11:07:12 mbn Exp $
**
**  ClanLib Game SDK
**  Copyright (C) 2003  The ClanLib Team
**  For a total list of contributers see the file CREDITS.
**
**  This library is free software; you can redistribute it and/or
**  modify it under the terms of the GNU Lesser General Public
**  License as published by the Free Software Foundation; either
**  version 2.1 of the License, or (at your option) any later version.
**
**  This library 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
**  Lesser General Public License for more details.
**
**  You should have received a copy of the GNU Lesser General Public
**  License along with this library; if not, write to the Free Software
**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
*/

#include "Display/display_precomp.h"
#include "input_context_generic.h"

/////////////////////////////////////////////////////////////////////////////
// CL_InputContext_Generic construction:

CL_InputContext_Generic::CL_InputContext_Generic()
: ref_count(0)
{
}

CL_InputContext_Generic::~CL_InputContext_Generic()
{
}

/////////////////////////////////////////////////////////////////////////////
// CL_InputContext_Generic attributes:


/////////////////////////////////////////////////////////////////////////////
// CL_InputContext_Generic operations:

void CL_InputContext_Generic::add_ref()
{
	ref_count++;
}

void CL_InputContext_Generic::release_ref()
{
	ref_count--;
	if (ref_count == 0) delete this;
}

void CL_InputContext_Generic::clear()
{
	keyboards.clear();
	mice.clear();
	joysticks.clear();
}

void CL_InputContext_Generic::add_keyboard(const CL_InputDevice &keyboard)
{
	keyboards.push_back(keyboard);
}

void CL_InputContext_Generic::add_mouse(const CL_InputDevice &mouse)
{
	mice.push_back(mouse);
}

void CL_InputContext_Generic::add_joystick(const CL_InputDevice &joystick)
{
	joysticks.push_back(joystick);
}

/////////////////////////////////////////////////////////////////////////////
// CL_InputContext_Generic implementation:
