/*
	$Id: resourceoptions.cpp,v 1.2 2003/08/22 20:26:21 grumbel Exp $

	------------------------------------------------------------------------
	ClanLib Game SDK

	This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
	version 2. See COPYING for details.

	For a total list of contributers see CREDITS.

	------------------------------------------------------------------------
*/

#include "resourceoptions.h"

/////////////////////////////////////////////////////////////////////////////
// CL_ResourceOptions construction:

ResourceOptions::ResourceOptions()
{
}

ResourceOptions::~ResourceOptions()
{
}

/////////////////////////////////////////////////////////////////////////////
// CL_ResourceOptions attributes:

std::map<std::string, ResourceOption> &ResourceOptions::get_options()
{
	return options;
}

ResourceOption &ResourceOptions::get_option(const std::string &name)
{
	return options[name];
}

const ResourceOption &ResourceOptions::get_option(const std::string &name) const
{
	return options.find(name)->second;
}

bool ResourceOptions::exists(const std::string &name)
{
	return options.find(name) != options.end();
}

/////////////////////////////////////////////////////////////////////////////
// CL_ResourceOptions operations:

void ResourceOptions::add(const ResourceOption &option)
{
	options[option.get_name()] = option;
}

void ResourceOptions::remove(const std::string& name)
{
	options.erase(options.find(name));
}

/////////////////////////////////////////////////////////////////////////////
// CL_ResourceOptions implementation:
