/*
	Twilight Prophecy 3D/Multimedia SDK
	A multi-platform development system for virtual reality and multimedia.

	Copyright (C) 1997-2001 by Twilight 3D Finland Oy Ltd.

	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 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

	Please read the file LICENSE.TXT for additional details.


	source: 
		interface

	revision history:
		Sep/15/1999 - Jukka Liimatta - initial revision
*/
#include <prcore/prcore.hpp>
using namespace prcore;



Interface::Interface()
: mRefCount(1)
{
}


Interface::Interface(const Interface& other)
: mRefCount(1)
{
	*this = other;
}


Interface::~Interface()
{
}


void Interface::operator = (const Interface& other)
{
	mRefCount = other.mRefCount;
	mName = other.mName;
}


void Interface::SetName(const char* name)
{
	mName = name;
}


const char* Interface::GetName() const
{
	return mName;
}


void Interface::AddRef()
{
	++mRefCount;
}


int Interface::NumRef() const
{
	return mRefCount;
}


void Interface::Release()
{
	if ( !--mRefCount )
		delete this;
}
