Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sbdict(3) [debian man page]

SbDict(3)							       Coin								 SbDict(3)

NAME
SbDict - The 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. SYNOPSIS
#include <Inventor/SbDict.h> Public Types typedef uintptr_t Key Public Member Functions SbDict (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 Description The 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 intentries = 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) const Applies rtn to all entries in the dictionary. 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. void SbDict::clear (void) Clear all entries in the dictionary. SbBool SbDict::enter (const Keykey, void *constvalue) 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 Keykey, 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. void SbDict::makePList (SbPList &keys, SbPList &values) Creates lists with all entries in the dictionary. SbBool SbDict::remove (const Keykey) 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. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SbDict(3)

Check Out this Related Man Page

ScXMLObject(3)							       Coin							    ScXMLObject(3)

NAME
ScXMLObject - Base class for all SCXML objects. SYNOPSIS
#include <Inventor/scxml/ScXMLObject.h> Inherited by ScXMLEvent, ScXMLInvoke, and ScXMLStateMachine. Public Member Functions virtual SoType getTypeId (void) const =0 SbBool isOfType (SoType type) const void setXMLAttribute (const char *attribute, const char *value) const char * getXMLAttribute (const char *attribute) const virtual SbBool handleXMLAttributes (void) virtual void setContainer (ScXMLObject *container) ScXMLObject * getContainer (void) const SbBool isContainedIn (const ScXMLObject *object) const Static Public Member Functions static SoType getClassTypeId (void) static void initClass (void) Static Protected Member Functions static void registerClassType (const char *xmlns, const char *classname, SoType type) static void registerInvokeClassType (const char *xmlns, const char *targettype, const char *source, SoType type) Detailed Description Base class for all SCXML objects. Since: Coin 3.0 Member Function Documentation void ScXMLObject::setXMLAttribute (const char *attribute, const char *value) This method associates a value with an attribute name. This is used for parameter passing while reading by the SCXML reader, but can be used as a general-purpose attribute dictionary outside of that. If NULL is passed as the value, the attribute is removed. const char * ScXMLObject::getXMLAttribute (const char *attribute) const This method returns the string value set for an attribute, or NULL if not set. SbBool ScXMLObject::handleXMLAttributes (void) [virtual] This method is called when the file reader has set all the XML attributes on the object, and wants the object to handle them and report if the values were ok or if a read error should be produced. Returns: TRUE if the attributes are ok, and FALSE on error. This base class implementation does nothing and just returns TRUE. Reimplemented in ScXMLInvoke. void ScXMLObject::setContainer (ScXMLObject *container) [virtual] Set the pointer to the parent ScXML object. SbBool ScXMLObject::isContainedIn (const ScXMLObject *object) const This method returns TRUE if the object is contained within the given object argument. Also if they are the same, TRUE will be returned. Otherwise, FALSE is retured. void ScXMLObject::registerClassType (const char *xmlns, const char *classname, SoTypetype) [static], [protected] Internal method. Friendly forwarding for ScXMLObject subclasses. void ScXMLObject::registerInvokeClassType (const char *xmlns, const char *targettype, const char *source, SoTypetype) [static], [protected] Internal method. Friendly forwarding for ScXMLObject subclasses. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 ScXMLObject(3)
Man Page