#include <KeyList.h>
Public Member Functions | |
| void | addKeyItem (const OverlayKey &item) |
| Add key-item to keyList. | |
| void | removeKeyItem (const OverlayKey &item) |
| Removes key-item from keyList. | |
| bool | contains (const OverlayKey &item) |
| const std::vector< OverlayKey > & | getVector () |
| uint | getSize () |
| const OverlayKey & | get (uint i) |
Protected Member Functions | |
| int | getPosition (const OverlayKey &item) |
Protected Attributes | |
| std::vector< OverlayKey > | keyList |
| contains all search keys | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const KeyList &k) |
| void KeyList::addKeyItem | ( | const OverlayKey & | item | ) |
| bool KeyList::contains | ( | const OverlayKey & | item | ) |
| item | to check |
00042 { 00043 if(getPosition(item) != -1) 00044 return true; 00045 return false; 00046 }
| const OverlayKey & KeyList::get | ( | uint | i | ) |
| int KeyList::getPosition | ( | const OverlayKey & | item | ) | [protected] |
| uint KeyList::getSize | ( | ) |
| const std::vector< OverlayKey > & KeyList::getVector | ( | ) |
| void KeyList::removeKeyItem | ( | const OverlayKey & | item | ) |
Removes key-item from keyList.
| item | to remove |
00035 { 00036 std::vector<OverlayKey>::iterator it = keyList.begin(); 00037 if(contains(item)) 00038 keyList.erase(it + getPosition(item)); 00039 }
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const KeyList & | k | |||
| ) | [friend] |
std::vector<OverlayKey> KeyList::keyList [protected] |
contains all search keys
1.4.7