SbDict(3)
π SbDict(3) β the Coin manual, bestie edition π
okay so like. you opened the SbDict man page from Coin (section 3, library functions, iykyk) and honestly? you're gonna eat this up. it's a dictionary. keys and values. that's the whole vibe. let's go π¦
β¨ NAME β¨
SbDict β the SbDict class organizes a dictionary of keys and values. periodt. π
πΈ SYNOPSIS πΈ
#include <Inventor/SbDict.h>
π Public Types
typedef uintptr_t Keyβ this is the key type, bestie. it's auintptr_t. that's the whole tea.
π Public Member Functions
SbDict (const int entries=251)SbDict (const SbDict &from)~SbDict ()SbDict & operator= (const SbDict &from)void applyToAll (SbDictApplyFunc *rtn) constvoid applyToAll (SbDictApplyDataFunc *rtn, void *data) constvoid clear (void)SbBool enter (const Key key, void *const value)SbBool find (const Key key, void *&value) constvoid makePList (SbPList &keys, SbPList &values)SbBool remove (const Key key)void setHashingFunction (SbDictHashingFunc *func)
π Detailed Description π
The SbDict class organizes a dictionary of keys and values. (yes, it's literally the NAME section again, they said it twice, iconic of them π)
It uses hashing to quickly insert and find entries in the dictionary. An entry consists of an unique key and a generic pointer. so like, one key, one pointer, no drama, no cap. β¨
π§ Constructor & Destructor Documentation π§
π SbDict::SbDict (const int entries = 251)
Constructor, with entries specifying the initial number of buckets in the hash list β so it needs to be larger than 0. that part is not optional bestie, 0 is not the move π
Other than that? no special care needs to be taken in choosing the value, because it is always rounded up to the nearest power of two. so you can just vibe and pick a number, the class will handle the glow-up. π
π SbDict::SbDict (const SbDict & from)
Copy constructor. it copies. that's it. that's the whole sentence. π«Ά
π SbDict::~SbDict ()
Destructor. the farewell arc. π
β Member Function Documentation β
π SbDict & SbDict::operator= (const SbDict & from)
Makes a shallow copy of the contents of dictionary from into this dictionary. shallow! not deep! do not come for me, that's literally what the page says. π
π void SbDict::applyToAll (SbDictApplyFunc * rtn) const
Applies rtn to all entries in the dictionary. every single one. no entry left behind. π
π void SbDict::applyToAll (SbDictApplyDataFunc * rtn, void * data) const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. so basically same energy, extra data param, slay. β¨
π void SbDict::clear (void )
Clear all entries in the dictionary. fresh start, clean slate, main character reset. πΈ
π SbBool SbDict::enter (const Key key, void *const value)
Inserts a new entry into the dictionary. key should be an 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. so like: new key = TRUE + new entry, existing key = FALSE + overwrite. write that down. π
π SbBool SbDict::find (const Key key, void *& value) const
Searches 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. bestie hunting behavior, honestly. π₯
π void SbDict::makePList (SbPList & keys, SbPList & values)
Creates lists with all entries in the dictionary. one list of keys, one list of values. a lil matching set, adorable. π
π 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. bye bestie, or... not bye, depending. π
π 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 staticSbString::hash()function (you'd need to make a static function that will cast fromSbDict::Keytochar *of course).
This function is not part of the OIV API. β οΈ important, don't forget it, fr fr.
π«Ά Author π«Ά
Generated automatically by Doxygen for Coin from the source code. so like, not a human, a robot, and yet it ate. π
and that's the page bestie!! this was SbDict(3) from Coin, Version 4.0.10, dated Thu Jun 25 2026 00:00:00 β go forth and hash responsibly, mwah πβ¨π¦
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms