From aeefd3fe454bfaed093355278b1e2caa84bfd77a Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 30 Jun 2024 12:33:25 +0900 Subject: Rename threading nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/annotated.html | 12 +- doc/html/classchart.html | 8 +- doc/html/classes.html | 66 ++++----- doc/html/environment.html | 12 +- doc/html/functions.html | 56 ++++---- doc/html/headerfilesynonyms | 2 +- doc/html/headers.html | 10 +- doc/html/hierarchy.html | 12 +- doc/html/index | 88 ++++++------ doc/html/ntqdeepcopy.html | 10 +- doc/html/ntqmutex.html | 195 --------------------------- doc/html/ntqregexp.html | 4 +- doc/html/ntqsemaphore.html | 149 -------------------- doc/html/ntqt.html | 2 +- doc/html/ntqthread.html | 247 ---------------------------------- doc/html/ntqthreadstorage.html | 189 -------------------------- doc/html/ntqwaitcondition.html | 197 --------------------------- doc/html/qmutex-h.html | 159 ---------------------- doc/html/qmutex-members.html | 52 ------- doc/html/qmutexlocker-members.html | 49 ------- doc/html/qmutexlocker.html | 220 ------------------------------ doc/html/qsemaphore-h.html | 126 ----------------- doc/html/qsemaphore-members.html | 55 -------- doc/html/qt.dcf | 124 ++++++++--------- doc/html/qthread-h.html | 166 ----------------------- doc/html/qthread-members.html | 59 -------- doc/html/qthreadstorage-h.html | 140 ------------------- doc/html/qthreadstorage-members.html | 51 ------- doc/html/qwaitcondition-h.html | 124 ----------------- doc/html/qwaitcondition-members.html | 51 ------- doc/html/thread.html | 12 +- doc/html/threads.html | 18 +-- doc/html/titleindex | 34 ++--- doc/html/tqmap.html | 2 +- doc/html/tqmutex-h.html | 159 ++++++++++++++++++++++ doc/html/tqmutex-members.html | 52 +++++++ doc/html/tqmutex.html | 195 +++++++++++++++++++++++++++ doc/html/tqmutexlocker-members.html | 49 +++++++ doc/html/tqmutexlocker.html | 220 ++++++++++++++++++++++++++++++ doc/html/tqsemaphore-h.html | 126 +++++++++++++++++ doc/html/tqsemaphore-members.html | 55 ++++++++ doc/html/tqsemaphore.html | 149 ++++++++++++++++++++ doc/html/tqthread-h.html | 166 +++++++++++++++++++++++ doc/html/tqthread-members.html | 59 ++++++++ doc/html/tqthread.html | 247 ++++++++++++++++++++++++++++++++++ doc/html/tqthreadstorage-h.html | 140 +++++++++++++++++++ doc/html/tqthreadstorage-members.html | 51 +++++++ doc/html/tqthreadstorage.html | 189 ++++++++++++++++++++++++++ doc/html/tqvaluelist.html | 2 +- doc/html/tqvaluevector.html | 2 +- doc/html/tqwaitcondition-h.html | 124 +++++++++++++++++ doc/html/tqwaitcondition-members.html | 51 +++++++ doc/html/tqwaitcondition.html | 197 +++++++++++++++++++++++++++ doc/html/whatsthis | 12 +- 54 files changed, 2473 insertions(+), 2473 deletions(-) delete mode 100644 doc/html/ntqmutex.html delete mode 100644 doc/html/ntqsemaphore.html delete mode 100644 doc/html/ntqthread.html delete mode 100644 doc/html/ntqthreadstorage.html delete mode 100644 doc/html/ntqwaitcondition.html delete mode 100644 doc/html/qmutex-h.html delete mode 100644 doc/html/qmutex-members.html delete mode 100644 doc/html/qmutexlocker-members.html delete mode 100644 doc/html/qmutexlocker.html delete mode 100644 doc/html/qsemaphore-h.html delete mode 100644 doc/html/qsemaphore-members.html delete mode 100644 doc/html/qthread-h.html delete mode 100644 doc/html/qthread-members.html delete mode 100644 doc/html/qthreadstorage-h.html delete mode 100644 doc/html/qthreadstorage-members.html delete mode 100644 doc/html/qwaitcondition-h.html delete mode 100644 doc/html/qwaitcondition-members.html create mode 100644 doc/html/tqmutex-h.html create mode 100644 doc/html/tqmutex-members.html create mode 100644 doc/html/tqmutex.html create mode 100644 doc/html/tqmutexlocker-members.html create mode 100644 doc/html/tqmutexlocker.html create mode 100644 doc/html/tqsemaphore-h.html create mode 100644 doc/html/tqsemaphore-members.html create mode 100644 doc/html/tqsemaphore.html create mode 100644 doc/html/tqthread-h.html create mode 100644 doc/html/tqthread-members.html create mode 100644 doc/html/tqthread.html create mode 100644 doc/html/tqthreadstorage-h.html create mode 100644 doc/html/tqthreadstorage-members.html create mode 100644 doc/html/tqthreadstorage.html create mode 100644 doc/html/tqwaitcondition-h.html create mode 100644 doc/html/tqwaitcondition-members.html create mode 100644 doc/html/tqwaitcondition.html (limited to 'doc/html') diff --git a/doc/html/annotated.html b/doc/html/annotated.html index 57ac9aecf..9633f5286 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -248,8 +248,8 @@ body { background: #ffffff; color: black; } TQMouseEventParameters that describe a mouse event TQMoveEventEvent parameters for move events TQMovieIncremental loading of animations or images, signalling as it progresses -TQMutexAccess serialization between threads -TQMutexLockerSimplifies locking and unlocking TQMutexes +TQMutexAccess serialization between threads +TQMutexLockerSimplifies locking and unlocking TQMutexes TQNPInstanceTQObject that is a web browser plugin TQNPStreamStream of data provided to a TQNPInstance by the browser TQNPWidgetTQWidget that is a web browser plugin window @@ -298,7 +298,7 @@ body { background: #ffffff; color: black; } TQSGIStyleSGI/Irix look and feel TQScrollBarVertical or horizontal scroll bar TQScrollViewScrolling area with on-demand scroll bars -TQSemaphoreRobust integer semaphore +TQSemaphoreRobust integer semaphore TQServerSocketTCP-based server TQSessionManagerAccess to the session manager TQSettingsPersistent platform-independent application settings @@ -368,8 +368,8 @@ body { background: #ffffff; color: black; } TQTextIStreamConvenience class for input streams TQTextOStreamConvenience class for output streams TQTextStreamBasic functions for reading and writing text using a TQIODevice -TQThreadPlatform-independent threads -TQThreadStoragePer-thread data storage +TQThreadPlatform-independent threads +TQThreadStoragePer-thread data storage TQTimeClock time functions TQTimeEditTime editor TQTimerTimer signals and single-shot timers @@ -399,7 +399,7 @@ body { background: #ffffff; color: black; } TQValueVectorValue-based template class that provides a dynamic array TQVariantActs like a union for the most common TQt data types TQWMatrix2D transformations of a coordinate system -TQWaitConditionAllows waiting/waking for conditions between threads +TQWaitConditionAllows waiting/waking for conditions between threads TQWhatsThisSimple description of any widget, i.e. answering the question "What's this?" TQWheelEventParameters that describe a wheel event TQWidgetThe base class of all user interface objects diff --git a/doc/html/classchart.html b/doc/html/classchart.html index 133d1d5f0..ae9cc1704 100644 --- a/doc/html/classchart.html +++ b/doc/html/classchart.html @@ -40,7 +40,7 @@ body { background: #ffffff; color: black; } - + @@ -269,7 +269,7 @@ body { background: #ffffff; color: black; } - + @@ -283,7 +283,7 @@ body { background: #ffffff; color: black; } - + @@ -304,7 +304,7 @@ body { background: #ffffff; color: black; } - + diff --git a/doc/html/classes.html b/doc/html/classes.html index da7b6b481..7f0ff8e3a 100644 --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -73,7 +73,7 @@ classes, see TQt's Main Classes. TQAccessibleObject - + TQImageConsumer @@ -233,7 +233,7 @@ classes, see TQt's Main Classes. TQPtrVector -TQThread +TQThread @@ -244,14 +244,14 @@ classes, see TQt's Main Classes. TQPushButton -TQThreadStorage +TQThreadStorage TQDomNode - - + + R TQRadioButton @@ -262,7 +262,7 @@ classes, see TQt's Main Classes. TQDomNodeList - + TQRangeControl @@ -329,9 +329,9 @@ classes, see TQt's Main Classes. TQDragLeaveEvent TQLayoutIterator -S - -* + + + TQToolTip @@ -340,7 +340,7 @@ classes, see TQt's Main Classes. TQDragMoveEvent TQLCDNumber - +S TQScrollBar TQToolTipGroup @@ -363,7 +363,7 @@ classes, see TQt's Main Classes. TQLineEdit -TQSemaphore +TQSemaphore TQTranslatorMessage @@ -557,13 +557,13 @@ classes, see TQt's Main Classes. TQCanvasView - + TQMenuData TQSpacerItem W -TQWaitCondition +TQWaitCondition TQCDEStyle @@ -634,7 +634,7 @@ classes, see TQt's Main Classes. TQChildEvent - + TQMotifDialog * @@ -645,7 +645,7 @@ classes, see TQt's Main Classes. TQClipboard - + TQMotifPlusStyle @@ -680,7 +680,7 @@ classes, see TQt's Main Classes. TQGLColormap - + TQSqlField @@ -691,7 +691,7 @@ classes, see TQt's Main Classes. TQGLContext - + TQSqlFieldInfo @@ -706,7 +706,7 @@ classes, see TQt's Main Classes. TQSqlForm - + TQComboBox @@ -717,7 +717,7 @@ classes, see TQt's Main Classes. TQSqlIndex - + TQComboTableItem @@ -734,22 +734,22 @@ classes, see TQt's Main Classes. TQGridLayout -TQMutex +TQMutex TQSqlQuery - + TQConstString TQGridView -TQMutexLocker +TQMutexLocker TQSqlRecord - + TQContextMenuEvent @@ -760,10 +760,10 @@ classes, see TQt's Main Classes. TQSqlRecordInfo - + - + TQGuardedPtr @@ -924,8 +924,8 @@ classes, see TQt's Main Classes. TQPalette TQStyleSheetItem - - + + TQDesktopWidget @@ -935,8 +935,8 @@ classes, see TQt's Main Classes. TQPen TQSyntaxHighlighter - - + + TQDial @@ -946,8 +946,8 @@ classes, see TQt's Main Classes. TQPicture T TQt - - + + TQDialog @@ -957,8 +957,8 @@ classes, see TQt's Main Classes. TQPixmap TQTab - - + +

* Extension classes of Motif and Netscape. diff --git a/doc/html/environment.html b/doc/html/environment.html index 4805996dc..28860e8b1 100644 --- a/doc/html/environment.html +++ b/doc/html/environment.html @@ -41,16 +41,16 @@ event handling, access to system settings, TQEventThe base class of all event classes. Event objects contain event parameters TQFontDatabaseInformation about the fonts available in the underlying window system TQMimeSourceFactoryExtensible provider of mime-typed data -TQMutexAccess serialization between threads -TQMutexLockerSimplifies locking and unlocking TQMutexes +TQMutexAccess serialization between threads +TQMutexLockerSimplifies locking and unlocking TQMutexes TQPixmapCacheApplication-global cache for pixmaps -TQSemaphoreRobust integer semaphore +TQSemaphoreRobust integer semaphore TQSessionManagerAccess to the session manager -TQThreadPlatform-independent threads -TQThreadStoragePer-thread data storage +TQThreadPlatform-independent threads +TQThreadStoragePer-thread data storage TQTranslatorInternationalization support for text output TQTranslatorMessageTranslator message and its properties -TQWaitConditionAllows waiting/waking for conditions between threads +TQWaitConditionAllows waiting/waking for conditions between threads


diff --git a/doc/html/functions.html b/doc/html/functions.html index e8c20a9b5..e432996ca 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -236,7 +236,7 @@ abort: TQButton TQCheckBox TQPushButton TQRadioButton
  • autoReset: TQProgressDialog
  • autoUnload: TQLibrary
  • available: - TQSemaphore TQSound
  • availableGeometry: + TQSemaphore TQSound
  • availableGeometry: TQDesktopWidget
  • awake: TQEventLoop
  • back: @@ -606,7 +606,7 @@ c: TQHttp
  • currentTab: TQTabBar
  • currentText: TQComboBox TQComboTableItem TQListBox
  • currentThread: - TQThread
  • currentTime: + TQThread
  • currentTime: TQTime
  • currentValueText: TQSpinBox
  • currentVerticalAlignmentChanged: TQTextEdit
  • cursor: @@ -887,7 +887,7 @@ echoMode: TQApplication TQDialog TQEventLoop TQPopupMenu TQSqlDatabase TQSqlQuery
  • executedQuery: TQSqlQuery
  • exists: TQDir TQFile TQFileInfo
  • exit: - TQApplication TQEventLoop TQThread
  • exitLoop: + TQApplication TQEventLoop TQThread
  • exitLoop: TQEventLoop
  • exitStatus: TQProcess
  • expand: TQGridLayout
  • expandTo: @@ -938,7 +938,7 @@ falseText: TQBoxLayout TQGridLayout
  • finish: TQSplashScreen
  • finishButton: TQWizard
  • finished: - TQMovie TQNetworkProtocol TQThread TQUrlOperator
  • first: + TQMovie TQNetworkProtocol TQThread TQUrlOperator
  • first: TQDataBrowser TQFocusData TQPtrList TQSqlQuery TQValueList TQValueVector
  • firstChild: TQDomNode TQListView TQListViewItem
  • firstItem: TQIconView TQListBox
  • firstRecordAvailable: @@ -1100,7 +1100,7 @@ hScrollBarMode: TQTabDialog
  • hasHost: TQUrl
  • hasKey: TQHttpHeader
  • hasLocalData: - TQThreadStorage
  • hasMarkedText: + TQThreadStorage
  • hasMarkedText: TQMultiLineEdit
  • hasMouse: TQWidget
  • hasMouseTracking: TQWidget
  • hasOkButton: @@ -1543,13 +1543,13 @@ label: TQImage TQPixmap
  • loadImages: TQWidgetFactory
  • local8Bit: TQString
  • localData: - TQThreadStorage
  • localFileToUri: + TQThreadStorage
  • localFileToUri: TQUriDrag
  • localName: TQDomNode TQXmlAttributes
  • locale: TQTextCodec
  • localeAwareCompare: TQString
  • lock: - TQApplication TQMutex
  • locked: - TQApplication TQMutex
  • logicalDpiX: + TQApplication TQMutex
  • locked: + TQApplication TQMutex
  • logicalDpiX: TQPaintDeviceMetrics
  • logicalDpiY: TQPaintDeviceMetrics
  • logicalFontSize: TQStyleSheetItem
  • logicalFontSizeStep: @@ -1702,9 +1702,9 @@ m11: TQLabel
  • msec: TQTime
  • msecsTo: TQTime
  • msleep: - TQThread
  • multiLinesEnabled: + TQThread
  • multiLinesEnabled: TQListViewItem
  • mutex: - TQMutexLocker
  • + TQMutexLocker
  • name: TQColor TQDomAttr TQDomDocumentType TQFile TQLocale TQMetaProperty TQObject TQSqlCursor TQSqlField TQSqlFieldInfo TQSqlIndex TQStyleSheetItem TQTextCodec TQUrlInfo
  • nameFilter: TQDir TQUrlOperator
  • nameToType: @@ -1810,11 +1810,11 @@ object: TQGuardedPtr TQListViewItemIterator TQMapConstIterator TQMapIterator TQPoint TQPtrListIterator TQSize TQValueListConstIterator TQValueListIterator
  • operator*=: TQPoint TQSize TQWMatrix
  • operator+: TQCString TQCanvasItemList TQPoint TQRegion TQSize TQString TQValueList
  • operator++: - TQAsciiCacheIterator TQAsciiDictIterator TQCacheIterator TQDictIterator TQIntCacheIterator TQIntDictIterator TQLayoutIterator TQListViewItemIterator TQMapConstIterator TQMapIterator TQPtrDictIterator TQPtrListIterator TQSemaphore TQValueListConstIterator TQValueListIterator
  • operator+=: - TQAsciiCacheIterator TQAsciiDictIterator TQCString TQCacheIterator TQIntCacheIterator TQIntDictIterator TQListViewItemIterator TQPoint TQPtrDictIterator TQPtrListIterator TQRegion TQSemaphore TQSize TQString TQValueList TQValueListIterator
  • operator-: + TQAsciiCacheIterator TQAsciiDictIterator TQCacheIterator TQDictIterator TQIntCacheIterator TQIntDictIterator TQLayoutIterator TQListViewItemIterator TQMapConstIterator TQMapIterator TQPtrDictIterator TQPtrListIterator TQSemaphore TQValueListConstIterator TQValueListIterator
  • operator+=: + TQAsciiCacheIterator TQAsciiDictIterator TQCString TQCacheIterator TQIntCacheIterator TQIntDictIterator TQListViewItemIterator TQPoint TQPtrDictIterator TQPtrListIterator TQRegion TQSemaphore TQSize TQString TQValueList TQValueListIterator
  • operator-: TQPoint TQRegion TQSize
  • operator--: - TQAsciiCacheIterator TQCacheIterator TQIntCacheIterator TQListViewItemIterator TQMapConstIterator TQMapIterator TQPtrListIterator TQSemaphore TQValueListConstIterator TQValueListIterator
  • operator-=: - TQAsciiCacheIterator TQCacheIterator TQIntCacheIterator TQListViewItemIterator TQPoint TQPtrListIterator TQRegion TQSemaphore TQSize TQValueListIterator
  • operator->: + TQAsciiCacheIterator TQCacheIterator TQIntCacheIterator TQListViewItemIterator TQMapConstIterator TQMapIterator TQPtrListIterator TQSemaphore TQValueListConstIterator TQValueListIterator
  • operator-=: + TQAsciiCacheIterator TQCacheIterator TQIntCacheIterator TQListViewItemIterator TQPoint TQPtrListIterator TQRegion TQSemaphore TQSize TQValueListIterator
  • operator->: TQGuardedPtr
  • operator/: TQPoint TQSize
  • operator/=: TQPoint TQSize
  • operator<: @@ -2249,8 +2249,8 @@ rBottom: TQTableItem
  • rowStretch: TQGridLayout
  • rtti: TQCanvasEllipse TQCanvasItem TQCanvasLine TQCanvasPolygon TQCanvasPolygonalItem TQCanvasRectangle TQCanvasSpline TQCanvasSprite TQCanvasText TQCheckListItem TQCheckTableItem TQComboTableItem TQIconViewItem TQListBoxItem TQListViewItem TQTableItem
  • run: - TQThread
  • running: - TQMovie TQThread
  • rwidth: + TQThread
  • running: + TQMovie TQThread
  • rwidth: TQSize
  • rx: TQPoint
  • ry: TQPoint
  • @@ -2668,7 +2668,7 @@ sRect: TQTextEdit
  • setListBox: TQComboBox
  • setListStyle: TQStyleSheetItem
  • setLocalData: - TQThreadStorage
  • setLogicalFontSize: + TQThreadStorage
  • setLogicalFontSize: TQStyleSheetItem
  • setLogicalFontSizeStep: TQStyleSheetItem
  • setLooping: TQImageConsumer
  • setLoops: @@ -3062,7 +3062,7 @@ sRect: TQSplitter
  • skipWhiteSpace: TQTextStream
  • skippedEntity: TQXmlContentHandler
  • sleep: - TQThread
  • sliderMoved: + TQThread
  • sliderMoved: TQScrollBar TQSlider
  • sliderPressed: TQScrollBar TQSlider
  • sliderRect: TQScrollBar TQSlider
  • sliderReleased: @@ -3104,7 +3104,7 @@ sRect: TQWidget
  • standardIcon: TQMessageBox
  • standardSizes: TQFontDatabase
  • start: - TQNetworkProtocol TQProcess TQThread TQTime TQTimer TQUrlOperator
  • startCDATA: + TQNetworkProtocol TQProcess TQThread TQTime TQTimer TQUrlOperator
  • startCDATA: TQXmlLexicalHandler
  • startDTD: TQXmlLexicalHandler
  • startDocument: TQXmlContentHandler
  • startDrag: @@ -3208,7 +3208,7 @@ tab: TQIconView TQListBox TQListView TQListViewItem TQTable
  • takeNode: TQPtrList
  • target: TQDomProcessingInstruction TQDragObject
  • terminate: - TQThread
  • testBit: + TQThread
  • testBit: TQBitArray
  • testOption: TQGLFormat
  • testWFlags: TQWidget
  • text: @@ -3323,7 +3323,7 @@ tab: TQScrollView
  • topRight: TQRect
  • topRow: TQTableSelection
  • total: - TQSemaphore
  • totalCost: + TQSemaphore
  • totalCost: TQAsciiCache TQCache TQIntCache
  • totalHeight: TQListViewItem
  • totalSteps: TQProgressBar TQProgressDialog
  • tr: @@ -3340,8 +3340,8 @@ tab: TQPixmap
  • trueText: TQDataTable
  • truncate: TQCString TQMemArray TQString
  • tryAccess: - TQSemaphore
  • tryLock: - TQApplication TQMutex
  • tryTerminate: + TQSemaphore
  • tryLock: + TQApplication TQMutex
  • tryTerminate: TQProcess
  • turnOffChild: TQCheckListItem
  • type: TQApplication TQCheckListItem TQEvent TQMetaProperty TQNPStream TQSocketDevice TQSocketNotifier TQSqlError TQSqlField TQSqlFieldInfo TQVariant TQXmlAttributes
  • typeID: @@ -3363,7 +3363,7 @@ ucs2: TQTabletEvent
  • unite: TQRect TQRegion
  • unload: TQLibrary
  • unlock: - TQApplication TQMutex
  • unparsedEntityDecl: + TQApplication TQMutex
  • unparsedEntityDecl: TQXmlDTDHandler
  • unpause: TQMovie
  • unregisterDecoderFactory: TQImageDecoder
  • unregisterSocketNotifier: @@ -3406,7 +3406,7 @@ ucs2: TQActionGroup
  • usesTextLabel: TQMainWindow TQToolButton
  • usesTextLabelChanged: TQMainWindow
  • usleep: - TQThread
  • utf8: + TQThread
  • utf8: TQString
  • vScrollBarMode: TQScrollView
  • valid: @@ -3444,10 +3444,10 @@ vScrollBarMode: TQScrollView
  • visualRect: TQStyle
  • wait: - TQThread TQWaitCondition
  • waitForMore: + TQThread TQWaitCondition
  • waitForMore: TQSocket TQSocketDevice
  • wakeAll: - TQWaitCondition
  • wakeOne: - TQWaitCondition
  • wakeUp: + TQWaitCondition
  • wakeOne: + TQWaitCondition
  • wakeUp: TQEventLoop
  • wakeUpGuiThread: TQApplication
  • warning: TQMessageBox TQXmlErrorHandler
  • wasCanceled: diff --git a/doc/html/headerfilesynonyms b/doc/html/headerfilesynonyms index c6040d9c3..a9bbf1a54 100644 --- a/doc/html/headerfilesynonyms +++ b/doc/html/headerfilesynonyms @@ -114,7 +114,7 @@ qmimesource.h ntqmime.h qmimesourcefactory.h ntqmime.h qwindowsmime.h ntqmime.h qmacmime.h ntqmime.h -qmutexlocker.h ntqmutex.h +tqmutexlocker.h tqmutex.h qnetworkoperation.h ntqnetworkprotocol.h qnpstream.h ntqnp.h qnpwidget.h ntqnp.h diff --git a/doc/html/headers.html b/doc/html/headers.html index 94af47d1e..00d10c5ad 100644 --- a/doc/html/headers.html +++ b/doc/html/headers.html @@ -147,7 +147,7 @@ body { background: #ffffff; color: black; }
  • qmotifwidget.h
  • ntqmovie.h
  • ntqmultilineedit.h -
  • ntqmutex.h +
  • tqmutex.h
  • ntqnamespace.h
  • ntqnetworkprotocol.h
  • ntqnp.h @@ -187,7 +187,7 @@ body { background: #ffffff; color: black; }
  • ntqrtlcodec.h
  • ntqscrollbar.h
  • ntqscrollview.h -
  • ntqsemaphore.h +
  • tqsemaphore.h
  • ntqserversocket.h
  • ntqsessionmanager.h
  • ntqsettings.h @@ -241,8 +241,8 @@ body { background: #ffffff; color: black; }
  • tqtextedit.h
  • tqtextstream.h
  • tqtextview.h -
  • ntqthread.h -
  • ntqthreadstorage.h +
  • tqthread.h +
  • tqthreadstorage.h
  • tqtimer.h
  • ntqtoolbar.h
  • ntqtoolbox.h @@ -262,7 +262,7 @@ body { background: #ffffff; color: black; }
  • ntqvbox.h
  • ntqvbuttongroup.h
  • ntqvgroupbox.h -
  • ntqwaitcondition.h +
  • tqwaitcondition.h
  • ntqwhatsthis.h
  • tqwidget.h
  • tqwidgetfactory.h diff --git a/doc/html/hierarchy.html b/doc/html/hierarchy.html index 0f13a5781..6ccf95be0 100644 --- a/doc/html/hierarchy.html +++ b/doc/html/hierarchy.html @@ -161,8 +161,8 @@ classes in the TQt API.
  • TQMimeSource
  • TQMimeSourceFactory
  • TQMovie -
  • TQMutex -
  • TQMutexLocker +
  • TQMutex +
  • TQMutexLocker
  • TQNPlugin
  • TQNPStream
  • TQPaintDevice @@ -212,7 +212,7 @@ classes in the TQt API.
  • TQRect
  • TQRegExp
  • TQRegion -
  • TQSemaphore +
  • TQSemaphore
  • TQSettings
  • TQSimpleRichText
  • TQSize @@ -494,7 +494,7 @@ classes in the TQt API.
  • TQCheckTableItem
  • TQComboTableItem -
  • TQThread +
  • TQThread
  • TQToolTip
  • TQWhatsThis @@ -523,7 +523,7 @@ classes in the TQt API.
  • TQTextIStream
  • TQTextOStream -
  • TQThreadStorage +
  • TQThreadStorage
  • TQTime
  • TQTranslatorMessage
  • TQUrl @@ -539,7 +539,7 @@ classes in the TQt API.
  • TQValueListIterator
  • TQValueVector
  • TQVariant -
  • TQWaitCondition +
  • TQWaitCondition
  • TQWidgetFactory
  • TQWidgetPlugin
  • TQWindowsMime diff --git a/doc/html/index b/doc/html/index index fa9d3bf3c..e73b3c12a 100644 --- a/doc/html/index +++ b/doc/html/index @@ -4139,17 +4139,17 @@ "QMultiLineEdit::setCursorPosition" ntqmultilineedit.html#setCursorPosition "QMultiLineEdit::setEdited" ntqmultilineedit.html#setEdited "QMultiLineEdit::textLine" ntqmultilineedit.html#textLine -"QMutex" ntqmutex.html -"QMutex::lock" ntqmutex.html#lock -"QMutex::locked" ntqmutex.html#locked -"QMutex::tryLock" ntqmutex.html#tryLock -"QMutex::unlock" ntqmutex.html#unlock -"QMutex::~QMutex" ntqmutex.html#~QMutex -"QMutexLocker" qmutexlocker.html -"QMutexLocker::mutex" qmutexlocker.html#mutex -"QMutexLocker::~QMutexLocker" qmutexlocker.html#~QMutexLocker -"QMutexPool::get" qmutexpool.html#get -"QMutexPool::~QMutexPool" qmutexpool.html#~QMutexPool +"TQMutex" tqmutex.html +"TQMutex::lock" tqmutex.html#lock +"TQMutex::locked" tqmutex.html#locked +"TQMutex::tryLock" tqmutex.html#tryLock +"TQMutex::unlock" tqmutex.html#unlock +"TQMutex::~TQMutex" tqmutex.html#~TQMutex +"TQMutexLocker" tqmutexlocker.html +"TQMutexLocker::mutex" tqmutexlocker.html#mutex +"TQMutexLocker::~TQMutexLocker" tqmutexlocker.html#~TQMutexLocker +"TQMutexPool::get" tqmutexpool.html#get +"TQMutexPool::~TQMutexPool" tqmutexpool.html#~TQMutexPool "QNPInstance" qnpinstance.html "QNPInstance::InstanceMode" qnpinstance.html#InstanceMode "QNPInstance::Reason" qnpinstance.html#Reason @@ -5186,15 +5186,15 @@ "QScrollView::visibleWidth" ntqscrollview.html#visibleWidth "QScrollView::visibleWidth" ntqscrollview.html#visibleWidth-prop "QScrollView::~QScrollView" ntqscrollview.html#~QScrollView -"QSemaphore" ntqsemaphore.html -"QSemaphore::available" ntqsemaphore.html#available -"QSemaphore::operator++" ntqsemaphore.html#operator++ -"QSemaphore::operator+=" ntqsemaphore.html#operator+-eq -"QSemaphore::operator--" ntqsemaphore.html#operator-- -"QSemaphore::operator-=" ntqsemaphore.html#operator--eq -"QSemaphore::total" ntqsemaphore.html#total -"QSemaphore::tryAccess" ntqsemaphore.html#tryAccess -"QSemaphore::~QSemaphore" ntqsemaphore.html#~QSemaphore +"TQSemaphore" tqsemaphore.html +"TQSemaphore::available" tqsemaphore.html#available +"TQSemaphore::operator++" tqsemaphore.html#operator++ +"TQSemaphore::operator+=" tqsemaphore.html#operator+-eq +"TQSemaphore::operator--" tqsemaphore.html#operator-- +"TQSemaphore::operator-=" tqsemaphore.html#operator--eq +"TQSemaphore::total" tqsemaphore.html#total +"TQSemaphore::tryAccess" tqsemaphore.html#tryAccess +"TQSemaphore::~TQSemaphore" tqsemaphore.html#~TQSemaphore "QServerSocket" ntqserversocket.html "QServerSocket::address" ntqserversocket.html#address "QServerSocket::newConnection" ntqserversocket.html#newConnection @@ -6679,25 +6679,25 @@ "TQTextView::readOnly" tqtextview.html#readOnly-prop "TQTextView::undoDepth" tqtextview.html#undoDepth-prop "TQTextView::undoRedoEnabled" tqtextview.html#undoRedoEnabled-prop -"QThread" ntqthread.html -"QThread::Priority" ntqthread.html#Priority -"QThread::currentThread" ntqthread.html#currentThread -"QThread::exit" ntqthread.html#exit -"QThread::finished" ntqthread.html#finished -"QThread::msleep" ntqthread.html#msleep -"QThread::run" ntqthread.html#run -"QThread::running" ntqthread.html#running -"QThread::sleep" ntqthread.html#sleep -"QThread::start" ntqthread.html#start -"QThread::terminate" ntqthread.html#terminate -"QThread::usleep" ntqthread.html#usleep -"QThread::wait" ntqthread.html#wait -"QThread::~QThread" ntqthread.html#~QThread -"QThreadStorage" ntqthreadstorage.html -"QThreadStorage::hasLocalData" ntqthreadstorage.html#hasLocalData -"QThreadStorage::localData" ntqthreadstorage.html#localData -"QThreadStorage::setLocalData" ntqthreadstorage.html#setLocalData -"QThreadStorage::~QThreadStorage" ntqthreadstorage.html#~QThreadStorage +"TQThread" tqthread.html +"TQThread::Priority" tqthread.html#Priority +"TQThread::currentThread" tqthread.html#currentThread +"TQThread::exit" tqthread.html#exit +"TQThread::finished" tqthread.html#finished +"TQThread::msleep" tqthread.html#msleep +"TQThread::run" tqthread.html#run +"TQThread::running" tqthread.html#running +"TQThread::sleep" tqthread.html#sleep +"TQThread::start" tqthread.html#start +"TQThread::terminate" tqthread.html#terminate +"TQThread::usleep" tqthread.html#usleep +"TQThread::wait" tqthread.html#wait +"TQThread::~TQThread" tqthread.html#~TQThread +"TQThreadStorage" tqthreadstorage.html +"TQThreadStorage::hasLocalData" tqthreadstorage.html#hasLocalData +"TQThreadStorage::localData" tqthreadstorage.html#localData +"TQThreadStorage::setLocalData" tqthreadstorage.html#setLocalData +"TQThreadStorage::~TQThreadStorage" tqthreadstorage.html#~TQThreadStorage "TQTime" tqtime.html "TQTime::addMSecs" tqtime.html#addMSecs "TQTime::addSecs" tqtime.html#addSecs @@ -7249,11 +7249,11 @@ "QWMatrix::shear" ntqwmatrix.html#shear "QWMatrix::transformationMode" ntqwmatrix.html#transformationMode "QWMatrix::translate" ntqwmatrix.html#translate -"QWaitCondition" ntqwaitcondition.html -"QWaitCondition::wait" ntqwaitcondition.html#wait -"QWaitCondition::wakeAll" ntqwaitcondition.html#wakeAll -"QWaitCondition::wakeOne" ntqwaitcondition.html#wakeOne -"QWaitCondition::~QWaitCondition" ntqwaitcondition.html#~QWaitCondition +"TQWaitCondition" tqwaitcondition.html +"TQWaitCondition::wait" tqwaitcondition.html#wait +"TQWaitCondition::wakeAll" tqwaitcondition.html#wakeAll +"TQWaitCondition::wakeOne" tqwaitcondition.html#wakeOne +"TQWaitCondition::~TQWaitCondition" tqwaitcondition.html#~TQWaitCondition "QWhatsThis" ntqwhatsthis.html "QWhatsThis::add" ntqwhatsthis.html#add "QWhatsThis::clicked" ntqwhatsthis.html#clicked diff --git a/doc/html/ntqdeepcopy.html b/doc/html/ntqdeepcopy.html index 2e84c58de..37e76561c 100644 --- a/doc/html/ntqdeepcopy.html +++ b/doc/html/ntqdeepcopy.html @@ -92,24 +92,24 @@ that use shared classes. In the example below, the variable global_stringglobal_string will result in a deep copy.

         TQDeepCopy<TQString> global_string;  // global string data
    -    TQMutex global_mutex;               // mutex to protext global_string
    +    TQMutex global_mutex;               // mutex to protext global_string
     
         ...
     
         void setGlobalString( const TQString &str )
         {
    -        global_mutex.lock();
    +        global_mutex.lock();
             global_string = str;           // global_string is a deep copy of str
    -        global_mutex.unlock();
    +        global_mutex.unlock();
         }
     
         ...
     
         void MyThread::run()
         {
    -        global_mutex.lock();
    +        global_mutex.lock();
             TQString str = global_string;          // str is a deep copy of global_string
    -        global_mutex.unlock();
    +        global_mutex.unlock();
     
             // process the string data
             ...
    diff --git a/doc/html/ntqmutex.html b/doc/html/ntqmutex.html
    deleted file mode 100644
    index a3fa2426f..000000000
    --- a/doc/html/ntqmutex.html
    +++ /dev/null
    @@ -1,195 +0,0 @@
    -
    -
    -
    -
    -
    -TQMutex Class
    -
    -
    -
    -
    -
    -
    -
    -
    - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

    TQMutex Class Reference

    - -

    The TQMutex class provides access serialization between threads. -More... -

    All the functions in this class are thread-safe when TQt is built with thread support.

    -

    #include <ntqmutex.h> -

    List of all member functions. -

    Public Members

    - -

    Detailed Description

    - - - -The TQMutex class provides access serialization between threads. -

    - -

    The purpose of a TQMutex is to protect an object, data structure or -section of code so that only one thread can access it at a time -(This is similar to the Java synchronized keyword). For -example, say there is a method which prints a message to the user -on two lines: -

    -    int number = 6;
    -
    -    void method1()
    -    {
    -        number *= 5;
    -        number /= 4;
    -    }
    -
    -    void method2()
    -    {
    -        number *= 3;
    -        number /= 2;
    -    }
    -    
    - -

    If these two methods are called in succession, the following happens: -

    -    // method1()
    -    number *= 5;        // number is now 30
    -    number /= 4;        // number is now 7
    -
    -    // method2()
    -    number *= 3;        // nubmer is now 21
    -    number /= 2;        // number is now 10
    -    
    - -

    If these two methods are called simultaneously from two threads then the -following sequence could result: -

    -    // Thread 1 calls method1()
    -    number *= 5;        // number is now 30
    -
    -    // Thread 2 calls method2().
    -    //
    -    // Most likely Thread 1 has been put to sleep by the operating
    -    // system to allow Thread 2 to run.
    -    number *= 3;        // number is now 90
    -    number /= 2;        // number is now 45
    -
    -    // Thread 1 finishes executing.
    -    number /= 4;        // number is now 11, instead of 10
    -    
    - -

    If we add a mutex, we should get the result we want: -

    -    TQMutex mutex;
    -    int number = 6;
    -
    -    void method1()
    -    {
    -        mutex.lock();
    -        number *= 5;
    -        number /= 4;
    -        mutex.unlock();
    -    }
    -
    -    void method2()
    -    {
    -        mutex.lock();
    -        number *= 3;
    -        number /= 2;
    -        mutex.unlock();
    -    }
    -    
    - -

    Then only one thread can modify number at any given time and -the result is correct. This is a trivial example, of course, but -applies to any other case where things need to happen in a -particular sequence. -

    When you call lock() in a thread, other threads that try to call -lock() in the same place will block until the thread that got the -lock calls unlock(). A non-blocking alternative to lock() is -tryLock(). -

    See also Environment Classes and Threading. - -


    Member Function Documentation

    -

    TQMutex::TQMutex ( bool recursive = FALSE ) -

    -Constructs a new mutex. The mutex is created in an unlocked state. -A recursive mutex is created if recursive is TRUE; a normal -mutex is created if recursive is FALSE (the default). With a -recursive mutex, a thread can lock the same mutex multiple times -and it will not be unlocked until a corresponding number of -unlock() calls have been made. - -

    TQMutex::~TQMutex () [virtual] -

    -Destroys the mutex. -

    Warning: If you destroy a mutex that still holds a lock the -resultant behavior is undefined. - -

    void TQMutex::lock () -

    -Attempt to lock the mutex. If another thread has locked the mutex -then this call will block until that thread has unlocked it. -

    See also unlock() and locked(). - -

    bool TQMutex::locked () -

    -Returns TRUE if the mutex is locked by another thread; otherwise -returns FALSE. -

    Warning: Due to differing implementations of recursive mutexes on -various platforms, calling this function from the same thread that -previously locked the mutex will return undefined results. -

    See also lock() and unlock(). - -

    bool TQMutex::tryLock () -

    -Attempt to lock the mutex. If the lock was obtained, this function -returns TRUE. If another thread has locked the mutex, this -function returns FALSE, instead of waiting for the mutex to become -available, i.e. it does not block. -

    If the lock was obtained, the mutex must be unlocked with unlock() -before another thread can successfully lock it. -

    See also lock(), unlock(), and locked(). - -

    void TQMutex::unlock () -

    -Unlocks the mutex. Attempting to unlock a mutex in a different -thread to the one that locked it results in an error. Unlocking a -mutex that is not locked results in undefined behaviour (varies -between different Operating Systems' thread implementations). -

    See also lock() and locked(). - - -


    -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


    - -
    Copyright © 2007 -TrolltechTrademarks -
    TQt 3.3.8
    -
    - diff --git a/doc/html/ntqregexp.html b/doc/html/ntqregexp.html index 6bfdc27bb..f75a27a82 100644 --- a/doc/html/ntqregexp.html +++ b/doc/html/ntqregexp.html @@ -112,8 +112,8 @@ similar way to command shells. A good text on regexps is Mastering Regular E

    Experienced regexp users may prefer to skip the introduction and go directly to the relevant information.

    In case of multi-threaded programming, note that TQRegExp depends on -TQThreadStorage internally. For that reason, TQRegExp should only be -used with threads started with TQThread, i.e. not with threads +TQThreadStorage internally. For that reason, TQRegExp should only be +used with threads started with TQThread, i.e. not with threads started with platform-specific APIs.

      diff --git a/doc/html/ntqsemaphore.html b/doc/html/ntqsemaphore.html deleted file mode 100644 index b51410c9c..000000000 --- a/doc/html/ntqsemaphore.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - -TQSemaphore Class - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      TQSemaphore Class Reference

      - -

      The TQSemaphore class provides a robust integer semaphore. -More... -

      All the functions in this class are thread-safe when TQt is built with thread support.

      -

      #include <ntqsemaphore.h> -

      List of all member functions. -

      Public Members

      - -

      Detailed Description

      - - - -The TQSemaphore class provides a robust integer semaphore. -

      - -

      A TQSemaphore can be used to serialize thread execution, in a -similar way to a TQMutex. A semaphore differs from a mutex, in -that a semaphore can be accessed by more than one thread at a -time. -

      For example, suppose we have an application that stores data in a -large tree structure. The application creates 10 threads -(commonly called a thread pool) to perform searches on the tree. -When the application searches the tree for some piece of data, it -uses one thread per base node to do the searching. A semaphore -could be used to make sure that two threads don't try to search -the same branch of the tree at the same time. -

      A non-computing example of a semaphore would be dining at a -restuarant. A semaphore is initialized to have a maximum count -equal to the number of chairs in the restuarant. As people -arrive, they want a seat. As seats are filled, the semaphore is -accessed, once per person. As people leave, the access is -released, allowing more people to enter. If a party of 10 people -want to be seated, but there are only 9 seats, those 10 people -will wait, but a party of 4 people would be seated (taking the -available seats to 5, making the party of 10 people wait longer). -

      When a semaphore is created it is given a number which is the -maximum number of concurrent accesses it will permit. Accesses to -the sempahore are gained using operator++() or operator+=(), and -released with operator--() or operator-=(). The number of -accesses allowed is retrieved with available(), and the total -number with total(). Note that the incrementing functions will -block if there aren't enough available accesses. Use tryAccess() -if you want to acquire accesses without blocking. -

      See also Environment Classes and Threading. - -


      Member Function Documentation

      -

      TQSemaphore::TQSemaphore ( int maxcount ) -

      -Creates a new semaphore. The semaphore can be concurrently -accessed at most maxcount times. - -

      TQSemaphore::~TQSemaphore () [virtual] -

      -Destroys the semaphore. -

      Warning: If you destroy a semaphore that has accesses in use the -resultant behavior is undefined. - -

      int TQSemaphore::available () const -

      -Returns the number of accesses currently available to the -semaphore. - -

      int TQSemaphore::operator++ ( int ) -

      -Postfix ++ operator. -

      Try to get access to the semaphore. If available() == 0, this -call will block until it can get access, i.e. until available() > -0. - -

      int TQSemaphore::operator+= ( int n ) -

      -Try to get access to the semaphore. If available() < n, this -call will block until it can get all the accesses it wants, i.e. -until available() >= n. - -

      int TQSemaphore::operator-- ( int ) -

      -Postfix -- operator. -

      Release access of the semaphore. This wakes all threads waiting -for access to the semaphore. - -

      int TQSemaphore::operator-= ( int n ) -

      -Release n accesses to the semaphore. - -

      int TQSemaphore::total () const -

      -Returns the total number of accesses to the semaphore. - -

      bool TQSemaphore::tryAccess ( int n ) -

      -Try to get access to the semaphore. If available() < n, this -function will return FALSE immediately. If available() >= n, -this function will take n accesses and return TRUE. This -function does not block. - - -

      -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


      - -
      Copyright © 2007 -TrolltechTrademarks -
      TQt 3.3.8
      -
      - diff --git a/doc/html/ntqt.html b/doc/html/ntqt.html index 0785cd686..3c4dcc93c 100644 --- a/doc/html/ntqt.html +++ b/doc/html/ntqt.html @@ -35,7 +35,7 @@ body { background: #ffffff; color: black; } that need to be global-like. More...

      #include <ntqnamespace.h> -

      Inherited by TQObject, TQPixmap, TQBrush, TQCanvasItem, TQCursor, TQPainter, TQEvent, TQIconViewItem, TQKeySequence, TQListViewItem, TQCustomMenuItem, TQPen, TQStyleSheetItem, TQSyntaxHighlighter, TQTab, TQTableItem, TQThread, TQToolTip, and TQWhatsThis. +

      Inherited by TQObject, TQPixmap, TQBrush, TQCanvasItem, TQCursor, TQPainter, TQEvent, TQIconViewItem, TQKeySequence, TQListViewItem, TQCustomMenuItem, TQPen, TQStyleSheetItem, TQSyntaxHighlighter, TQTab, TQTableItem, TQThread, TQToolTip, and TQWhatsThis.

      List of all member functions.

      Public Members

        diff --git a/doc/html/ntqthread.html b/doc/html/ntqthread.html deleted file mode 100644 index edd77b60b..000000000 --- a/doc/html/ntqthread.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - -TQThread Class - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        TQThread Class Reference

        - -

        The TQThread class provides platform-independent threads. -More... -

        All the functions in this class are thread-safe when TQt is built with thread support.

        -

        #include <ntqthread.h> -

        Inherits TQt. -

        List of all member functions. -

        Public Members

        -
          -
        • TQThread ( unsigned int stackSize = 0 )
        • -
        • virtual ~TQThread ()
        • -
        • bool wait ( unsigned long time = ULONG_MAX )
        • -
        • enum Priority { IdlePriority, LowestPriority, LowPriority, NormalPriority, HighPriority, HighestPriority, TimeCriticalPriority, InheritPriority }
        • -
        • void start ( Priority priority = InheritPriority )
        • -
        • void terminate ()
        • -
        • bool finished () const
        • -
        • bool running () const
        • -
        -

        Static Public Members

        - -

        Protected Members

        -
          -
        • virtual void run () = 0
        • -
        -

        Static Protected Members

        -
          -
        • void sleep ( unsigned long secs )
        • -
        • void msleep ( unsigned long msecs )
        • -
        • void usleep ( unsigned long usecs )
        • -
        -

        Detailed Description

        - - - -The TQThread class provides platform-independent threads. -

        - -

        A TQThread represents a separate thread of control within the -program; it shares data with all the other threads within the -process but executes independently in the way that a separate -program does on a multitasking operating system. Instead of -starting in main(), TQThreads begin executing in run(). You inherit -run() to include your code. For example: -

        -    class MyThread : public TQThread {
        -
        -    public:
        -
        -        virtual void run();
        -
        -    };
        -
        -    void MyThread::run()
        -    {
        -        for( int count = 0; count < 20; count++ ) {
        -            sleep( 1 );
        -            tqDebug( "Ping!" );
        -        }
        -    }
        -
        -    int main()
        -    {
        -        MyThread a;
        -        MyThread b;
        -        a.start();
        -        b.start();
        -        a.wait();
        -        b.wait();
        -    }
        -    
        - -

        This will start two threads, each of which writes Ping! 20 times -to the screen and exits. The wait() calls at the end of main() are -necessary because exiting main() ends the program, unceremoniously -killing all other threads. Each MyThread stops executing when it -reaches the end of MyThread::run(), just as an application does -when it leaves main(). -

        See also Thread Support in TQt, Environment Classes, and Threading. - -


        Member Type Documentation

        -

        TQThread::Priority

        - -

        This enum type indicates how the operating system should schedule -newly created threads. -

          -
        • TQThread::IdlePriority - scheduled only when no other threads are -running. -
        • TQThread::LowestPriority - scheduled less often than LowPriority. -
        • TQThread::LowPriority - scheduled less often than NormalPriority. -
        • TQThread::NormalPriority - the default priority of the operating -system. -
        • TQThread::HighPriority - scheduled more often than NormalPriority. -
        • TQThread::HighestPriority - scheduled more often then HighPriority. -
        • TQThread::TimeCriticalPriority - scheduled as often as possible. -
        • TQThread::InheritPriority - use the same priority as the creating -thread. This is the default. -
        -

        Member Function Documentation

        -

        TQThread::TQThread ( unsigned int stackSize = 0 ) -

        -Constructs a new thread. The thread does not begin executing until -start() is called. -

        If stackSize is greater than zero, the maximum stack size is -set to stackSize bytes, otherwise the maximum stack size is -automatically determined by the operating system. -

        Warning: Most operating systems place minimum and maximum limits -on thread stack sizes. The thread will fail to start if the stack -size is outside these limits. - -

        TQThread::~TQThread () [virtual] -

        -TQThread destructor. -

        Note that deleting a TQThread object will not stop the execution of -the thread it represents. Deleting a running TQThread (i.e. -finished() returns FALSE) will probably result in a program crash. -You can wait() on a thread to make sure that it has finished. - -

        TQt::HANDLE TQThread::currentThread () [static] -

        -This returns the thread handle of the currently executing thread. -

        Warning: The handle returned by this function is used for internal -purposes and should not be used in any application code. On -Windows, the returned value is a pseudo handle for the current -thread, and it cannot be used for numerical comparison. - -

        void TQThread::exit () [static] -

        -Ends the execution of the calling thread and wakes up any threads -waiting for its termination. - -

        bool TQThread::finished () const -

        -Returns TRUE if the thread is finished; otherwise returns FALSE. - -

        void TQThread::msleep ( unsigned long msecs ) [static protected] -

        -System independent sleep. This causes the current thread to sleep -for msecs milliseconds - -

        void TQThread::run () [pure virtual protected] -

        - -

        This method is pure virtual, and must be implemented in derived -classes in order to do useful work. Returning from this method -will end the execution of the thread. -

        See also wait(). - -

        bool TQThread::running () const -

        -Returns TRUE if the thread is running; otherwise returns FALSE. - -

        void TQThread::sleep ( unsigned long secs ) [static protected] -

        -System independent sleep. This causes the current thread to sleep -for secs seconds. - -

        void TQThread::start ( Priority priority = InheritPriority ) -

        -Begins execution of the thread by calling run(), which should be -reimplemented in a TQThread subclass to contain your code. The -operating system will schedule the thread according to the priority argument. -

        If you try to start a thread that is already running, this -function will wait until the the thread has finished and then -restart the thread. -

        See also Priority. - -

        void TQThread::terminate () -

        -This function terminates the execution of the thread. The thread -may or may not be terminated immediately, depending on the -operating system's scheduling policies. Use TQThread::wait() -after terminate() for synchronous termination. -

        When the thread is terminated, all threads waiting for the -the thread to finish will be woken up. -

        Warning: This function is dangerous, and its use is discouraged. -The thread can be terminated at any point in its code path. Threads -can be terminated while modifying data. There is no chance for -the thread to cleanup after itself, unlock any held mutexes, etc. -In short, use this function only if absolutely necessary. - -

        void TQThread::usleep ( unsigned long usecs ) [static protected] -

        -System independent sleep. This causes the current thread to sleep -for usecs microseconds - -

        bool TQThread::wait ( unsigned long time = ULONG_MAX ) -

        -A thread calling this function will block until either of these -conditions is met: -

          -
        • The thread associated with this TQThread object has finished -execution (i.e. when it returns from run()). This function -will return TRUE if the thread has finished. It also returns -TRUE if the thread has not been started yet. -
        • time milliseconds has elapsed. If time is ULONG_MAX (the -default), then the wait will never timeout (the thread must -return from run()). This function will return FALSE if the -wait timed out. -
        -

        This provides similar functionality to the POSIX pthread_join() function. - - -


        -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/ntqthreadstorage.html b/doc/html/ntqthreadstorage.html deleted file mode 100644 index c18111bd1..000000000 --- a/doc/html/ntqthreadstorage.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - -TQThreadStorage Class - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        TQThreadStorage Class Reference

        - -

        The TQThreadStorage class provides per-thread data storage. -More... -

        All the functions in this class are thread-safe when TQt is built with thread support.

        -

        #include <ntqthreadstorage.h> -

        List of all member functions. -

        Public Members

        - -

        Detailed Description

        - - -The TQThreadStorage class provides per-thread data storage. -

        - - -

        TQThreadStorage is a template class that provides per-thread data -storage. -

        Note that due to compiler limitations, TQThreadStorage can only store pointers. -

        The setLocalData() function stores a single thread-specific value -for the calling thread. The data can be accessed later using the -localData() functions. TQThreadStorage takes ownership of the -data (which must be created on the heap with new) and deletes -it when the thread exits (either normally or via termination). -

        The hasLocalData() function allows the programmer to determine if -data has previously been set using the setLocalData() function. -This is useful for lazy initializiation. -

        For example, the following code uses TQThreadStorage to store a -single cache for each thread that calls the cacheObject() and -removeFromCache() functions. The cache is automatically -deleted when the calling thread exits (either normally or via -termination). -

        -    TQThreadStorage<TQCache<SomeClass> *> caches;
        -
        -    void cacheObject( const TQString &key, SomeClass *object )
        -    {
        -        if ( ! caches.hasLocalData() )
        -            caches.setLocalData( new TQCache<SomeClass> );
        -
        -        caches.localData()->insert( key, object );
        -    }
        -
        -    void removeFromCache( const TQString &key )
        -    {
        -        if ( ! caches.hasLocalData() )
        -            return; // nothing to do
        -
        -        caches.localData()->remove( key );
        -    }
        -    
        - -

        Caveats -

        -

          -

        • As noted above, TQThreadStorage can only store pointers due to -compiler limitations. Support for value-based objects will be -added when the majority of compilers are able to support partial -template specialization. -

        • The destructor does not -delete per-thread data. TQThreadStorage only deletes per-thread -data when the thread exits or when setLocalData() is called -multiple times. -

        • TQThreadStorage can only be used with threads started with -TQThread. It cannot be used with threads started with -platform-specific APIs. -

        • As a corollary to the above, platform-specific APIs cannot be -used to exit or terminate a TQThread using TQThreadStorage. Doing so -will cause all per-thread data to be leaked. See TQThread::exit() -and TQThread::terminate(). -

        • TQThreadStorage can be used to store data for the main() -thread after TQApplication has been constructed. TQThreadStorage -deletes all data set for the main() thread when TQApplication is -destroyed, regardless of whether or not the main() thread has -actually finished. -

        • The implementation of TQThreadStorage limits the total number of -TQThreadStorage objects to 256. An unlimited number of threads -can store per-thread data in each TQThreadStorage object. -

        -

        See also Environment Classes and Threading. - -


        Member Function Documentation

        -

        TQThreadStorage::TQThreadStorage () -

        - -

        Constructs a new per-thread data storage object. - -

        TQThreadStorage::~TQThreadStorage () -

        - -

        Destroys the per-thread data storage object. -

        Note: The per-thread data stored is not deleted. Any data left -in TQThreadStorage is leaked. Make sure that all threads using -TQThreadStorage have exited before deleting the TQThreadStorage. -

        See also hasLocalData(). - -

        bool TQThreadStorage::hasLocalData () const -

        - -

        Returns TRUE if the calling thread has non-zero data available; -otherwise returns FALSE. -

        See also localData(). - -

        T & TQThreadStorage::localData () -

        - -

        Returns a reference to the data that was set by the calling -thread. -

        Note: TQThreadStorage can only store pointers. This function -returns a reference to the pointer that was set by the calling -thread. The value of this reference is 0 if no data was set by -the calling thread, -

        See also hasLocalData(). - -

        T TQThreadStorage::localData () const -

        - -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

        Returns a copy of the data that was set by the calling thread. -

        Note: TQThreadStorage can only store pointers. This function -returns a pointer to the data that was set by the calling thread. -If no data was set by the calling thread, this function returns 0. -

        See also hasLocalData(). - -

        void TQThreadStorage::setLocalData ( T data ) -

        - -

        Sets the local data for the calling thread to data. It can be -accessed later using the localData() functions. -

        If data is 0, this function deletes the previous data (if -any) and returns immediately. -

        If data is non-zero, TQThreadStorage takes ownership of the data and deletes it automatically either when the thread exits -(either normally or via termination) or when setLocalData() is -called again. -

        Note: TQThreadStorage can only store pointers. The data -argument must be either a pointer to an object created on the heap -(i.e. using new) or 0. You should not delete data -yourself; TQThreadStorage takes ownership and will delete the data itself. -

        See also localData() and hasLocalData(). - - -


        -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/ntqwaitcondition.html b/doc/html/ntqwaitcondition.html deleted file mode 100644 index c497b58a2..000000000 --- a/doc/html/ntqwaitcondition.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - -TQWaitCondition Class - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        TQWaitCondition Class Reference

        - -

        The TQWaitCondition class allows waiting/waking for conditions between threads. -More... -

        All the functions in this class are thread-safe when TQt is built with thread support.

        -

        #include <ntqwaitcondition.h> -

        List of all member functions. -

        Public Members

        - -

        Detailed Description

        - - - -The TQWaitCondition class allows waiting/waking for conditions between threads. -

        - -

        TQWaitConditions allow a thread to tell other threads that some -sort of condition has been met; one or many threads can block -waiting for a TQWaitCondition to set a condition with wakeOne() or -wakeAll(). Use wakeOne() to wake one randomly selected event or -wakeAll() to wake them all. For example, say we have three tasks -that should be performed every time the user presses a key; each -task could be split into a thread, each of which would have a -run() body like this: -

        -    TQWaitCondition key_pressed;
        -
        -    for (;;) {
        -        key_pressed.wait(); // This is a TQWaitCondition global variable
        -        // Key was pressed, do something interesting
        -        do_something();
        -    }
        -    
        - -

        A fourth thread would read key presses and wake the other three -threads up every time it receives one, like this: -

        -    TQWaitCondition key_pressed;
        -
        -    for (;;) {
        -        getchar();
        -        // Causes any thread in key_pressed.wait() to return from
        -        // that method and continue processing
        -        key_pressed.wakeAll();
        -    }
        -    
        - -

        Note that the order the three threads are woken up in is -undefined, and that if some or all of the threads are still in -do_something() when the key is pressed, they won't be woken up -(since they're not waiting on the condition variable) and so the -task will not be performed for that key press. This can be -avoided by, for example, doing something like this: -

        -    TQMutex mymutex;
        -    TQWaitCondition key_pressed;
        -    int mycount=0;
        -
        -    // Worker thread code
        -    for (;;) {
        -        key_pressed.wait(); // This is a TQWaitCondition global variable
        -        mymutex.lock();
        -        mycount++;
        -        mymutex.unlock();
        -        do_something();
        -        mymutex.lock();
        -        mycount--;
        -        mymutex.unlock();
        -    }
        -
        -    // Key reading thread code
        -    for (;;) {
        -        getchar();
        -        mymutex.lock();
        -        // Sleep until there are no busy worker threads
        -        while( mycount > 0 ) {
        -            mymutex.unlock();
        -            sleep( 1 );
        -            mymutex.lock();
        -        }
        -        mymutex.unlock();
        -        key_pressed.wakeAll();
        -    }
        -    
        - -

        The mutexes are necessary because the results of two threads -attempting to change the value of the same variable simultaneously -are unpredictable. -

        See also Environment Classes and Threading. - -


        Member Function Documentation

        -

        TQWaitCondition::TQWaitCondition () -

        -Constructs a new event signalling, i.e. wait condition, object. - -

        TQWaitCondition::~TQWaitCondition () [virtual] -

        -Deletes the event signalling, i.e. wait condition, object. - -

        bool TQWaitCondition::wait ( unsigned long time = ULONG_MAX ) -

        -Wait on the thread event object. The thread calling this will -block until either of these conditions is met: -
          -
        • Another thread signals it using wakeOne() or wakeAll(). This -function will return TRUE in this case. -
        • time milliseconds has elapsed. If time is ULONG_MAX (the -default), then the wait will never timeout (the event must be -signalled). This function will return FALSE if the wait timed -out. -
        -

        See also wakeOne() and wakeAll(). - -

        bool TQWaitCondition::wait ( TQMutex * mutex, unsigned long time = ULONG_MAX ) -

        -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

        Release the locked mutex and wait on the thread event object. -The mutex must be initially locked by the calling thread. If mutex is not in a locked state, this function returns immediately. -If mutex is a recursive mutex, this function returns -immediately. The mutex will be unlocked, and the calling thread -will block until either of these conditions is met: -

          -
        • Another thread signals it using wakeOne() or wakeAll(). This -function will return TRUE in this case. -
        • time milliseconds has elapsed. If time is ULONG_MAX (the -default), then the wait will never timeout (the event must be -signalled). This function will return FALSE if the wait timed -out. -
        -

        The mutex will be returned to the same locked state. This function -is provided to allow the atomic transition from the locked state -to the wait state. -

        See also wakeOne() and wakeAll(). - -

        void TQWaitCondition::wakeAll () -

        -This wakes all threads waiting on the TQWaitCondition. The order in -which the threads are woken up depends on the operating system's -scheduling policies, and cannot be controlled or predicted. -

        See also wakeOne(). - -

        void TQWaitCondition::wakeOne () -

        -This wakes one thread waiting on the TQWaitCondition. The thread -that is woken up depends on the operating system's scheduling -policies, and cannot be controlled or predicted. -

        See also wakeAll(). - - -


        -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/qmutex-h.html b/doc/html/qmutex-h.html deleted file mode 100644 index 8f9eba58e..000000000 --- a/doc/html/qmutex-h.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - -ntqmutex.h Include File - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        ntqmutex.h

        - -

        This is the verbatim text of the ntqmutex.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


        -
        -/****************************************************************************
        -** $Id: qt/ntqmutex.h   3.3.8   edited Jan 11 14:38 $
        -**
        -** Definition of TQMutex class
        -**
        -** Created : 931107
        -**
        -** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
        -**
        -** This file is part of the tools module of the TQt GUI Toolkit.
        -**
        -** This file may be used under the terms of the GNU General Public
        -** License versions 2.0 or 3.0 as published by the Free Software
        -** Foundation and appearing in the file LICENSE.GPL included in the
        -** packaging of this file. Alternatively you may (at your option) use any
        -** later version of the GNU General Public License if such license has
        -** been publicly approved by Trolltech ASA (or its successors, if any)
        -** and the KDE Free TQt Foundation.
        -**
        -** Please review the following information to ensure GNU General
        -** Public Licensing requirements will be met:
        -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        -** If you are unsure which license is appropriate for your use, please
        -** review the following information:
        -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        -** or contact the sales department at sales@trolltech.com.
        -**
        -** This file may be used under the terms of the Q Public License as
        -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        -** included in the packaging of this file.  Licensees holding valid TQt
        -** Commercial licenses may use this file in accordance with the TQt
        -** Commercial License Agreement provided with the Software.
        -**
        -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        -** herein.
        -**
        -**********************************************************************/
        -
        -#ifndef TQMUTEX_H
        -#define TQMUTEX_H
        -
        -#ifndef QT_H
        -#include "ntqglobal.h"
        -#endif // QT_H
        -
        -#if defined(TQT_THREAD_SUPPORT)
        -
        -class TQMutexPrivate;
        -
        -const int Q_MUTEX_NORMAL = 0;
        -const int Q_MUTEX_RECURSIVE = 1;
        -
        -class TQ_EXPORT TQMutex
        -{
        -    friend class TQThread;
        -    friend class TQWaitCondition;
        -    friend class TQWaitConditionPrivate;
        -
        -public:
        -    TQMutex(bool recursive = FALSE);
        -    virtual ~TQMutex();
        -
        -    void lock();
        -    void unlock();
        -    bool locked();
        -    bool tryLock();
        -
        -private:
        -    TQMutexPrivate * d;
        -
        -#if defined(TQ_DISABLE_COPY)
        -    TQMutex( const TQMutex & );
        -    TQMutex &operator=( const TQMutex & );
        -#endif
        -};
        -
        -class TQ_EXPORT TQMutexLocker
        -{
        -public:
        -    TQMutexLocker( TQMutex * );
        -    ~TQMutexLocker();
        -
        -    TQMutex *mutex() const;
        -
        -private:
        -    TQMutex *mtx;
        -
        -#if defined(TQ_DISABLE_COPY)
        -    TQMutexLocker( const TQMutexLocker & );
        -    TQMutexLocker &operator=( const TQMutexLocker & );
        -#endif
        -};
        -
        -inline TQMutexLocker::TQMutexLocker( TQMutex *m )
        -    : mtx( m )
        -{
        -    if ( mtx ) mtx->lock();
        -}
        -
        -inline TQMutexLocker::~TQMutexLocker()
        -{
        -    if ( mtx ) mtx->unlock();
        -}
        -
        -inline TQMutex *TQMutexLocker::mutex() const
        -{
        -    return mtx;
        -}
        -
        -#endif
        -
        -#endif
        -
        - -


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/qmutex-members.html b/doc/html/qmutex-members.html deleted file mode 100644 index 9c7933d93..000000000 --- a/doc/html/qmutex-members.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - -TQMutex Member List - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        Complete Member List for TQMutex

        - -

        This is the complete list of member functions for -TQMutex, including inherited members. - -

        - -


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/qmutexlocker-members.html b/doc/html/qmutexlocker-members.html deleted file mode 100644 index 236d9586f..000000000 --- a/doc/html/qmutexlocker-members.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - -TQMutexLocker Member List - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        Complete Member List for TQMutexLocker

        - -

        This is the complete list of member functions for -TQMutexLocker, including inherited members. - -

        - -


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/qmutexlocker.html b/doc/html/qmutexlocker.html deleted file mode 100644 index d14309c36..000000000 --- a/doc/html/qmutexlocker.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - -TQMutexLocker Class - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        TQMutexLocker Class Reference

        - -

        The TQMutexLocker class simplifies locking and unlocking TQMutexes. -More... -

        All the functions in this class are thread-safe when TQt is built with thread support.

        -

        #include <ntqmutex.h> -

        List of all member functions. -

        Public Members

        - -

        Detailed Description

        - - -The TQMutexLocker class simplifies locking and unlocking TQMutexes. -

        -

        - -

        The purpose of TQMutexLocker is to simplify TQMutex locking and -unlocking. Locking and unlocking a TQMutex in complex functions and -statements or in exception handling code is error prone and -difficult to debug. TQMutexLocker should be used in such situations -to ensure that the state of the mutex is well defined and always -locked and unlocked properly. -

        TQMutexLocker should be created within a function where a TQMutex -needs to be locked. The mutex is locked when TQMutexLocker is -created, and unlocked when TQMutexLocker is destroyed. -

        For example, this complex function locks a TQMutex upon entering -the function and unlocks the mutex at all the exit points: -

        -    int complexFunction( int flag )
        -    {
        -        mutex.lock();
        -
        -        int return_value = 0;
        -
        -        switch ( flag ) {
        -        case 0:
        -        case 1:
        -            {
        -                mutex.unlock();
        -                return moreComplexFunction( flag );
        -            }
        -
        -        case 2:
        -            {
        -                int status = anotherFunction();
        -                if ( status < 0 ) {
        -                    mutex.unlock();
        -                    return -2;
        -                }
        -                return_value = status + flag;
        -                break;
        -            }
        -
        -        default:
        -            {
        -                if ( flag > 10 ) {
        -                    mutex.unlock();
        -                    return -1;
        -                }
        -                break;
        -            }
        -        }
        -
        -        mutex.unlock();
        -        return return_value;
        -    }
        -    
        - -

        This example function will get more complicated as it is -developed, which increases the likelihood that errors will occur. -

        Using TQMutexLocker greatly simplifies the code, and makes it more -readable: -

        -    int complexFunction( int flag )
        -    {
        -        TQMutexLocker locker( &mutex );
        -
        -        int return_value = 0;
        -
        -        switch ( flag ) {
        -        case 0:
        -        case 1:
        -            {
        -                return moreComplexFunction( flag );
        -            }
        -
        -        case 2:
        -            {
        -                int status = anotherFunction();
        -                if ( status < 0 )
        -                    return -2;
        -                return_value = status + flag;
        -                break;
        -            }
        -
        -        default:
        -            {
        -                if ( flag > 10 )
        -                    return -1;
        -                break;
        -            }
        -        }
        -
        -        return return_value;
        -    }
        -    
        - -

        Now, the mutex will always be unlocked when the TQMutexLocker -object is destroyed (when the function returns since locker is -an auto variable). Note that the mutex will be unlocked after -the call to moreComplexFunction() in this example, avoiding -possible bugs caused by unlocking the mutex too early, as in -the first example. -

        The same principle applies to code that throws and catches -exceptions. An exception that is not caught in the function that -has locked the mutex has no way of unlocking the mutex before the -exception is passed up the stack to the calling function. -

        TQMutexLocker also provides a mutex() member function that returns -the mutex on which the TQMutexLocker is operating. This is useful -for code that needs access to the mutex, such as -TQWaitCondition::wait(). For example: -

        -    class SignalWaiter
        -    {
        -    private:
        -        TQMutexLocker locker;
        -
        -    public:
        -        SignalWaiter( TQMutex *mutex )
        -            : locker( mutex )
        -        {
        -        }
        -
        -        void waitForSignal()
        -        {
        -            ...
        -            ...
        -            ...
        -
        -            while ( ! signalled )
        -                waitcondition.wait( locker.mutex() );
        -
        -            ...
        -            ...
        -            ...
        -        }
        -    };
        -    
        - -

        See also TQMutex, TQWaitCondition, Environment Classes, and Threading. - -


        Member Function Documentation

        -

        TQMutexLocker::TQMutexLocker ( TQMutex * mutex ) -

        - -

        Constructs a TQMutexLocker and locks mutex. The mutex will be -unlocked when the TQMutexLocker is destroyed. If mutex is zero, -TQMutexLocker does nothing. -

        See also TQMutex::lock(). - -

        TQMutexLocker::~TQMutexLocker () -

        - -

        Destroys the TQMutexLocker and unlocks the mutex which was locked -in the constructor. -

        See also TQMutexLocker::TQMutexLocker() and TQMutex::unlock(). - -

        TQMutex * TQMutexLocker::mutex () const -

        - -

        Returns a pointer to the mutex which was locked in the -constructor. -

        See also TQMutexLocker::TQMutexLocker(). - - -


        -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/qsemaphore-h.html b/doc/html/qsemaphore-h.html deleted file mode 100644 index a80c1de15..000000000 --- a/doc/html/qsemaphore-h.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - -ntqsemaphore.h Include File - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        ntqsemaphore.h

        - -

        This is the verbatim text of the ntqsemaphore.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


        -
        -/****************************************************************************
        -** $Id: qt/ntqsemaphore.h   3.3.8   edited Jan 11 14:38 $
        -**
        -** Definition of TQSemaphore class
        -**
        -** Created : 931107
        -**
        -** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
        -**
        -** This file is part of the tools module of the TQt GUI Toolkit.
        -**
        -** This file may be used under the terms of the GNU General Public
        -** License versions 2.0 or 3.0 as published by the Free Software
        -** Foundation and appearing in the file LICENSE.GPL included in the
        -** packaging of this file. Alternatively you may (at your option) use any
        -** later version of the GNU General Public License if such license has
        -** been publicly approved by Trolltech ASA (or its successors, if any)
        -** and the KDE Free TQt Foundation.
        -**
        -** Please review the following information to ensure GNU General
        -** Public Licensing requirements will be met:
        -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        -** If you are unsure which license is appropriate for your use, please
        -** review the following information:
        -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        -** or contact the sales department at sales@trolltech.com.
        -**
        -** This file may be used under the terms of the Q Public License as
        -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        -** included in the packaging of this file.  Licensees holding valid TQt
        -** Commercial licenses may use this file in accordance with the TQt
        -** Commercial License Agreement provided with the Software.
        -**
        -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        -** herein.
        -**
        -**********************************************************************/
        -
        -#ifndef TQSEMAPHORE_H
        -#define TQSEMAPHORE_H
        -
        -#ifndef QT_H
        -#include "ntqglobal.h"
        -#endif // QT_H
        -
        -#if defined(TQT_THREAD_SUPPORT)
        -
        -class TQSemaphorePrivate;
        -
        -class TQ_EXPORT TQSemaphore
        -{
        -public:
        -    TQSemaphore( int );
        -    virtual ~TQSemaphore();
        -
        -    int available() const;
        -    int total() const;
        -
        -    // postfix operators
        -    int operator++(int);
        -    int operator--(int);
        -
        -    int operator+=(int);
        -    int operator-=(int);
        -
        -    bool tryAccess(int);
        -
        -private:
        -    TQSemaphorePrivate *d;
        -
        -#if defined(TQ_DISABLE_COPY)
        -    TQSemaphore(const TQSemaphore &);
        -    TQSemaphore &operator=(const TQSemaphore &);
        -#endif
        -};
        -
        -#endif
        -
        -#endif
        -
        - -


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/qsemaphore-members.html b/doc/html/qsemaphore-members.html deleted file mode 100644 index 107cb075b..000000000 --- a/doc/html/qsemaphore-members.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - -TQSemaphore Member List - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        Complete Member List for TQSemaphore

        - -

        This is the complete list of member functions for -TQSemaphore, including inherited members. - -

        - -


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/qt.dcf b/doc/html/qt.dcf index f6467727b..f46eb88b9 100644 --- a/doc/html/qt.dcf +++ b/doc/html/qt.dcf @@ -4835,22 +4835,22 @@
        -
        - QMutex - lock - locked - tryLock - unlock - ~QMutex -
        -
        -
        -
        - QMutexLocker - mutex - ~QMutexLocker -
        -
        +
        + TQMutex + lock + locked + tryLock + unlock + ~TQMutex +
        +
        +
        +
        + TQMutexLocker + mutex + ~TQMutexLocker +
        +
        QNetworkOperation @@ -6100,18 +6100,18 @@
        -
        - QSemaphore - available - operator++ - operator+= - operator-- - operator-= - total - tryAccess - ~QSemaphore -
        -
        +
        + TQSemaphore + available + operator++ + operator+= + operator-- + operator-= + total + tryAccess + ~TQSemaphore +
        +
        QServerSocket @@ -7909,32 +7909,32 @@
        -
        - QThread - Priority - currentThread - exit - finished - msleep - run - running - sleep - start - terminate - usleep - wait - ~QThread -
        -
        -
        -
        - QThreadStorage - hasLocalData - localData - setLocalData - ~QThreadStorage -
        -
        +
        + TQThread + Priority + currentThread + exit + finished + msleep + run + running + sleep + start + terminate + usleep + wait + ~TQThread +
        +
        +
        +
        + TQThreadStorage + hasLocalData + localData + setLocalData + ~TQThreadStorage +
        +
        TQTime @@ -8578,14 +8578,14 @@
        -
        - QWaitCondition - wait - wakeAll - wakeOne - ~QWaitCondition -
        -
        +
        + TQWaitCondition + wait + wakeAll + wakeOne + ~TQWaitCondition +
        +
        QWhatsThis diff --git a/doc/html/qthread-h.html b/doc/html/qthread-h.html deleted file mode 100644 index cbde3d13e..000000000 --- a/doc/html/qthread-h.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - -ntqthread.h Include File - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        ntqthread.h

        - -

        This is the verbatim text of the ntqthread.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


        -
        -/****************************************************************************
        -** $Id: qt/ntqthread.h   3.3.8   edited Jan 11 14:38 $
        -**
        -** Definition of TQThread class
        -**
        -** Created : 931107
        -**
        -** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
        -**
        -** This file is part of the kernel module of the TQt GUI Toolkit.
        -**
        -** This file may be used under the terms of the GNU General Public
        -** License versions 2.0 or 3.0 as published by the Free Software
        -** Foundation and appearing in the file LICENSE.GPL included in the
        -** packaging of this file. Alternatively you may (at your option) use any
        -** later version of the GNU General Public License if such license has
        -** been publicly approved by Trolltech ASA (or its successors, if any)
        -** and the KDE Free TQt Foundation.
        -**
        -** Please review the following information to ensure GNU General
        -** Public Licensing requirements will be met:
        -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        -** If you are unsure which license is appropriate for your use, please
        -** review the following information:
        -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        -** or contact the sales department at sales@trolltech.com.
        -**
        -** This file may be used under the terms of the Q Public License as
        -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        -** included in the packaging of this file.  Licensees holding valid TQt
        -** Commercial licenses may use this file in accordance with the TQt
        -** Commercial License Agreement provided with the Software.
        -**
        -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        -** herein.
        -**
        -**********************************************************************/
        -
        -#ifndef TQTHREAD_H
        -#define TQTHREAD_H
        -
        -#if defined(TQT_THREAD_SUPPORT)
        -
        -#ifndef QT_H
        -#include "ntqwindowdefs.h"
        -#endif // QT_H
        -
        -#include <limits.h>
        -
        -class TQThreadInstance;
        -
        -class TQ_EXPORT TQThread : public TQt
        -{
        -public:
        -    static TQt::HANDLE currentThread();
        -
        -    static void initialize();
        -    static void cleanup();
        -
        -    static void exit();
        -
        -#ifdef Q_QDOC
        -    TQThread( unsigned int stackSize = 0 );
        -#else
        -    TQThread( unsigned int stackSize );
        -    TQThread();
        -#endif
        -
        -    virtual ~TQThread();
        -
        -    // default argument causes thread to block indefinately
        -    bool wait( unsigned long time = ULONG_MAX );
        -
        -    enum Priority {
        -	IdlePriority,
        -
        -	LowestPriority,
        -	LowPriority,
        -	NormalPriority,
        -	HighPriority,
        -	HighestPriority,
        -
        -	TimeCriticalPriority,
        -
        -	InheritPriority
        -    };
        -
        -#ifdef Q_QDOC
        -    void start( Priority = InheritPriority );
        -#else
        -    void start( Priority );
        -    void start();
        -#endif
        -
        -    void terminate();
        -
        -    bool finished() const;
        -    bool running() const;
        -
        -protected:
        -    virtual void run() = 0;
        -
        -    static void sleep( unsigned long );
        -    static void msleep( unsigned long );
        -    static void usleep( unsigned long );
        -
        -private:
        -    TQThreadInstance * d;
        -    friend class TQThreadInstance;
        -
        -#if defined(TQ_DISABLE_COPY)
        -    TQThread( const TQThread & );
        -    TQThread &operator=( const TQThread & );
        -#endif // TQ_DISABLE_COPY
        -};
        -
        -#endif // TQT_THREAD_SUPPORT
        -
        -#endif // TQTHREAD_H
        -
        - -


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/qthread-members.html b/doc/html/qthread-members.html deleted file mode 100644 index 3cbfa108f..000000000 --- a/doc/html/qthread-members.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - -TQThread Member List - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        Complete Member List for TQThread

        - -

        This is the complete list of member functions for -TQThread, including inherited members. - -

        - -


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/qthreadstorage-h.html b/doc/html/qthreadstorage-h.html deleted file mode 100644 index 7efc05556..000000000 --- a/doc/html/qthreadstorage-h.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - -ntqthreadstorage.h Include File - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        ntqthreadstorage.h

        - -

        This is the verbatim text of the ntqthreadstorage.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


        -
        -/****************************************************************************
        -** $Id: qt/ntqthreadstorage.h   3.3.8   edited Jan 11 14:46 $
        -**
        -** ...
        -**
        -** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
        -**
        -** This file is part of the tools module of the TQt GUI Toolkit.
        -**
        -** This file may be used under the terms of the GNU General Public
        -** License versions 2.0 or 3.0 as published by the Free Software
        -** Foundation and appearing in the file LICENSE.GPL included in the
        -** packaging of this file. Alternatively you may (at your option) use any
        -** later version of the GNU General Public License if such license has
        -** been publicly approved by Trolltech ASA (or its successors, if any)
        -** and the KDE Free TQt Foundation.
        -**
        -** Please review the following information to ensure GNU General
        -** Public Licensing requirements will be met:
        -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        -** If you are unsure which license is appropriate for your use, please
        -** review the following information:
        -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        -** or contact the sales department at sales@trolltech.com.
        -**
        -** This file may be used under the terms of the Q Public License as
        -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        -** included in the packaging of this file.  Licensees holding valid TQt
        -** Commercial licenses may use this file in accordance with the TQt
        -** Commercial License Agreement provided with the Software.
        -**
        -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        -** herein.
        -**
        -**********************************************************************/
        -
        -#ifndef TQTHREADSTORAGE_H
        -#define TQTHREADSTORAGE_H
        -
        -#ifdef TQT_THREAD_SUPPORT
        -
        -#ifndef QT_H
        -#include "ntqglobal.h"
        -#endif // QT_H
        -
        -class TQ_EXPORT TQThreadStorageData
        -{
        -public:
        -    TQThreadStorageData( void (*func)(void *) );
        -    ~TQThreadStorageData();
        -
        -    void** get() const;
        -    void** set( void* p );
        -
        -    static void finish( void** );
        -    int id;
        -};
        -
        -
        -template <class T>
        -class TQThreadStorage
        -{
        -private:
        -    TQThreadStorageData d;
        -
        -#if defined(TQ_DISABLE_COPY)
        -    // disable copy constructor and operator=
        -    TQThreadStorage( const TQThreadStorage & );
        -    TQThreadStorage &operator=( const TQThreadStorage & );
        -#endif // TQ_DISABLE_COPY
        -
        -    static void deleteData( void *x ) { delete (T)x; }
        -
        -public:
        -    inline TQThreadStorage() : d( deleteData ) {  }
        -    inline ~TQThreadStorage() { }
        -
        -    inline bool hasLocalData() const
        -    { return d.get() != 0; }
        -
        -    inline T& localData()
        -    { void **v = d.get(); if ( !v ) v = d.set( 0 ); return *(T*)v; }
        -
        -    inline T localData() const
        -    { void **v = d.get(); return ( v ? *(T*)v : 0 ); }
        -
        -    inline void setLocalData( T t )
        -    { (void) d.set( t ); }
        -};
        -
        -#endif // TQT_THREAD_SUPPORT
        -
        -#endif // TQTHREADSTORAGE_H
        -
        - -


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/qthreadstorage-members.html b/doc/html/qthreadstorage-members.html deleted file mode 100644 index ee0332e5e..000000000 --- a/doc/html/qthreadstorage-members.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - -TQThreadStorage Member List - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        Complete Member List for TQThreadStorage

        - -

        This is the complete list of member functions for -TQThreadStorage, including inherited members. - -

        - -


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/qwaitcondition-h.html b/doc/html/qwaitcondition-h.html deleted file mode 100644 index 06589092f..000000000 --- a/doc/html/qwaitcondition-h.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - -ntqwaitcondition.h Include File - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        ntqwaitcondition.h

        - -

        This is the verbatim text of the ntqwaitcondition.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


        -
        -/****************************************************************************
        -** $Id: qt/ntqwaitcondition.h   3.3.8   edited Jan 11 14:38 $
        -**
        -** Definition of TQWaitCondition class
        -**
        -** Created : 931107
        -**
        -** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
        -**
        -** This file is part of the tools module of the TQt GUI Toolkit.
        -**
        -** This file may be used under the terms of the GNU General Public
        -** License versions 2.0 or 3.0 as published by the Free Software
        -** Foundation and appearing in the file LICENSE.GPL included in the
        -** packaging of this file. Alternatively you may (at your option) use any
        -** later version of the GNU General Public License if such license has
        -** been publicly approved by Trolltech ASA (or its successors, if any)
        -** and the KDE Free TQt Foundation.
        -**
        -** Please review the following information to ensure GNU General
        -** Public Licensing requirements will be met:
        -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        -** If you are unsure which license is appropriate for your use, please
        -** review the following information:
        -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        -** or contact the sales department at sales@trolltech.com.
        -**
        -** This file may be used under the terms of the Q Public License as
        -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        -** included in the packaging of this file.  Licensees holding valid TQt
        -** Commercial licenses may use this file in accordance with the TQt
        -** Commercial License Agreement provided with the Software.
        -**
        -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        -** herein.
        -**
        -**********************************************************************/
        -
        -#ifndef TQWAITCONDITION_H
        -#define TQWAITCONDITION_H
        -
        -#ifndef QT_H
        -#include "ntqglobal.h"
        -#endif // QT_H
        -
        -#if defined(TQT_THREAD_SUPPORT)
        -
        -#include <limits.h>
        -
        -class TQWaitConditionPrivate;
        -class TQMutex;
        -
        -class TQ_EXPORT TQWaitCondition
        -{
        -public:
        -    TQWaitCondition();
        -    virtual ~TQWaitCondition();
        -
        -    // default argument causes thread to block indefinately
        -    bool wait( unsigned long time = ULONG_MAX );
        -    bool wait( TQMutex *mutex, unsigned long time = ULONG_MAX );
        -
        -    void wakeOne();
        -    void wakeAll();
        -
        -private:
        -    TQWaitConditionPrivate * d;
        -
        -#if defined(TQ_DISABLE_COPY)
        -    TQWaitCondition( const TQWaitCondition & );
        -    TQWaitCondition &operator=( const TQWaitCondition & );
        -#endif
        -};
        -
        -#endif
        -
        -#endif
        -
        - -


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/qwaitcondition-members.html b/doc/html/qwaitcondition-members.html deleted file mode 100644 index a63aa8378..000000000 --- a/doc/html/qwaitcondition-members.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - -TQWaitCondition Member List - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        Complete Member List for TQWaitCondition

        - -

        This is the complete list of member functions for -TQWaitCondition, including inherited members. - -

        - -


        - -
        Copyright © 2007 -TrolltechTrademarks -
        TQt 3.3.8
        -
        - diff --git a/doc/html/thread.html b/doc/html/thread.html index b9f435f40..b5d992c6c 100644 --- a/doc/html/thread.html +++ b/doc/html/thread.html @@ -35,12 +35,12 @@ body { background: #ffffff; color: black; }

        These classes are relevant to threaded applications.

        -
        TQMutexAccess serialization between threads -
        TQMutexLockerSimplifies locking and unlocking TQMutexes -
        TQSemaphoreRobust integer semaphore -
        TQThreadPlatform-independent threads -
        TQThreadStoragePer-thread data storage -
        TQWaitConditionAllows waiting/waking for conditions between threads +
        TQMutexAccess serialization between threads +
        TQMutexLockerSimplifies locking and unlocking TQMutexes +
        TQSemaphoreRobust integer semaphore +
        TQThreadPlatform-independent threads +
        TQThreadStoragePer-thread data storage +
        TQWaitConditionAllows waiting/waking for conditions between threads


        diff --git a/doc/html/threads.html b/doc/html/threads.html index eb3c50767..b99b2f144 100644 --- a/doc/html/threads.html +++ b/doc/html/threads.html @@ -88,19 +88,19 @@ entry in ntqconfig.h.

        These classes are built into the TQt library when thread support is enabled:

          -
        • TQThread - Provides the means to start a new thread, which begins -execution in your reimplementation of TQThread::run(). This is similar +
        • TQThread - Provides the means to start a new thread, which begins +execution in your reimplementation of TQThread::run(). This is similar to the Java thread class. -

        • TQThreadStorage - Provides per-thread data storage. This class can +

        • TQThreadStorage - Provides per-thread data storage. This class can only be used with threads started with TQThread; it cannot be used with threads started with platform-specific APIs. -

        • TQMutex - Provides a mutual exclusion lock (also know as a mutex). -
        • TQMutexLocker - A convenience class which automatically locks and +

        • TQMutex - Provides a mutual exclusion lock (also know as a mutex). +
        • TQMutexLocker - A convenience class which automatically locks and unlocks a TQMutex. TQMutexLocker is useful in complicated code, or in code which uses exceptions. See the documentation for more details. -
        • TQWaitCondition - Provides a way for threads to go to sleep until +
        • TQWaitCondition - Provides a way for threads to go to sleep until woken up by another thread. -
        • TQSemaphore - Provides a simple integer semaphore. +
        • TQSemaphore - Provides a simple integer semaphore.

        Important Definitions

        @@ -145,7 +145,7 @@ reentrant, since they only reference unique data. Only one thread at a time can call member functions on each instance of Number. However, multiple threads can call member functions on separate instances of Number. -

        Thread-safe functions usually use a mutex (e.g a TQMutex) to serialize +

        Thread-safe functions usually use a mutex (e.g a TQMutex) to serialize access to shared data. Because of this, thread-safe functions are usually slower than reentrant functions, because of the extra overhead of locking and unlocking the mutex. For example, given the class Counter below: @@ -307,7 +307,7 @@ instead, which will cause the event loop to delete the object after all pending events have been delivered to the object.

      • Don't do any blocking operations while holding the TQt library mutex. This will freeze up the event loop. -

      • Make sure you unlock a recursive TQMutex as many times as you lock +

      • Make sure you unlock a recursive TQMutex as many times as you lock it, no more and no less.

      • Don't mix the normal TQt library and the threaded TQt library in your application. This means that if your application uses the threaded TQt diff --git a/doc/html/titleindex b/doc/html/titleindex index 2cedaf9ab..7ac89b230 100644 --- a/doc/html/titleindex +++ b/doc/html/titleindex @@ -579,10 +579,10 @@ QMovie Class | ntqmovie.html QMovie Member List | qmovie-members.html QMultiLineEdit Class | ntqmultilineedit.html QMultiLineEdit Member List | qmultilineedit-members.html -QMutex Class | ntqmutex.html -QMutex Member List | qmutex-members.html -QMutexLocker Class | qmutexlocker.html -QMutexLocker Member List | qmutexlocker-members.html +TQMutex Class | tqmutex.html +TQMutex Member List | tqmutex-members.html +TQMutexLocker Class | tqmutexlocker.html +TQMutexLocker Member List | tqmutexlocker-members.html QNPInstance Class | qnpinstance.html QNPInstance Member List | qnpinstance-members.html QNPStream Class | qnpstream.html @@ -680,8 +680,8 @@ QScrollBar Class | ntqscrollbar.html QScrollBar Member List | qscrollbar-members.html QScrollView Class | ntqscrollview.html QScrollView Member List | qscrollview-members.html -QSemaphore Class | ntqsemaphore.html -QSemaphore Member List | qsemaphore-members.html +TQSemaphore Class | tqsemaphore.html +TQSemaphore Member List | tqsemaphore-members.html QServerSocket Class | ntqserversocket.html QServerSocket Member List | qserversocket-members.html QSessionManager Class | ntqsessionmanager.html @@ -822,10 +822,10 @@ TQTextStream Class | tqtextstream.html TQTextStream Member List | tqtextstream-members.html TQTextView Class | tqtextview.html TQTextView Member List | tqtextview-members.html -QThread Class | ntqthread.html -QThread Member List | qthread-members.html -QThreadStorage Class | ntqthreadstorage.html -QThreadStorage Member List | qthreadstorage-members.html +TQThread Class | tqthread.html +TQThread Member List | tqthread-members.html +TQThreadStorage Class | tqthreadstorage.html +TQThreadStorage Member List | tqthreadstorage-members.html TQTime Class | tqtime.html TQTime Member List | tqtime-members.html TQTimeEdit Class | tqtimeedit.html @@ -884,8 +884,8 @@ QVariant Class | ntqvariant.html QVariant Member List | qvariant-members.html QWMatrix Class | ntqwmatrix.html QWMatrix Member List | qwmatrix-members.html -QWaitCondition Class | ntqwaitcondition.html -QWaitCondition Member List | qwaitcondition-members.html +TQWaitCondition Class | tqwaitcondition.html +TQWaitCondition Member List | tqwaitcondition-members.html QWhatsThis Class | ntqwhatsthis.html QWhatsThis Member List | qwhatsthis-members.html QWheelEvent Class | qwheelevent.html @@ -1182,7 +1182,7 @@ ntqmotifstyle.h Include File | qmotifstyle-h.html qmotifwidget.h Include File | qmotifwidget-h.html ntqmovie.h Include File | qmovie-h.html ntqmultilineedit.h Include File | qmultilineedit-h.html -ntqmutex.h Include File | qmutex-h.html +tqmutex.h Include File | tqmutex-h.html ntqnamespace.h Include File | qnamespace-h.html ntqnetwork.h Example File | qnetwork-h.html ntqnetworkprotocol.h Include File | qnetworkprotocol-h.html @@ -1223,7 +1223,7 @@ ntqregion.h Include File | qregion-h.html ntqrtlcodec.h Include File | qrtlcodec-h.html ntqscrollbar.h Include File | qscrollbar-h.html ntqscrollview.h Include File | qscrollview-h.html -ntqsemaphore.h Include File | qsemaphore-h.html +tqsemaphore.h Include File | tqsemaphore-h.html ntqserversocket.h Include File | qserversocket-h.html ntqsessionmanager.h Include File | qsessionmanager-h.html ntqsettings.h Include File | qsettings-h.html @@ -1277,8 +1277,8 @@ tqtextcodecplugin.h Include File | tqtextcodecplugin-h.html tqtextedit.h Include File | tqtextedit-h.html tqtextstream.h Include File | tqtextstream-h.html tqtextview.h Include File | tqtextview-h.html -ntqthread.h Include File | qthread-h.html -ntqthreadstorage.h Include File | qthreadstorage-h.html +tqthread.h Include File | tqthread-h.html +tqthreadstorage.h Include File | tqthreadstorage-h.html tqtimer.h Include File | tqtimer-h.html ntqtoolbar.h Include File | qtoolbar-h.html ntqtoolbox.h Include File | qtoolbox-h.html @@ -1298,7 +1298,7 @@ ntqvariant.h Include File | qvariant-h.html ntqvbox.h Include File | qvbox-h.html ntqvbuttongroup.h Include File | qvbuttongroup-h.html ntqvgroupbox.h Include File | qvgroupbox-h.html -ntqwaitcondition.h Include File | qwaitcondition-h.html +tqwaitcondition.h Include File | tqwaitcondition-h.html ntqwhatsthis.h Include File | qwhatsthis-h.html tqwidget.h Include File | tqwidget-h.html tqwidgetfactory.h Include File | tqwidgetfactory-h.html diff --git a/doc/html/tqmap.html b/doc/html/tqmap.html index 48bf63e73..a0bb3b31e 100644 --- a/doc/html/tqmap.html +++ b/doc/html/tqmap.html @@ -244,7 +244,7 @@ the map in time O(1). If multiple TQMap instances share the same data and one is modifying the map's data, this modifying instance makes a copy and modifies its private copy: so it does not affect other instances. If a TQMap is being used in a multi-threaded -program, you must protect all access to the map. See TQMutex. +program, you must protect all access to the map. See TQMutex.

        There are a couple of ways of inserting new items into the map. One uses the insert() method; the other uses operator[]:

        diff --git a/doc/html/tqmutex-h.html b/doc/html/tqmutex-h.html
        new file mode 100644
        index 000000000..1dfe1578f
        --- /dev/null
        +++ b/doc/html/tqmutex-h.html
        @@ -0,0 +1,159 @@
        +
        +
        +
        +
        +
        +tqmutex.h Include File
        +
        +
        +
        +
        +
        +
        +
        +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqmutex.h

        + +

        This is the verbatim text of the tqmutex.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


        +
        +/****************************************************************************
        +** $Id: qt/tqmutex.h   3.3.8   edited Jan 11 14:38 $
        +**
        +** Definition of TQMutex class
        +**
        +** Created : 931107
        +**
        +** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
        +**
        +** This file is part of the tools module of the TQt GUI Toolkit.
        +**
        +** This file may be used under the terms of the GNU General Public
        +** License versions 2.0 or 3.0 as published by the Free Software
        +** Foundation and appearing in the file LICENSE.GPL included in the
        +** packaging of this file. Alternatively you may (at your option) use any
        +** later version of the GNU General Public License if such license has
        +** been publicly approved by Trolltech ASA (or its successors, if any)
        +** and the KDE Free TQt Foundation.
        +**
        +** Please review the following information to ensure GNU General
        +** Public Licensing requirements will be met:
        +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        +** If you are unsure which license is appropriate for your use, please
        +** review the following information:
        +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        +** or contact the sales department at sales@trolltech.com.
        +**
        +** This file may be used under the terms of the Q Public License as
        +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        +** included in the packaging of this file.  Licensees holding valid TQt
        +** Commercial licenses may use this file in accordance with the TQt
        +** Commercial License Agreement provided with the Software.
        +**
        +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        +** herein.
        +**
        +**********************************************************************/
        +
        +#ifndef TQMUTEX_H
        +#define TQMUTEX_H
        +
        +#ifndef QT_H
        +#include "ntqglobal.h"
        +#endif // QT_H
        +
        +#if defined(TQT_THREAD_SUPPORT)
        +
        +class TQMutexPrivate;
        +
        +const int Q_MUTEX_NORMAL = 0;
        +const int Q_MUTEX_RECURSIVE = 1;
        +
        +class TQ_EXPORT TQMutex
        +{
        +    friend class TQThread;
        +    friend class TQWaitCondition;
        +    friend class TQWaitConditionPrivate;
        +
        +public:
        +    TQMutex(bool recursive = FALSE);
        +    virtual ~TQMutex();
        +
        +    void lock();
        +    void unlock();
        +    bool locked();
        +    bool tryLock();
        +
        +private:
        +    TQMutexPrivate * d;
        +
        +#if defined(TQ_DISABLE_COPY)
        +    TQMutex( const TQMutex & );
        +    TQMutex &operator=( const TQMutex & );
        +#endif
        +};
        +
        +class TQ_EXPORT TQMutexLocker
        +{
        +public:
        +    TQMutexLocker( TQMutex * );
        +    ~TQMutexLocker();
        +
        +    TQMutex *mutex() const;
        +
        +private:
        +    TQMutex *mtx;
        +
        +#if defined(TQ_DISABLE_COPY)
        +    TQMutexLocker( const TQMutexLocker & );
        +    TQMutexLocker &operator=( const TQMutexLocker & );
        +#endif
        +};
        +
        +inline TQMutexLocker::TQMutexLocker( TQMutex *m )
        +    : mtx( m )
        +{
        +    if ( mtx ) mtx->lock();
        +}
        +
        +inline TQMutexLocker::~TQMutexLocker()
        +{
        +    if ( mtx ) mtx->unlock();
        +}
        +
        +inline TQMutex *TQMutexLocker::mutex() const
        +{
        +    return mtx;
        +}
        +
        +#endif
        +
        +#endif
        +
        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqmutex-members.html b/doc/html/tqmutex-members.html new file mode 100644 index 000000000..a3857a2fa --- /dev/null +++ b/doc/html/tqmutex-members.html @@ -0,0 +1,52 @@ + + + + + +TQMutex Member List + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        Complete Member List for TQMutex

        + +

        This is the complete list of member functions for +TQMutex, including inherited members. + +

        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqmutex.html b/doc/html/tqmutex.html new file mode 100644 index 000000000..fa6b727ec --- /dev/null +++ b/doc/html/tqmutex.html @@ -0,0 +1,195 @@ + + + + + +TQMutex Class + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        TQMutex Class Reference

        + +

        The TQMutex class provides access serialization between threads. +More... +

        All the functions in this class are thread-safe when TQt is built with thread support.

        +

        #include <tqmutex.h> +

        List of all member functions. +

        Public Members

        + +

        Detailed Description

        + + + +The TQMutex class provides access serialization between threads. +

        + +

        The purpose of a TQMutex is to protect an object, data structure or +section of code so that only one thread can access it at a time +(This is similar to the Java synchronized keyword). For +example, say there is a method which prints a message to the user +on two lines: +

        +    int number = 6;
        +
        +    void method1()
        +    {
        +        number *= 5;
        +        number /= 4;
        +    }
        +
        +    void method2()
        +    {
        +        number *= 3;
        +        number /= 2;
        +    }
        +    
        + +

        If these two methods are called in succession, the following happens: +

        +    // method1()
        +    number *= 5;        // number is now 30
        +    number /= 4;        // number is now 7
        +
        +    // method2()
        +    number *= 3;        // nubmer is now 21
        +    number /= 2;        // number is now 10
        +    
        + +

        If these two methods are called simultaneously from two threads then the +following sequence could result: +

        +    // Thread 1 calls method1()
        +    number *= 5;        // number is now 30
        +
        +    // Thread 2 calls method2().
        +    //
        +    // Most likely Thread 1 has been put to sleep by the operating
        +    // system to allow Thread 2 to run.
        +    number *= 3;        // number is now 90
        +    number /= 2;        // number is now 45
        +
        +    // Thread 1 finishes executing.
        +    number /= 4;        // number is now 11, instead of 10
        +    
        + +

        If we add a mutex, we should get the result we want: +

        +    TQMutex mutex;
        +    int number = 6;
        +
        +    void method1()
        +    {
        +        mutex.lock();
        +        number *= 5;
        +        number /= 4;
        +        mutex.unlock();
        +    }
        +
        +    void method2()
        +    {
        +        mutex.lock();
        +        number *= 3;
        +        number /= 2;
        +        mutex.unlock();
        +    }
        +    
        + +

        Then only one thread can modify number at any given time and +the result is correct. This is a trivial example, of course, but +applies to any other case where things need to happen in a +particular sequence. +

        When you call lock() in a thread, other threads that try to call +lock() in the same place will block until the thread that got the +lock calls unlock(). A non-blocking alternative to lock() is +tryLock(). +

        See also Environment Classes and Threading. + +


        Member Function Documentation

        +

        TQMutex::TQMutex ( bool recursive = FALSE ) +

        +Constructs a new mutex. The mutex is created in an unlocked state. +A recursive mutex is created if recursive is TRUE; a normal +mutex is created if recursive is FALSE (the default). With a +recursive mutex, a thread can lock the same mutex multiple times +and it will not be unlocked until a corresponding number of +unlock() calls have been made. + +

        TQMutex::~TQMutex () [virtual] +

        +Destroys the mutex. +

        Warning: If you destroy a mutex that still holds a lock the +resultant behavior is undefined. + +

        void TQMutex::lock () +

        +Attempt to lock the mutex. If another thread has locked the mutex +then this call will block until that thread has unlocked it. +

        See also unlock() and locked(). + +

        bool TQMutex::locked () +

        +Returns TRUE if the mutex is locked by another thread; otherwise +returns FALSE. +

        Warning: Due to differing implementations of recursive mutexes on +various platforms, calling this function from the same thread that +previously locked the mutex will return undefined results. +

        See also lock() and unlock(). + +

        bool TQMutex::tryLock () +

        +Attempt to lock the mutex. If the lock was obtained, this function +returns TRUE. If another thread has locked the mutex, this +function returns FALSE, instead of waiting for the mutex to become +available, i.e. it does not block. +

        If the lock was obtained, the mutex must be unlocked with unlock() +before another thread can successfully lock it. +

        See also lock(), unlock(), and locked(). + +

        void TQMutex::unlock () +

        +Unlocks the mutex. Attempting to unlock a mutex in a different +thread to the one that locked it results in an error. Unlocking a +mutex that is not locked results in undefined behaviour (varies +between different Operating Systems' thread implementations). +

        See also lock() and locked(). + + +


        +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqmutexlocker-members.html b/doc/html/tqmutexlocker-members.html new file mode 100644 index 000000000..c68b9c736 --- /dev/null +++ b/doc/html/tqmutexlocker-members.html @@ -0,0 +1,49 @@ + + + + + +TQMutexLocker Member List + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        Complete Member List for TQMutexLocker

        + +

        This is the complete list of member functions for +TQMutexLocker, including inherited members. + +

        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqmutexlocker.html b/doc/html/tqmutexlocker.html new file mode 100644 index 000000000..2ec99fc2a --- /dev/null +++ b/doc/html/tqmutexlocker.html @@ -0,0 +1,220 @@ + + + + + +TQMutexLocker Class + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        TQMutexLocker Class Reference

        + +

        The TQMutexLocker class simplifies locking and unlocking TQMutexes. +More... +

        All the functions in this class are thread-safe when TQt is built with thread support.

        +

        #include <tqmutex.h> +

        List of all member functions. +

        Public Members

        + +

        Detailed Description

        + + +The TQMutexLocker class simplifies locking and unlocking TQMutexes. +

        +

        + +

        The purpose of TQMutexLocker is to simplify TQMutex locking and +unlocking. Locking and unlocking a TQMutex in complex functions and +statements or in exception handling code is error prone and +difficult to debug. TQMutexLocker should be used in such situations +to ensure that the state of the mutex is well defined and always +locked and unlocked properly. +

        TQMutexLocker should be created within a function where a TQMutex +needs to be locked. The mutex is locked when TQMutexLocker is +created, and unlocked when TQMutexLocker is destroyed. +

        For example, this complex function locks a TQMutex upon entering +the function and unlocks the mutex at all the exit points: +

        +    int complexFunction( int flag )
        +    {
        +        mutex.lock();
        +
        +        int return_value = 0;
        +
        +        switch ( flag ) {
        +        case 0:
        +        case 1:
        +            {
        +                mutex.unlock();
        +                return moreComplexFunction( flag );
        +            }
        +
        +        case 2:
        +            {
        +                int status = anotherFunction();
        +                if ( status < 0 ) {
        +                    mutex.unlock();
        +                    return -2;
        +                }
        +                return_value = status + flag;
        +                break;
        +            }
        +
        +        default:
        +            {
        +                if ( flag > 10 ) {
        +                    mutex.unlock();
        +                    return -1;
        +                }
        +                break;
        +            }
        +        }
        +
        +        mutex.unlock();
        +        return return_value;
        +    }
        +    
        + +

        This example function will get more complicated as it is +developed, which increases the likelihood that errors will occur. +

        Using TQMutexLocker greatly simplifies the code, and makes it more +readable: +

        +    int complexFunction( int flag )
        +    {
        +        TQMutexLocker locker( &mutex );
        +
        +        int return_value = 0;
        +
        +        switch ( flag ) {
        +        case 0:
        +        case 1:
        +            {
        +                return moreComplexFunction( flag );
        +            }
        +
        +        case 2:
        +            {
        +                int status = anotherFunction();
        +                if ( status < 0 )
        +                    return -2;
        +                return_value = status + flag;
        +                break;
        +            }
        +
        +        default:
        +            {
        +                if ( flag > 10 )
        +                    return -1;
        +                break;
        +            }
        +        }
        +
        +        return return_value;
        +    }
        +    
        + +

        Now, the mutex will always be unlocked when the TQMutexLocker +object is destroyed (when the function returns since locker is +an auto variable). Note that the mutex will be unlocked after +the call to moreComplexFunction() in this example, avoiding +possible bugs caused by unlocking the mutex too early, as in +the first example. +

        The same principle applies to code that throws and catches +exceptions. An exception that is not caught in the function that +has locked the mutex has no way of unlocking the mutex before the +exception is passed up the stack to the calling function. +

        TQMutexLocker also provides a mutex() member function that returns +the mutex on which the TQMutexLocker is operating. This is useful +for code that needs access to the mutex, such as +TQWaitCondition::wait(). For example: +

        +    class SignalWaiter
        +    {
        +    private:
        +        TQMutexLocker locker;
        +
        +    public:
        +        SignalWaiter( TQMutex *mutex )
        +            : locker( mutex )
        +        {
        +        }
        +
        +        void waitForSignal()
        +        {
        +            ...
        +            ...
        +            ...
        +
        +            while ( ! signalled )
        +                waitcondition.wait( locker.mutex() );
        +
        +            ...
        +            ...
        +            ...
        +        }
        +    };
        +    
        + +

        See also TQMutex, TQWaitCondition, Environment Classes, and Threading. + +


        Member Function Documentation

        +

        TQMutexLocker::TQMutexLocker ( TQMutex * mutex ) +

        + +

        Constructs a TQMutexLocker and locks mutex. The mutex will be +unlocked when the TQMutexLocker is destroyed. If mutex is zero, +TQMutexLocker does nothing. +

        See also TQMutex::lock(). + +

        TQMutexLocker::~TQMutexLocker () +

        + +

        Destroys the TQMutexLocker and unlocks the mutex which was locked +in the constructor. +

        See also TQMutexLocker::TQMutexLocker() and TQMutex::unlock(). + +

        TQMutex * TQMutexLocker::mutex () const +

        + +

        Returns a pointer to the mutex which was locked in the +constructor. +

        See also TQMutexLocker::TQMutexLocker(). + + +


        +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqsemaphore-h.html b/doc/html/tqsemaphore-h.html new file mode 100644 index 000000000..85e153ba8 --- /dev/null +++ b/doc/html/tqsemaphore-h.html @@ -0,0 +1,126 @@ + + + + + +tqsemaphore.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqsemaphore.h

        + +

        This is the verbatim text of the tqsemaphore.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


        +
        +/****************************************************************************
        +** $Id: qt/tqsemaphore.h   3.3.8   edited Jan 11 14:38 $
        +**
        +** Definition of TQSemaphore class
        +**
        +** Created : 931107
        +**
        +** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
        +**
        +** This file is part of the tools module of the TQt GUI Toolkit.
        +**
        +** This file may be used under the terms of the GNU General Public
        +** License versions 2.0 or 3.0 as published by the Free Software
        +** Foundation and appearing in the file LICENSE.GPL included in the
        +** packaging of this file. Alternatively you may (at your option) use any
        +** later version of the GNU General Public License if such license has
        +** been publicly approved by Trolltech ASA (or its successors, if any)
        +** and the KDE Free TQt Foundation.
        +**
        +** Please review the following information to ensure GNU General
        +** Public Licensing requirements will be met:
        +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        +** If you are unsure which license is appropriate for your use, please
        +** review the following information:
        +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        +** or contact the sales department at sales@trolltech.com.
        +**
        +** This file may be used under the terms of the Q Public License as
        +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        +** included in the packaging of this file.  Licensees holding valid TQt
        +** Commercial licenses may use this file in accordance with the TQt
        +** Commercial License Agreement provided with the Software.
        +**
        +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        +** herein.
        +**
        +**********************************************************************/
        +
        +#ifndef TQSEMAPHORE_H
        +#define TQSEMAPHORE_H
        +
        +#ifndef QT_H
        +#include "ntqglobal.h"
        +#endif // QT_H
        +
        +#if defined(TQT_THREAD_SUPPORT)
        +
        +class TQSemaphorePrivate;
        +
        +class TQ_EXPORT TQSemaphore
        +{
        +public:
        +    TQSemaphore( int );
        +    virtual ~TQSemaphore();
        +
        +    int available() const;
        +    int total() const;
        +
        +    // postfix operators
        +    int operator++(int);
        +    int operator--(int);
        +
        +    int operator+=(int);
        +    int operator-=(int);
        +
        +    bool tryAccess(int);
        +
        +private:
        +    TQSemaphorePrivate *d;
        +
        +#if defined(TQ_DISABLE_COPY)
        +    TQSemaphore(const TQSemaphore &);
        +    TQSemaphore &operator=(const TQSemaphore &);
        +#endif
        +};
        +
        +#endif
        +
        +#endif
        +
        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqsemaphore-members.html b/doc/html/tqsemaphore-members.html new file mode 100644 index 000000000..7926751ed --- /dev/null +++ b/doc/html/tqsemaphore-members.html @@ -0,0 +1,55 @@ + + + + + +TQSemaphore Member List + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        Complete Member List for TQSemaphore

        + +

        This is the complete list of member functions for +TQSemaphore, including inherited members. + +

        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqsemaphore.html b/doc/html/tqsemaphore.html new file mode 100644 index 000000000..e50963edf --- /dev/null +++ b/doc/html/tqsemaphore.html @@ -0,0 +1,149 @@ + + + + + +TQSemaphore Class + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        TQSemaphore Class Reference

        + +

        The TQSemaphore class provides a robust integer semaphore. +More... +

        All the functions in this class are thread-safe when TQt is built with thread support.

        +

        #include <tqsemaphore.h> +

        List of all member functions. +

        Public Members

        + +

        Detailed Description

        + + + +The TQSemaphore class provides a robust integer semaphore. +

        + +

        A TQSemaphore can be used to serialize thread execution, in a +similar way to a TQMutex. A semaphore differs from a mutex, in +that a semaphore can be accessed by more than one thread at a +time. +

        For example, suppose we have an application that stores data in a +large tree structure. The application creates 10 threads +(commonly called a thread pool) to perform searches on the tree. +When the application searches the tree for some piece of data, it +uses one thread per base node to do the searching. A semaphore +could be used to make sure that two threads don't try to search +the same branch of the tree at the same time. +

        A non-computing example of a semaphore would be dining at a +restuarant. A semaphore is initialized to have a maximum count +equal to the number of chairs in the restuarant. As people +arrive, they want a seat. As seats are filled, the semaphore is +accessed, once per person. As people leave, the access is +released, allowing more people to enter. If a party of 10 people +want to be seated, but there are only 9 seats, those 10 people +will wait, but a party of 4 people would be seated (taking the +available seats to 5, making the party of 10 people wait longer). +

        When a semaphore is created it is given a number which is the +maximum number of concurrent accesses it will permit. Accesses to +the sempahore are gained using operator++() or operator+=(), and +released with operator--() or operator-=(). The number of +accesses allowed is retrieved with available(), and the total +number with total(). Note that the incrementing functions will +block if there aren't enough available accesses. Use tryAccess() +if you want to acquire accesses without blocking. +

        See also Environment Classes and Threading. + +


        Member Function Documentation

        +

        TQSemaphore::TQSemaphore ( int maxcount ) +

        +Creates a new semaphore. The semaphore can be concurrently +accessed at most maxcount times. + +

        TQSemaphore::~TQSemaphore () [virtual] +

        +Destroys the semaphore. +

        Warning: If you destroy a semaphore that has accesses in use the +resultant behavior is undefined. + +

        int TQSemaphore::available () const +

        +Returns the number of accesses currently available to the +semaphore. + +

        int TQSemaphore::operator++ ( int ) +

        +Postfix ++ operator. +

        Try to get access to the semaphore. If available() == 0, this +call will block until it can get access, i.e. until available() > +0. + +

        int TQSemaphore::operator+= ( int n ) +

        +Try to get access to the semaphore. If available() < n, this +call will block until it can get all the accesses it wants, i.e. +until available() >= n. + +

        int TQSemaphore::operator-- ( int ) +

        +Postfix -- operator. +

        Release access of the semaphore. This wakes all threads waiting +for access to the semaphore. + +

        int TQSemaphore::operator-= ( int n ) +

        +Release n accesses to the semaphore. + +

        int TQSemaphore::total () const +

        +Returns the total number of accesses to the semaphore. + +

        bool TQSemaphore::tryAccess ( int n ) +

        +Try to get access to the semaphore. If available() < n, this +function will return FALSE immediately. If available() >= n, +this function will take n accesses and return TRUE. This +function does not block. + + +

        +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqthread-h.html b/doc/html/tqthread-h.html new file mode 100644 index 000000000..a8028ef62 --- /dev/null +++ b/doc/html/tqthread-h.html @@ -0,0 +1,166 @@ + + + + + +tqthread.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqthread.h

        + +

        This is the verbatim text of the tqthread.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


        +
        +/****************************************************************************
        +** $Id: qt/tqthread.h   3.3.8   edited Jan 11 14:38 $
        +**
        +** Definition of TQThread class
        +**
        +** Created : 931107
        +**
        +** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
        +**
        +** This file is part of the kernel module of the TQt GUI Toolkit.
        +**
        +** This file may be used under the terms of the GNU General Public
        +** License versions 2.0 or 3.0 as published by the Free Software
        +** Foundation and appearing in the file LICENSE.GPL included in the
        +** packaging of this file. Alternatively you may (at your option) use any
        +** later version of the GNU General Public License if such license has
        +** been publicly approved by Trolltech ASA (or its successors, if any)
        +** and the KDE Free TQt Foundation.
        +**
        +** Please review the following information to ensure GNU General
        +** Public Licensing requirements will be met:
        +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        +** If you are unsure which license is appropriate for your use, please
        +** review the following information:
        +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        +** or contact the sales department at sales@trolltech.com.
        +**
        +** This file may be used under the terms of the Q Public License as
        +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        +** included in the packaging of this file.  Licensees holding valid TQt
        +** Commercial licenses may use this file in accordance with the TQt
        +** Commercial License Agreement provided with the Software.
        +**
        +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        +** herein.
        +**
        +**********************************************************************/
        +
        +#ifndef TQTHREAD_H
        +#define TQTHREAD_H
        +
        +#if defined(TQT_THREAD_SUPPORT)
        +
        +#ifndef QT_H
        +#include "ntqwindowdefs.h"
        +#endif // QT_H
        +
        +#include <limits.h>
        +
        +class TQThreadInstance;
        +
        +class TQ_EXPORT TQThread : public TQt
        +{
        +public:
        +    static TQt::HANDLE currentThread();
        +
        +    static void initialize();
        +    static void cleanup();
        +
        +    static void exit();
        +
        +#ifdef Q_QDOC
        +    TQThread( unsigned int stackSize = 0 );
        +#else
        +    TQThread( unsigned int stackSize );
        +    TQThread();
        +#endif
        +
        +    virtual ~TQThread();
        +
        +    // default argument causes thread to block indefinately
        +    bool wait( unsigned long time = ULONG_MAX );
        +
        +    enum Priority {
        +	IdlePriority,
        +
        +	LowestPriority,
        +	LowPriority,
        +	NormalPriority,
        +	HighPriority,
        +	HighestPriority,
        +
        +	TimeCriticalPriority,
        +
        +	InheritPriority
        +    };
        +
        +#ifdef Q_QDOC
        +    void start( Priority = InheritPriority );
        +#else
        +    void start( Priority );
        +    void start();
        +#endif
        +
        +    void terminate();
        +
        +    bool finished() const;
        +    bool running() const;
        +
        +protected:
        +    virtual void run() = 0;
        +
        +    static void sleep( unsigned long );
        +    static void msleep( unsigned long );
        +    static void usleep( unsigned long );
        +
        +private:
        +    TQThreadInstance * d;
        +    friend class TQThreadInstance;
        +
        +#if defined(TQ_DISABLE_COPY)
        +    TQThread( const TQThread & );
        +    TQThread &operator=( const TQThread & );
        +#endif // TQ_DISABLE_COPY
        +};
        +
        +#endif // TQT_THREAD_SUPPORT
        +
        +#endif // TQTHREAD_H
        +
        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqthread-members.html b/doc/html/tqthread-members.html new file mode 100644 index 000000000..7d5bddd54 --- /dev/null +++ b/doc/html/tqthread-members.html @@ -0,0 +1,59 @@ + + + + + +TQThread Member List + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        Complete Member List for TQThread

        + +

        This is the complete list of member functions for +TQThread, including inherited members. + +

        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqthread.html b/doc/html/tqthread.html new file mode 100644 index 000000000..8df9c449f --- /dev/null +++ b/doc/html/tqthread.html @@ -0,0 +1,247 @@ + + + + + +TQThread Class + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        TQThread Class Reference

        + +

        The TQThread class provides platform-independent threads. +More... +

        All the functions in this class are thread-safe when TQt is built with thread support.

        +

        #include <tqthread.h> +

        Inherits TQt. +

        List of all member functions. +

        Public Members

        +
          +
        • TQThread ( unsigned int stackSize = 0 )
        • +
        • virtual ~TQThread ()
        • +
        • bool wait ( unsigned long time = ULONG_MAX )
        • +
        • enum Priority { IdlePriority, LowestPriority, LowPriority, NormalPriority, HighPriority, HighestPriority, TimeCriticalPriority, InheritPriority }
        • +
        • void start ( Priority priority = InheritPriority )
        • +
        • void terminate ()
        • +
        • bool finished () const
        • +
        • bool running () const
        • +
        +

        Static Public Members

        + +

        Protected Members

        +
          +
        • virtual void run () = 0
        • +
        +

        Static Protected Members

        +
          +
        • void sleep ( unsigned long secs )
        • +
        • void msleep ( unsigned long msecs )
        • +
        • void usleep ( unsigned long usecs )
        • +
        +

        Detailed Description

        + + + +The TQThread class provides platform-independent threads. +

        + +

        A TQThread represents a separate thread of control within the +program; it shares data with all the other threads within the +process but executes independently in the way that a separate +program does on a multitasking operating system. Instead of +starting in main(), TQThreads begin executing in run(). You inherit +run() to include your code. For example: +

        +    class MyThread : public TQThread {
        +
        +    public:
        +
        +        virtual void run();
        +
        +    };
        +
        +    void MyThread::run()
        +    {
        +        for( int count = 0; count < 20; count++ ) {
        +            sleep( 1 );
        +            tqDebug( "Ping!" );
        +        }
        +    }
        +
        +    int main()
        +    {
        +        MyThread a;
        +        MyThread b;
        +        a.start();
        +        b.start();
        +        a.wait();
        +        b.wait();
        +    }
        +    
        + +

        This will start two threads, each of which writes Ping! 20 times +to the screen and exits. The wait() calls at the end of main() are +necessary because exiting main() ends the program, unceremoniously +killing all other threads. Each MyThread stops executing when it +reaches the end of MyThread::run(), just as an application does +when it leaves main(). +

        See also Thread Support in TQt, Environment Classes, and Threading. + +


        Member Type Documentation

        +

        TQThread::Priority

        + +

        This enum type indicates how the operating system should schedule +newly created threads. +

          +
        • TQThread::IdlePriority - scheduled only when no other threads are +running. +
        • TQThread::LowestPriority - scheduled less often than LowPriority. +
        • TQThread::LowPriority - scheduled less often than NormalPriority. +
        • TQThread::NormalPriority - the default priority of the operating +system. +
        • TQThread::HighPriority - scheduled more often than NormalPriority. +
        • TQThread::HighestPriority - scheduled more often then HighPriority. +
        • TQThread::TimeCriticalPriority - scheduled as often as possible. +
        • TQThread::InheritPriority - use the same priority as the creating +thread. This is the default. +
        +

        Member Function Documentation

        +

        TQThread::TQThread ( unsigned int stackSize = 0 ) +

        +Constructs a new thread. The thread does not begin executing until +start() is called. +

        If stackSize is greater than zero, the maximum stack size is +set to stackSize bytes, otherwise the maximum stack size is +automatically determined by the operating system. +

        Warning: Most operating systems place minimum and maximum limits +on thread stack sizes. The thread will fail to start if the stack +size is outside these limits. + +

        TQThread::~TQThread () [virtual] +

        +TQThread destructor. +

        Note that deleting a TQThread object will not stop the execution of +the thread it represents. Deleting a running TQThread (i.e. +finished() returns FALSE) will probably result in a program crash. +You can wait() on a thread to make sure that it has finished. + +

        TQt::HANDLE TQThread::currentThread () [static] +

        +This returns the thread handle of the currently executing thread. +

        Warning: The handle returned by this function is used for internal +purposes and should not be used in any application code. On +Windows, the returned value is a pseudo handle for the current +thread, and it cannot be used for numerical comparison. + +

        void TQThread::exit () [static] +

        +Ends the execution of the calling thread and wakes up any threads +waiting for its termination. + +

        bool TQThread::finished () const +

        +Returns TRUE if the thread is finished; otherwise returns FALSE. + +

        void TQThread::msleep ( unsigned long msecs ) [static protected] +

        +System independent sleep. This causes the current thread to sleep +for msecs milliseconds + +

        void TQThread::run () [pure virtual protected] +

        + +

        This method is pure virtual, and must be implemented in derived +classes in order to do useful work. Returning from this method +will end the execution of the thread. +

        See also wait(). + +

        bool TQThread::running () const +

        +Returns TRUE if the thread is running; otherwise returns FALSE. + +

        void TQThread::sleep ( unsigned long secs ) [static protected] +

        +System independent sleep. This causes the current thread to sleep +for secs seconds. + +

        void TQThread::start ( Priority priority = InheritPriority ) +

        +Begins execution of the thread by calling run(), which should be +reimplemented in a TQThread subclass to contain your code. The +operating system will schedule the thread according to the priority argument. +

        If you try to start a thread that is already running, this +function will wait until the the thread has finished and then +restart the thread. +

        See also Priority. + +

        void TQThread::terminate () +

        +This function terminates the execution of the thread. The thread +may or may not be terminated immediately, depending on the +operating system's scheduling policies. Use TQThread::wait() +after terminate() for synchronous termination. +

        When the thread is terminated, all threads waiting for the +the thread to finish will be woken up. +

        Warning: This function is dangerous, and its use is discouraged. +The thread can be terminated at any point in its code path. Threads +can be terminated while modifying data. There is no chance for +the thread to cleanup after itself, unlock any held mutexes, etc. +In short, use this function only if absolutely necessary. + +

        void TQThread::usleep ( unsigned long usecs ) [static protected] +

        +System independent sleep. This causes the current thread to sleep +for usecs microseconds + +

        bool TQThread::wait ( unsigned long time = ULONG_MAX ) +

        +A thread calling this function will block until either of these +conditions is met: +

          +
        • The thread associated with this TQThread object has finished +execution (i.e. when it returns from run()). This function +will return TRUE if the thread has finished. It also returns +TRUE if the thread has not been started yet. +
        • time milliseconds has elapsed. If time is ULONG_MAX (the +default), then the wait will never timeout (the thread must +return from run()). This function will return FALSE if the +wait timed out. +
        +

        This provides similar functionality to the POSIX pthread_join() function. + + +


        +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqthreadstorage-h.html b/doc/html/tqthreadstorage-h.html new file mode 100644 index 000000000..748578a84 --- /dev/null +++ b/doc/html/tqthreadstorage-h.html @@ -0,0 +1,140 @@ + + + + + +tqthreadstorage.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqthreadstorage.h

        + +

        This is the verbatim text of the tqthreadstorage.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


        +
        +/****************************************************************************
        +** $Id: qt/tqthreadstorage.h   3.3.8   edited Jan 11 14:46 $
        +**
        +** ...
        +**
        +** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
        +**
        +** This file is part of the tools module of the TQt GUI Toolkit.
        +**
        +** This file may be used under the terms of the GNU General Public
        +** License versions 2.0 or 3.0 as published by the Free Software
        +** Foundation and appearing in the file LICENSE.GPL included in the
        +** packaging of this file. Alternatively you may (at your option) use any
        +** later version of the GNU General Public License if such license has
        +** been publicly approved by Trolltech ASA (or its successors, if any)
        +** and the KDE Free TQt Foundation.
        +**
        +** Please review the following information to ensure GNU General
        +** Public Licensing requirements will be met:
        +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        +** If you are unsure which license is appropriate for your use, please
        +** review the following information:
        +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        +** or contact the sales department at sales@trolltech.com.
        +**
        +** This file may be used under the terms of the Q Public License as
        +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        +** included in the packaging of this file.  Licensees holding valid TQt
        +** Commercial licenses may use this file in accordance with the TQt
        +** Commercial License Agreement provided with the Software.
        +**
        +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        +** herein.
        +**
        +**********************************************************************/
        +
        +#ifndef TQTHREADSTORAGE_H
        +#define TQTHREADSTORAGE_H
        +
        +#ifdef TQT_THREAD_SUPPORT
        +
        +#ifndef QT_H
        +#include "ntqglobal.h"
        +#endif // QT_H
        +
        +class TQ_EXPORT TQThreadStorageData
        +{
        +public:
        +    TQThreadStorageData( void (*func)(void *) );
        +    ~TQThreadStorageData();
        +
        +    void** get() const;
        +    void** set( void* p );
        +
        +    static void finish( void** );
        +    int id;
        +};
        +
        +
        +template <class T>
        +class TQThreadStorage
        +{
        +private:
        +    TQThreadStorageData d;
        +
        +#if defined(TQ_DISABLE_COPY)
        +    // disable copy constructor and operator=
        +    TQThreadStorage( const TQThreadStorage & );
        +    TQThreadStorage &operator=( const TQThreadStorage & );
        +#endif // TQ_DISABLE_COPY
        +
        +    static void deleteData( void *x ) { delete (T)x; }
        +
        +public:
        +    inline TQThreadStorage() : d( deleteData ) {  }
        +    inline ~TQThreadStorage() { }
        +
        +    inline bool hasLocalData() const
        +    { return d.get() != 0; }
        +
        +    inline T& localData()
        +    { void **v = d.get(); if ( !v ) v = d.set( 0 ); return *(T*)v; }
        +
        +    inline T localData() const
        +    { void **v = d.get(); return ( v ? *(T*)v : 0 ); }
        +
        +    inline void setLocalData( T t )
        +    { (void) d.set( t ); }
        +};
        +
        +#endif // TQT_THREAD_SUPPORT
        +
        +#endif // TQTHREADSTORAGE_H
        +
        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqthreadstorage-members.html b/doc/html/tqthreadstorage-members.html new file mode 100644 index 000000000..4fdb72507 --- /dev/null +++ b/doc/html/tqthreadstorage-members.html @@ -0,0 +1,51 @@ + + + + + +TQThreadStorage Member List + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        Complete Member List for TQThreadStorage

        + +

        This is the complete list of member functions for +TQThreadStorage, including inherited members. + +

        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqthreadstorage.html b/doc/html/tqthreadstorage.html new file mode 100644 index 000000000..be0fb3482 --- /dev/null +++ b/doc/html/tqthreadstorage.html @@ -0,0 +1,189 @@ + + + + + +TQThreadStorage Class + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        TQThreadStorage Class Reference

        + +

        The TQThreadStorage class provides per-thread data storage. +More... +

        All the functions in this class are thread-safe when TQt is built with thread support.

        +

        #include <tqthreadstorage.h> +

        List of all member functions. +

        Public Members

        + +

        Detailed Description

        + + +The TQThreadStorage class provides per-thread data storage. +

        + + +

        TQThreadStorage is a template class that provides per-thread data +storage. +

        Note that due to compiler limitations, TQThreadStorage can only store pointers. +

        The setLocalData() function stores a single thread-specific value +for the calling thread. The data can be accessed later using the +localData() functions. TQThreadStorage takes ownership of the +data (which must be created on the heap with new) and deletes +it when the thread exits (either normally or via termination). +

        The hasLocalData() function allows the programmer to determine if +data has previously been set using the setLocalData() function. +This is useful for lazy initializiation. +

        For example, the following code uses TQThreadStorage to store a +single cache for each thread that calls the cacheObject() and +removeFromCache() functions. The cache is automatically +deleted when the calling thread exits (either normally or via +termination). +

        +    TQThreadStorage<TQCache<SomeClass> *> caches;
        +
        +    void cacheObject( const TQString &key, SomeClass *object )
        +    {
        +        if ( ! caches.hasLocalData() )
        +            caches.setLocalData( new TQCache<SomeClass> );
        +
        +        caches.localData()->insert( key, object );
        +    }
        +
        +    void removeFromCache( const TQString &key )
        +    {
        +        if ( ! caches.hasLocalData() )
        +            return; // nothing to do
        +
        +        caches.localData()->remove( key );
        +    }
        +    
        + +

        Caveats +

        +

          +

        • As noted above, TQThreadStorage can only store pointers due to +compiler limitations. Support for value-based objects will be +added when the majority of compilers are able to support partial +template specialization. +

        • The destructor does not +delete per-thread data. TQThreadStorage only deletes per-thread +data when the thread exits or when setLocalData() is called +multiple times. +

        • TQThreadStorage can only be used with threads started with +TQThread. It cannot be used with threads started with +platform-specific APIs. +

        • As a corollary to the above, platform-specific APIs cannot be +used to exit or terminate a TQThread using TQThreadStorage. Doing so +will cause all per-thread data to be leaked. See TQThread::exit() +and TQThread::terminate(). +

        • TQThreadStorage can be used to store data for the main() +thread after TQApplication has been constructed. TQThreadStorage +deletes all data set for the main() thread when TQApplication is +destroyed, regardless of whether or not the main() thread has +actually finished. +

        • The implementation of TQThreadStorage limits the total number of +TQThreadStorage objects to 256. An unlimited number of threads +can store per-thread data in each TQThreadStorage object. +

        +

        See also Environment Classes and Threading. + +


        Member Function Documentation

        +

        TQThreadStorage::TQThreadStorage () +

        + +

        Constructs a new per-thread data storage object. + +

        TQThreadStorage::~TQThreadStorage () +

        + +

        Destroys the per-thread data storage object. +

        Note: The per-thread data stored is not deleted. Any data left +in TQThreadStorage is leaked. Make sure that all threads using +TQThreadStorage have exited before deleting the TQThreadStorage. +

        See also hasLocalData(). + +

        bool TQThreadStorage::hasLocalData () const +

        + +

        Returns TRUE if the calling thread has non-zero data available; +otherwise returns FALSE. +

        See also localData(). + +

        T & TQThreadStorage::localData () +

        + +

        Returns a reference to the data that was set by the calling +thread. +

        Note: TQThreadStorage can only store pointers. This function +returns a reference to the pointer that was set by the calling +thread. The value of this reference is 0 if no data was set by +the calling thread, +

        See also hasLocalData(). + +

        T TQThreadStorage::localData () const +

        + +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

        Returns a copy of the data that was set by the calling thread. +

        Note: TQThreadStorage can only store pointers. This function +returns a pointer to the data that was set by the calling thread. +If no data was set by the calling thread, this function returns 0. +

        See also hasLocalData(). + +

        void TQThreadStorage::setLocalData ( T data ) +

        + +

        Sets the local data for the calling thread to data. It can be +accessed later using the localData() functions. +

        If data is 0, this function deletes the previous data (if +any) and returns immediately. +

        If data is non-zero, TQThreadStorage takes ownership of the data and deletes it automatically either when the thread exits +(either normally or via termination) or when setLocalData() is +called again. +

        Note: TQThreadStorage can only store pointers. The data +argument must be either a pointer to an object created on the heap +(i.e. using new) or 0. You should not delete data +yourself; TQThreadStorage takes ownership and will delete the data itself. +

        See also localData() and hasLocalData(). + + +


        +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqvaluelist.html b/doc/html/tqvaluelist.html index 72bd00e8a..d9b189a47 100644 --- a/doc/html/tqvaluelist.html +++ b/doc/html/tqvaluelist.html @@ -259,7 +259,7 @@ instance makes a copy and modifies its private copy; therefore it does not affect the other instances; this takes O(n) time. This is often called "copy on write". If a TQValueList is being used in a multi-threaded program, you must protect all access to the list. -See TQMutex. +See TQMutex.

        There are several ways to insert items into the list. The prepend() and append() functions insert items at the beginning and the end of the list respectively. The insert() function comes in diff --git a/doc/html/tqvaluevector.html b/doc/html/tqvaluevector.html index 527ca3a29..6f90c2adc 100644 --- a/doc/html/tqvaluevector.html +++ b/doc/html/tqvaluevector.html @@ -296,7 +296,7 @@ data and one needs to modify its contents, this modifying instance makes a copy and modifies its private copy; it thus does not affect the other instances. This is often called "copy on write". If a TQValueVector is being used in a multi-threaded program, you -must protect all access to the vector. See TQMutex. +must protect all access to the vector. See TQMutex.

        There are several ways to insert elements into the vector. The push_back() function insert elements into the end of the vector, and is usually fastest. The insert() function can be used to add diff --git a/doc/html/tqwaitcondition-h.html b/doc/html/tqwaitcondition-h.html new file mode 100644 index 000000000..0cc7d9cfb --- /dev/null +++ b/doc/html/tqwaitcondition-h.html @@ -0,0 +1,124 @@ + + + + + +tqwaitcondition.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqwaitcondition.h

        + +

        This is the verbatim text of the tqwaitcondition.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


        +
        +/****************************************************************************
        +** $Id: qt/tqwaitcondition.h   3.3.8   edited Jan 11 14:38 $
        +**
        +** Definition of TQWaitCondition class
        +**
        +** Created : 931107
        +**
        +** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
        +**
        +** This file is part of the tools module of the TQt GUI Toolkit.
        +**
        +** This file may be used under the terms of the GNU General Public
        +** License versions 2.0 or 3.0 as published by the Free Software
        +** Foundation and appearing in the file LICENSE.GPL included in the
        +** packaging of this file. Alternatively you may (at your option) use any
        +** later version of the GNU General Public License if such license has
        +** been publicly approved by Trolltech ASA (or its successors, if any)
        +** and the KDE Free TQt Foundation.
        +**
        +** Please review the following information to ensure GNU General
        +** Public Licensing requirements will be met:
        +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        +** If you are unsure which license is appropriate for your use, please
        +** review the following information:
        +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        +** or contact the sales department at sales@trolltech.com.
        +**
        +** This file may be used under the terms of the Q Public License as
        +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        +** included in the packaging of this file.  Licensees holding valid TQt
        +** Commercial licenses may use this file in accordance with the TQt
        +** Commercial License Agreement provided with the Software.
        +**
        +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        +** herein.
        +**
        +**********************************************************************/
        +
        +#ifndef TQWAITCONDITION_H
        +#define TQWAITCONDITION_H
        +
        +#ifndef QT_H
        +#include "ntqglobal.h"
        +#endif // QT_H
        +
        +#if defined(TQT_THREAD_SUPPORT)
        +
        +#include <limits.h>
        +
        +class TQWaitConditionPrivate;
        +class TQMutex;
        +
        +class TQ_EXPORT TQWaitCondition
        +{
        +public:
        +    TQWaitCondition();
        +    virtual ~TQWaitCondition();
        +
        +    // default argument causes thread to block indefinately
        +    bool wait( unsigned long time = ULONG_MAX );
        +    bool wait( TQMutex *mutex, unsigned long time = ULONG_MAX );
        +
        +    void wakeOne();
        +    void wakeAll();
        +
        +private:
        +    TQWaitConditionPrivate * d;
        +
        +#if defined(TQ_DISABLE_COPY)
        +    TQWaitCondition( const TQWaitCondition & );
        +    TQWaitCondition &operator=( const TQWaitCondition & );
        +#endif
        +};
        +
        +#endif
        +
        +#endif
        +
        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqwaitcondition-members.html b/doc/html/tqwaitcondition-members.html new file mode 100644 index 000000000..a3d550c62 --- /dev/null +++ b/doc/html/tqwaitcondition-members.html @@ -0,0 +1,51 @@ + + + + + +TQWaitCondition Member List + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        Complete Member List for TQWaitCondition

        + +

        This is the complete list of member functions for +TQWaitCondition, including inherited members. + +

        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqwaitcondition.html b/doc/html/tqwaitcondition.html new file mode 100644 index 000000000..50a7b6464 --- /dev/null +++ b/doc/html/tqwaitcondition.html @@ -0,0 +1,197 @@ + + + + + +TQWaitCondition Class + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        TQWaitCondition Class Reference

        + +

        The TQWaitCondition class allows waiting/waking for conditions between threads. +More... +

        All the functions in this class are thread-safe when TQt is built with thread support.

        +

        #include <tqwaitcondition.h> +

        List of all member functions. +

        Public Members

        + +

        Detailed Description

        + + + +The TQWaitCondition class allows waiting/waking for conditions between threads. +

        + +

        TQWaitConditions allow a thread to tell other threads that some +sort of condition has been met; one or many threads can block +waiting for a TQWaitCondition to set a condition with wakeOne() or +wakeAll(). Use wakeOne() to wake one randomly selected event or +wakeAll() to wake them all. For example, say we have three tasks +that should be performed every time the user presses a key; each +task could be split into a thread, each of which would have a +run() body like this: +

        +    TQWaitCondition key_pressed;
        +
        +    for (;;) {
        +        key_pressed.wait(); // This is a TQWaitCondition global variable
        +        // Key was pressed, do something interesting
        +        do_something();
        +    }
        +    
        + +

        A fourth thread would read key presses and wake the other three +threads up every time it receives one, like this: +

        +    TQWaitCondition key_pressed;
        +
        +    for (;;) {
        +        getchar();
        +        // Causes any thread in key_pressed.wait() to return from
        +        // that method and continue processing
        +        key_pressed.wakeAll();
        +    }
        +    
        + +

        Note that the order the three threads are woken up in is +undefined, and that if some or all of the threads are still in +do_something() when the key is pressed, they won't be woken up +(since they're not waiting on the condition variable) and so the +task will not be performed for that key press. This can be +avoided by, for example, doing something like this: +

        +    TQMutex mymutex;
        +    TQWaitCondition key_pressed;
        +    int mycount=0;
        +
        +    // Worker thread code
        +    for (;;) {
        +        key_pressed.wait(); // This is a TQWaitCondition global variable
        +        mymutex.lock();
        +        mycount++;
        +        mymutex.unlock();
        +        do_something();
        +        mymutex.lock();
        +        mycount--;
        +        mymutex.unlock();
        +    }
        +
        +    // Key reading thread code
        +    for (;;) {
        +        getchar();
        +        mymutex.lock();
        +        // Sleep until there are no busy worker threads
        +        while( mycount > 0 ) {
        +            mymutex.unlock();
        +            sleep( 1 );
        +            mymutex.lock();
        +        }
        +        mymutex.unlock();
        +        key_pressed.wakeAll();
        +    }
        +    
        + +

        The mutexes are necessary because the results of two threads +attempting to change the value of the same variable simultaneously +are unpredictable. +

        See also Environment Classes and Threading. + +


        Member Function Documentation

        +

        TQWaitCondition::TQWaitCondition () +

        +Constructs a new event signalling, i.e. wait condition, object. + +

        TQWaitCondition::~TQWaitCondition () [virtual] +

        +Deletes the event signalling, i.e. wait condition, object. + +

        bool TQWaitCondition::wait ( unsigned long time = ULONG_MAX ) +

        +Wait on the thread event object. The thread calling this will +block until either of these conditions is met: +
          +
        • Another thread signals it using wakeOne() or wakeAll(). This +function will return TRUE in this case. +
        • time milliseconds has elapsed. If time is ULONG_MAX (the +default), then the wait will never timeout (the event must be +signalled). This function will return FALSE if the wait timed +out. +
        +

        See also wakeOne() and wakeAll(). + +

        bool TQWaitCondition::wait ( TQMutex * mutex, unsigned long time = ULONG_MAX ) +

        +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

        Release the locked mutex and wait on the thread event object. +The mutex must be initially locked by the calling thread. If mutex is not in a locked state, this function returns immediately. +If mutex is a recursive mutex, this function returns +immediately. The mutex will be unlocked, and the calling thread +will block until either of these conditions is met: +

          +
        • Another thread signals it using wakeOne() or wakeAll(). This +function will return TRUE in this case. +
        • time milliseconds has elapsed. If time is ULONG_MAX (the +default), then the wait will never timeout (the event must be +signalled). This function will return FALSE if the wait timed +out. +
        +

        The mutex will be returned to the same locked state. This function +is provided to allow the atomic transition from the locked state +to the wait state. +

        See also wakeOne() and wakeAll(). + +

        void TQWaitCondition::wakeAll () +

        +This wakes all threads waiting on the TQWaitCondition. The order in +which the threads are woken up depends on the operating system's +scheduling policies, and cannot be controlled or predicted. +

        See also wakeOne(). + +

        void TQWaitCondition::wakeOne () +

        +This wakes one thread waiting on the TQWaitCondition. The thread +that is woken up depends on the operating system's scheduling +policies, and cannot be controlled or predicted. +

        See also wakeAll(). + + +


        +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/whatsthis b/doc/html/whatsthis index 0dccd7737..25fe82bc3 100644 --- a/doc/html/whatsthis +++ b/doc/html/whatsthis @@ -18,7 +18,7 @@ Abstraction of Unicode text and the classic C '\0'-terminated char array. | Abstraction of objects which provide formatted data of a certain MIME type. | QMimeSource Abstraction of the classic C zero-terminated char array (char *). | QCString Abstraction used by TQImageDecoder. | TQImageConsumer -Access serialization between threads. | QMutex +Access serialization between threads. | TQMutex Access to a selected area in a QTable. | QTableSelection Access to directory structures and their contents in a platform-independent way. | QDir Access to screen information on multi-head systems. | QDesktopWidget @@ -26,7 +26,7 @@ Access to the platform audio facilities. | QSound Access to the session manager. | QSessionManager Access to the window system clipboard. | QClipboard Acts like a union for the most common TQt data types. | QVariant -Allows waiting/waking for conditions between threads. | QWaitCondition +Allows waiting/waking for conditions between threads. | TQWaitCondition Animated canvas item on a TQCanvas. | TQCanvasSprite Application-global cache for pixmaps. | QPixmapCache Area with movable labelled icons. | TQIconView @@ -255,11 +255,11 @@ Parameters that describe a mouse event. | QMouseEvent Parameters that describe a timer event. | TQTimerEvent Parameters that describe a wheel event. | QWheelEvent Pattern matching using regular expressions. | QRegExp -Per-thread data storage. | QThreadStorage +Per-thread data storage. | TQThreadStorage Persistent platform-independent application settings. | QSettings Pixmaps for TQCanvasSprites. | TQCanvasPixmap Platform-independent low-level socket API. | QSocketDevice -Platform-independent threads. | QThread +Platform-independent threads. | TQThread Polygon on a TQCanvas. | TQCanvasPolygon Polygonal canvas item on a TQCanvas. | TQCanvasPolygonalItem Popup menu widget. | QPopupMenu @@ -286,7 +286,7 @@ Represents text data in the parsed XML document. | TQDomText Request header information for HTTP. | QHttpRequestHeader Response header information for HTTP. | QHttpResponseHeader Rich text browser with hypertext navigation. | TQTextBrowser -Robust integer semaphore. | QSemaphore +Robust integer semaphore. | TQSemaphore Rounded range control (like a speedometer or potentiometer). | QDial SGI/Irix look and feel. | QSGIStyle SQL database error information. | TQSqlError @@ -298,7 +298,7 @@ Simple convenience dialog to get a single value from the user. | QInputDialog Simple description of any widget, i.e. answering the question "What's this?". | QWhatsThis Simple geometry management of its children. | QGrid Simple stored-value drag object for arbitrary MIME data. | QStoredDrag -Simplifies locking and unlocking QMutexes. | QMutexLocker +Simplifies locking and unlocking TQMutexes. | TQMutexLocker Single item in a TQIconView. | TQIconViewItem Small displayable piece of rich text. | QSimpleRichText Spin box widget (spin button). | QSpinBox -- cgit v1.2.3