Open Inventor Reference
SbDict Class Reference

This is a dictionary mapping (unsigned long) integer keys to (void *) data pointers.

#include <Inventor/SbDict.h>

List of all members.

Public Member Functions

 SbDict (int entries=251)
 Constructor.
 ~SbDict ()
 Destructor.
void applyToAll (void(*rtn)(unsigned long key, void *value))
 Calls given routine (passing value) for each entry in dictionary.
void applyToAll (void(*rtn)(unsigned long key, void *value, void *data), void *data)
 Calls given routine (passing value,data) for each entry in dictionary.
void clear ()
 Removes all entries from dictionary.
SbBool enter (unsigned long key, void *value)
 Enters a key,value pair into the dictionary.
SbBool find (unsigned long key, void *&value) const
 Finds entry with given key, setting value to point to value.
void makePList (SbPList &keys, SbPList &values)
 Makes two SbPLists, one for keys and the other for values.
SbBool remove (unsigned long key)
 Removes the entry with the given key. Returns FALSE if no such entry.

Detailed Description

Definition at line 101 of file SbDict.h.


Constructor & Destructor Documentation

SbDict::SbDict ( int  entries = 251)
SbDict::~SbDict ( )

Member Function Documentation

void SbDict::applyToAll ( void(*)(unsigned long key, void *value)  rtn)

The order of entries is not guaranteed to mean anything.

void SbDict::applyToAll ( void(*)(unsigned long key, void *value, void *data)  rtn,
void *  data 
)

The order of entries is not guaranteed to mean anything.

void SbDict::clear ( )
SbBool SbDict::enter ( unsigned long  key,
void *  value 
)

Overwrites entry and returns FALSE if key already exists.

SbBool SbDict::find ( unsigned long  key,
void *&  value 
) const

Returns FALSE if no such entry.

void SbDict::makePList ( SbPList keys,
SbPList values 
)

The order of entries is not guaranteed to mean anything.

SbBool SbDict::remove ( unsigned long  key)

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