SbDict - Online Linux Manual PageSection : 3
Updated : Mon Jan 25 2021
Source : Version 3.1.3
Note : Coin
NAMESbDict − The SbDict class organizes a dictionary of keys and values.
SYNOPSIS
#include <Inventor/SbDict.h>
Public Typestypedef uintptr_t Key
Public Member FunctionsSbDict (const int entries=251)
SbDict (const SbDict &from)
~SbDict ()
SbDict & operator= (const SbDict &from)
void applyToAll (SbDictApplyFunc *rtn) const
void applyToAll (SbDictApplyDataFunc *rtn, void *data) const
void clear (void)
SbBool enter (const Key key, void *const value)
SbBool find (const Key key, void *&value) const
void makePList (SbPList &keys, SbPList &values)
SbBool remove (const Key key)
void setHashingFunction (SbDictHashingFunc *func)
Detailed DescriptionThe SbDict class organizes a dictionary of keys and values. It uses hashing to quickly insert and find entries in the dictionary. An entry consists of an unique key and a generic pointer.
Constructor & Destructor Documentation
SbDict::SbDict (const int entries = 251)Constructor with entries specifying the initial number of buckets in the hash list -- so it need to be larger than 0. Other than this, no special care needs to be taken in choosing the value since it is always rounded up to the nearest power of two.
SbDict::SbDict (const SbDict & from)Copy constructor.
SbDict::~SbDict ()Destructor.
Member Function Documentation
SbDict & SbDict::operator= (const SbDict & from)Make a shallow copy of the contents of dictionary from into this dictionary.
void SbDict::applyToAll (SbDictApplyFunc * rtn) constApplies rtn to all entries in the dictionary.
void SbDict::applyToAll (SbDictApplyDataFunc * rtn, void * data) constThis is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void SbDict::clear (void)Clear all entries in the dictionary.
SbBool SbDict::enter (const Key key, void *const value)Inserts a new entry into the dictionary. key should be a unique number, and value is the generic user data. If key does not exist in the dictionary, a new entry is created and TRUE is returned. Otherwise, the generic user data is changed to value, and FALSE is returned.
SbBool SbDict::find (const Key key, void *& value) constSearches for key in the dictionary. If an entry with this key exists, TRUE is returned and the entry value is returned in value. Otherwise, FALSE is returned.
void SbDict::makePList (SbPList & keys, SbPList & values)Creates lists with all entries in the dictionary.
SbBool SbDict::remove (const Key key)Removes the entry with key key. TRUE is returned if an entry with this key was present, FALSE otherwise.
void SbDict::setHashingFunction (SbDictHashingFunc * func)Sets a new hashing function for this dictionary. Default hashing function just returns the key. If you find that items entered into the dictionary seems to make clusters in only a few buckets, you should try setting a hashing function. If you're for instance using strings, you could use the static SbString::hash() function (you'd need to make a static function that will cast from SbDict::Key to char * of course). This function is not part of the OIV API.
AuthorGenerated automatically by Doxygen for Coin from the source code. 0
Johanes Gumabo
Data Size : 16,666 byte
man-SbDict.3coin3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 203,382
Visitor ID : :
Visitor IP : 18.222.98.91 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.