/*
	$Id: resourceoption.h,v 1.1 2003/06/04 12:27:24 sphair Exp $

	------------------------------------------------------------------------
	ClanLib, the platform independent 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.

	See http://www.clanlib.org
	------------------------------------------------------------------------
*/

//! clanCore="Resources"
//! header=core.h

#ifndef RESOURCEOPTION_H_
#define RESOURCEOPTION_H_

#include <vector>
#include <string>

//: Resource option class.
//- <p>Holds the particular option for a resource.</p>
class ResourceOption
{
//! Construction:
public:
	//: Constructs a resource option.
	//param name: The name of the option
	//param value: Value of the option as a string
	ResourceOption(const std::string &name, const std::string &value) : name(name)
	{
		values.push_back(value);
	}

	ResourceOption(const std::string &name) : name(name)
	{
	}

	ResourceOption()
	{
	}

//! Attributes:
public:
	//: Gets the name of the resource option.
	//return: The name of the option.
	const std::string &get_name() const { return name; }

	//: Gets all values as a vector.
	//return: An std::vector<std::string> with all the values.
	std::vector<std::string> &get_values() { return values; }

//! Operations:
public:
	//: Add a value.
	//param value: The string value to add.
	//return: The index of the added value.
	int add_value(const std::string &value) { values.push_back(value); return values.size();}

//! Implementation:
private:
	std::string name;
	std::vector<std::string> values;
};

#endif
