#include <CoinModelUseful.hpp>
Collaboration diagram for CoinModelHash:

hashing | |
| int | hash (const char *name) const |
| Returns index or -1. | |
| void | addHash (int index, const char *name) |
| Adds to hash. | |
| void | deleteHash (int index) |
| Deletes from hash. | |
| const char * | name (int which) const |
| Returns name at position (or NULL). | |
| char * | getName (int which) const |
| Returns non const name at position (or NULL). | |
| void | setName (int which, char *name) |
| Sets name at position (does not create). | |
| int | hashValue (const char *name) const |
| Returns a hash value. | |
Public Member Functions | |
Constructors, destructor | |
| CoinModelHash () | |
| Default constructor. | |
| ~CoinModelHash () | |
| Destructor. | |
Copy method | |
| CoinModelHash (const CoinModelHash &) | |
| The copy constructor. | |
| CoinModelHash & | operator= (const CoinModelHash &) |
| = | |
sizing (just increases) | |
| void | resize (int maxItems, bool forceReHash=false) |
| Resize hash (also re-hashs). | |
| int | numberItems () const |
| Number of items i.e. rows if just row names. | |
| void | setNumberItems (int number) |
| Set number of items. | |
| int | maximumItems () const |
| Maximum number of items. | |
| const char *const * | names () const |
| Names. | |
Private Attributes | |
Data members | |
| char ** | names_ |
| Names. | |
| CoinModelHashLink * | hash_ |
| hash | |
| int | numberItems_ |
| Number of items. | |
| int | maximumItems_ |
| Maximum number of items. | |
| int | lastSlot_ |
| Last slot looked at. | |
Definition at line 143 of file CoinModelUseful.hpp.
| CoinModelHash::CoinModelHash | ( | ) |
Default constructor.
| CoinModelHash::~CoinModelHash | ( | ) |
Destructor.
| CoinModelHash::CoinModelHash | ( | const CoinModelHash & | ) |
The copy constructor.
| CoinModelHash& CoinModelHash::operator= | ( | const CoinModelHash & | ) |
=
| void CoinModelHash::resize | ( | int | maxItems, | |
| bool | forceReHash = false | |||
| ) |
Resize hash (also re-hashs).
| int CoinModelHash::numberItems | ( | ) | const [inline] |
Number of items i.e. rows if just row names.
Definition at line 167 of file CoinModelUseful.hpp.
References numberItems_.
Referenced by CoinModel::stringsExist().
| void CoinModelHash::setNumberItems | ( | int | number | ) |
Set number of items.
| int CoinModelHash::maximumItems | ( | ) | const [inline] |
Maximum number of items.
Definition at line 172 of file CoinModelUseful.hpp.
References maximumItems_.
| const char* const* CoinModelHash::names | ( | ) | const [inline] |
| int CoinModelHash::hash | ( | const char * | name | ) | const |
Returns index or -1.
| void CoinModelHash::addHash | ( | int | index, | |
| const char * | name | |||
| ) |
Adds to hash.
| void CoinModelHash::deleteHash | ( | int | index | ) |
Deletes from hash.
| const char* CoinModelHash::name | ( | int | which | ) | const |
Returns name at position (or NULL).
| char* CoinModelHash::getName | ( | int | which | ) | const |
Returns non const name at position (or NULL).
| void CoinModelHash::setName | ( | int | which, | |
| char * | name | |||
| ) |
Sets name at position (does not create).
| int CoinModelHash::hashValue | ( | const char * | name | ) | const [private] |
Returns a hash value.
char** CoinModelHash::names_ [private] |
CoinModelHashLink* CoinModelHash::hash_ [private] |
int CoinModelHash::numberItems_ [private] |
int CoinModelHash::maximumItems_ [private] |
Maximum number of items.
Definition at line 208 of file CoinModelUseful.hpp.
Referenced by maximumItems().
int CoinModelHash::lastSlot_ [private] |
1.4.7