FX::FXStringDict Class Reference

#include <FXStringDict.h>

Inheritance diagram for FX::FXStringDict:

Inheritance graph
[legend]

List of all members.


Detailed Description

String dictionary maps a character string to a character string. The inserted strings are copied when they're inserted.

Public Member Functions

 FXStringDict ()
 FXStringDict (const FXStringDict &orig)
FXStringDictoperator= (const FXStringDict &orig)
const FXchar * insert (const FXchar *ky, const FXchar *str, bool mrk=false)
const FXchar * replace (const FXchar *ky, const FXchar *str, bool mrk=false)
const FXchar * remove (const FXchar *ky)
const FXchar * find (const FXchar *ky) const
const FXchar * data (FXuint pos) const
virtual ~FXStringDict ()
void size (FXint m)
FXint size () const
FXint no () const
void * insert (const FXchar *ky, const void *ptr, bool mrk=false)
void * replace (const FXchar *ky, const void *ptr, bool mrk=false)
bool empty (FXint pos) const
const FXchar * key (FXuint pos) const
bool mark (FXuint pos) const
FXint first () const
FXint last () const
FXint next (FXint pos) const
FXint prev (FXint pos) const
void clear ()
virtual long onDefault (FXObject *, FXSelector, void *)
const FXchar * getClassName () const
bool isMemberOf (const FXMetaClass *metaclass) const
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
QTransString tr (const char *text, const char *hint=0)
virtual void * getPythonObject () const
virtual void decouplePythonObject () const

Protected Member Functions

virtual void * createData (const void *)
virtual void deleteData (void *)

Static Protected Member Functions

static FXint hash (const FXchar *str)

Protected Attributes

FXDictEntry * dict
FXint total
FXint number

Constructor & Destructor Documentation

FX::FXStringDict::FXStringDict (  ) 

Construct a string dictionary.

FX::FXStringDict::FXStringDict ( const FXStringDict orig  ) 

Copy constructor.

virtual FX::FXStringDict::~FXStringDict (  )  [virtual]

Destructor.


Member Function Documentation

virtual void* FX::FXStringDict::createData ( const void *   )  [protected, virtual]

Overload this function in a derived class to return the data pointer given an input pointer; the default implementation just returns the input pointer.

Reimplemented from FX::FXDict.

virtual void FX::FXStringDict::deleteData ( void *   )  [protected, virtual]

Overload this function in a derived class to delete the pointer previously returned by createData(); the default implementation does nothing.

Reimplemented from FX::FXDict.

FXStringDict& FX::FXStringDict::operator= ( const FXStringDict orig  ) 

Assignment operator.

const FXchar* FX::FXStringDict::insert ( const FXchar *  ky,
const FXchar *  str,
bool  mrk = false 
) [inline]

Insert a new string indexed by key, with given mark flag.

References FX::FXDict::insert().

const FXchar* FX::FXStringDict::replace ( const FXchar *  ky,
const FXchar *  str,
bool  mrk = false 
) [inline]

Replace or insert a new string indexed by key, unless given mark is lower that the existing mark.

References FX::FXDict::replace().

const FXchar* FX::FXStringDict::remove ( const FXchar *  ky  )  [inline]

Remove entry indexed by key.

Reimplemented from FX::FXDict.

References FX::FXDict::remove().

const FXchar* FX::FXStringDict::find ( const FXchar *  ky  )  const [inline]

Return the entry indexed by key, or return NULL if the key does not exist.

Reimplemented from FX::FXDict.

References FX::FXDict::find().

const FXchar* FX::FXStringDict::data ( FXuint  pos  )  const [inline]

Return the string at position pos.

Reimplemented from FX::FXDict.

void FX::FXDict::size ( FXint  m  )  [inherited]

Resize the table to the given size.

FXint FX::FXDict::size (  )  const [inline, inherited]

Return the size of the table, including the empty slots.

FXint FX::FXDict::no (  )  const [inline, inherited]

Return the total number of entries in the table.

void* FX::FXDict::insert ( const FXchar *  ky,
const void *  ptr,
bool  mrk = false 
) [inherited]

Insert a new entry into the table given key and mark. If there is already an entry with that key, leave it unchanged, otherwise insert the new entry.

Referenced by insert(), and FX::FXIconDict::insert().

void* FX::FXDict::replace ( const FXchar *  ky,
const void *  ptr,
bool  mrk = false 
) [inherited]

Replace data at key, if the entry's mark is less than or equal to the given mark. If there was no existing entry, a new entry is inserted with the given mark.

Referenced by replace().

bool FX::FXDict::empty ( FXint  pos  )  const [inline, inherited]

Return true if slot is empty.

const FXchar* FX::FXDict::key ( FXuint  pos  )  const [inline, inherited]

Return key at position pos.

bool FX::FXDict::mark ( FXuint  pos  )  const [inline, inherited]

Return mark flag of entry at position pos.

FXint FX::FXDict::first (  )  const [inherited]

Return position of first filled slot, or >= total

FXint FX::FXDict::last (  )  const [inherited]

Return position of last filled slot or -1

FXint FX::FXDict::next ( FXint  pos  )  const [inherited]

Return position of next filled slot in hash table or a value greater than or equal to total if no filled slot was found

FXint FX::FXDict::prev ( FXint  pos  )  const [inherited]

Return position of previous filled slot in hash table or a -1 if no filled slot was found

void FX::FXDict::clear (  )  [inherited]

Clear all entries.

Reimplemented in FX::FXSettings.

virtual long FX::FXObject::onDefault ( FXObject ,
FXSelector  ,
void *   
) [virtual, inherited]

Called for unhandled messages.

Reimplemented in FX::FXDelegator, FX::FXGLViewer, FX::FXMDIChild, and FX::FXMDIClient.

const FXchar* FX::FXObject::getClassName (  )  const [inherited]

Get class name of some object.

bool FX::FXObject::isMemberOf ( const FXMetaClass metaclass  )  const [inherited]

Check if object is member of metaclass.

virtual long FX::FXObject::tryHandle ( FXObject sender,
FXSelector  sel,
void *  ptr 
) [virtual, inherited]

Try handle message safely.

virtual void FX::FXObject::save ( FXStream store  )  const [virtual, inherited]

Save object to stream.

Reimplemented in FX::FX4Splitter, FX::FX7Segment, FX::FXAccelTable, FX::FXApp, FX::FXArrowButton, FX::FXBitmap, FX::FXBitmapFrame, FX::FXBitmapView, FX::FXCheckButton, FX::FXChoiceBox, FX::FXColorBar, FX::FXColorDialog, FX::FXColorRing, FX::FXColorSelector, FX::FXColorWell, FX::FXColorWheel, FX::FXComboBox, FX::FXCursor, FX::FXDial, FX::FXDirBox, FX::FXDirDialog, FX::FXDirList, FX::FXDirSelector, FX::FXDockBar, FX::FXDockHandler, FX::FXDockTitle, FX::FXDocument, FX::FXDragCorner, FX::FXDrawable, FX::FXDriveBox, FX::FXFileDialog, FX::FXFileDict, FX::FXFileList, FX::FXFileSelector, FX::FXFoldingItem, FX::FXFoldingList, FX::FXFont, FX::FXFontDialog, FX::FXFontSelector, FX::FXFrame, FX::FXGLCanvas, FX::FXGLCone, FX::FXGLContext, FX::FXGLCube, FX::FXGLCylinder, FX::FXGLGroup, FX::FXGLShape, FX::FXGLSphere, FX::FXGLTriangleMesh, FX::FXGLVertices, FX::FXGLViewer, FX::FXGLVisual, FX::FXGradientBar, FX::FXGroupBox, FX::FXHeaderItem, FX::FXHeader, FX::FXIconDict, FX::FXIconItem, FX::FXIconList, FX::FXIconSource, FX::FXId, FX::FXImage, FX::FXImageFrame, FX::FXImageView, FX::FXKnob, FX::FXLabel, FX::FXListItem, FX::FXList, FX::FXListBox, FX::FXMDIChild, FX::FXMDIClient, FX::FXMenuButton, FX::FXMenuCaption, FX::FXMenuCascade, FX::FXMenuCheck, FX::FXMenuCommand, FX::FXMenuRadio, FX::FXMenuSeparator, FX::FXMenuTitle, FX::FXOptionMenu, FX::FXPacker, FX::FXPrimaryButton, FX::FXPrintDialog, FX::FXProgressBar, FX::FXRadioButton, FX::FXRealSlider, FX::FXRealSpinner, FX::FXRecentFiles, FX::FXReplaceDialog, FX::FXRuler, FX::FXRulerView, FX::FXScrollBar, FX::FXSlider, FX::FXSpinner, FX::FXSplashWindow, FX::FXSplitter, FX::FXSpring, FX::FXStatusBar, FX::FXStatusLine, FX::FXSwitcher, FX::FXTabBar, FX::FXTableItem, FX::FXTable, FX::FXText, FX::FXTextField, FX::FXToggleButton, FX::FXToolBarGrip, FX::FXToolBarShell, FX::FXToolBarTab, FX::FXToolTip, FX::FXTopWindow, FX::FXTreeItem, FX::FXTreeList, FX::FXTreeListBox, FX::FXTriStateButton, FX::FXVisual, FX::FXWindow, and FX::FXWizard.

virtual void FX::FXObject::load ( FXStream store  )  [virtual, inherited]

Load object from stream.

Reimplemented in FX::FX4Splitter, FX::FX7Segment, FX::FXAccelTable, FX::FXApp, FX::FXArrowButton, FX::FXBitmap, FX::FXBitmapFrame, FX::FXBitmapView, FX::FXCheckButton, FX::FXChoiceBox, FX::FXColorBar, FX::FXColorDialog, FX::FXColorRing, FX::FXColorSelector, FX::FXColorWell, FX::FXColorWheel, FX::FXComboBox, FX::FXCursor, FX::FXDial, FX::FXDirBox, FX::FXDirDialog, FX::FXDirList, FX::FXDirSelector, FX::FXDockBar, FX::FXDockHandler, FX::FXDockTitle, FX::FXDocument, FX::FXDragCorner, FX::FXDrawable, FX::FXDriveBox, FX::FXFileDialog, FX::FXFileDict, FX::FXFileList, FX::FXFileSelector, FX::FXFoldingItem, FX::FXFoldingList, FX::FXFont, FX::FXFontDialog, FX::FXFontSelector, FX::FXFrame, FX::FXGLCanvas, FX::FXGLCone, FX::FXGLContext, FX::FXGLCube, FX::FXGLCylinder, FX::FXGLGroup, FX::FXGLShape, FX::FXGLSphere, FX::FXGLTriangleMesh, FX::FXGLVertices, FX::FXGLViewer, FX::FXGLVisual, FX::FXGradientBar, FX::FXGroupBox, FX::FXHeaderItem, FX::FXHeader, FX::FXIconDict, FX::FXIconItem, FX::FXIconList, FX::FXIconSource, FX::FXId, FX::FXImage, FX::FXImageFrame, FX::FXImageView, FX::FXKnob, FX::FXLabel, FX::FXListItem, FX::FXList, FX::FXListBox, FX::FXMDIChild, FX::FXMDIClient, FX::FXMenuButton, FX::FXMenuCaption, FX::FXMenuCascade, FX::FXMenuCheck, FX::FXMenuCommand, FX::FXMenuRadio, FX::FXMenuSeparator, FX::FXMenuTitle, FX::FXOptionMenu, FX::FXPacker, FX::FXPrimaryButton, FX::FXPrintDialog, FX::FXProgressBar, FX::FXRadioButton, FX::FXRealSlider, FX::FXRealSpinner, FX::FXRecentFiles, FX::FXReplaceDialog, FX::FXRuler, FX::FXRulerView, FX::FXScrollBar, FX::FXSlider, FX::FXSpinner, FX::FXSplashWindow, FX::FXSplitter, FX::FXSpring, FX::FXStatusBar, FX::FXStatusLine, FX::FXSwitcher, FX::FXTabBar, FX::FXTableItem, FX::FXTable, FX::FXText, FX::FXTextField, FX::FXToggleButton, FX::FXToolBarGrip, FX::FXToolBarShell, FX::FXToolBarTab, FX::FXToolTip, FX::FXTopWindow, FX::FXTreeItem, FX::FXTreeList, FX::FXTreeListBox, FX::FXTriStateButton, FX::FXVisual, FX::FXWindow, and FX::FXWizard.

QTransString FX::FXObject::tr ( const char *  text,
const char *  hint = 0 
) [inherited]

Returns a human translated version of the text to the locale language (warning: uses a virtual method call, so can't use before construction)

virtual void* FX::FXObject::getPythonObject (  )  const [inline, virtual, inherited]

Returns the python object representing this instance (if created in python).

virtual void FX::FXObject::decouplePythonObject (  )  const [inline, virtual, inherited]

Causes decoupling of python object from this object (deletes self).


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

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:18:15 2008 for TnFOX by doxygen v1.5.6