Crystal Space: iKeyValuePair Struct Reference (Crystal Space Public API Reference)

| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iKeyValuePair Struct Reference

A Key Value pair. More...

`#include <ivaria/keyval.h>`

Inheritance diagram for iKeyValuePair:

[legend]
List of all members.

## Public Member Functions
virtual const char * | GetKey () const =0
| Get the key string of the pair.
virtual const char * | GetValue () const =0
| Get the 'value' string of the pair.
virtual const char * | GetValue (const char *vname) const =0
| Get a value string from the pair.
virtual csRef< iStringArray > | GetValueNames () const =0
| Get a list of the names of values in the pair.
virtual iObject * | QueryObject ()=0
| Get the iObject.
virtual void | SetKey (const char *key)=0
| Set the key string of the pair.
virtual void | SetValue (const char *value)=0
| Set the value string of the pair.
virtual void | SetValue (const char *vname, const char *value)=0
| Set a value string of the pair.

## Detailed Description

A Key Value pair.

This object contains a 'key' string and one or more 'value' strings. Typically key value pairs are specified in map files (using the <key> tag). They allow a game developer to tag game specific information to any Crystal Space object.

Main creators of instances implementing this interface:

- The main loader creates instances of this internally.

Main ways to get pointers to this interface:

- scfQueryInterface() from iObject instances you get by calling iObject::GetIterator() on iObject instances you get from CS objects (typically using QueryObject()).

Definition at line 45 of file keyval.h.

## Member Function Documentation

virtual const char* iKeyValuePair::GetKey | ( |  | ) | const`[pure virtual]`

Get the key string of the pair.

Implemented in csKeyValuePair.

virtual const char* iKeyValuePair::GetValue | ( |  | ) | const`[pure virtual]`

Get the 'value' string of the pair.

This is the same as calling 'GetValue ("value")'.

Implemented in csKeyValuePair.

virtual const char* iKeyValuePair::GetValue | ( | const char * | vname | ) | const`[pure virtual]`

Get a value string from the pair.

Implemented in csKeyValuePair.

virtual csRef<iStringArray> iKeyValuePair::GetValueNames | ( |  | ) | const`[pure virtual]`

Get a list of the names of values in the pair.

Implemented in csKeyValuePair.

virtual iObject* iKeyValuePair::QueryObject | ( |  | ) | `[pure virtual]`

Get the iObject.

Implemented in csKeyValuePair.

virtual void iKeyValuePair::SetKey | ( | const char * | key | ) | `[pure virtual]`

Set the key string of the pair.

Implemented in csKeyValuePair.

virtual void iKeyValuePair::SetValue | ( | const char * | value | ) | `[pure virtual]`

Set the value string of the pair.

This is the same as calling 'SetValue ("value", value)'.

Implemented in csKeyValuePair.

virtual void iKeyValuePair::SetValue | ( | const char * | vname,
|  | const char * | value |
| ) |  |  | `[pure virtual]`

Set a value string of the pair.

Implemented in csKeyValuePair.

The documentation for this struct was generated from the following file:

- ivaria/keyval.h