Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_ResourceOption

Resource Option Class
Contained in: global
Derived from: none
Derived by: none
Group: Core (Resources)

#include <ClanLib/core.h>

### public function member index:

### Construction:

`` | `CL_ResourceOption` | `(`const` `std::string`& `name`, `const` `std::string`& `value`)`;
`` | `CL_ResourceOption` | `(`const` `std::string`& `name`)`;
`` | `CL_ResourceOption` | `()`;
`` | `CL_ResourceOption` | `(`const` `CL_ResourceOption`& `other`)`;

### Attributes:

``const` `std::string`&` | `get_name` | `() `const``;
``const` `std::string`&` | `get_value` | `(`int` `i`=0) `const``;
``std::vector`<`std::string`>&` | `get_values` | `()`;

### Operations:

``void`` | `operator``=` | `(`const` `CL_ResourceOption`& `other`)`;
``int`` | `add_value` | `(`const` `std::string`& `value`)`;

## Description:

Holds the particular options for a resource
Used by the ResourceManager and DataFile compiler

## Function Member Descriptions:

CL_ResourceOption::CL_ResourceOption - Resource Option Constructor
`` `CL_ResourceOption` `(`const` `std::string`& `name`, `const` `std::string`& `value`)`;

> name - The name of the option
> value - Value of the option as a string

CL_ResourceOption::CL_ResourceOption - Resource Option Constructor
`` `CL_ResourceOption` `(`const` `std::string`& `name`)`;

> name - The name of the option.

CL_ResourceOption::CL_ResourceOption - Default Resource Option Constructor
`` `CL_ResourceOption` `()`;

CL_ResourceOption::add_value - Add a Value
``int`` `add_value` `(`const` `std::string`& `value`)`;

> value - the string value to add
> Returns - the index of the added value

CL_ResourceOption::get_name - Get Name
``const` `std::string`&` `get_name` `() `const``;

> Returns - The name of the option

CL_ResourceOption::get_value - Get Value
``const` `std::string`&` `get_value` `(`int` `i`=0) `const``;

> i - The index of which value to return, default of 0
> Returns - The option for the index value of i.

CL_ResourceOption::get_values - Get Values
``std::vector`<`std::string`>&` `get_values` `()`;

> Returns - An std::vector<std::string> with all the values.

## Variable Member Descriptions: