#include <GiaKeyList.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 GiaKeyList &k) |
void GiaKeyList::addKeyItem | ( | const OverlayKey & | item | ) |
bool GiaKeyList::contains | ( | const OverlayKey & | item | ) |
item | to check |
00042 { 00043 if(getPosition(item) != -1) 00044 return true; 00045 return false; 00046 }
const OverlayKey & GiaKeyList::get | ( | uint | i | ) |
int GiaKeyList::getPosition | ( | const OverlayKey & | item | ) | [protected] |
uint GiaKeyList::getSize | ( | ) |
const std::vector< OverlayKey > & GiaKeyList::getVector | ( | ) |
void GiaKeyList::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 GiaKeyList & | k | |||
) | [friend] |
std::vector<OverlayKey> GiaKeyList::keyList [protected] |
contains all search keys