objects.xml 90 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479
  1. <?xml version="1.0" encoding="ISO8859-1"?>
  2. <fpdoc-descriptions>
  3. <!--
  4. $Id$
  5. This file is part of the FPC documentation.
  6. Copyright (C) 1997, by Michael Van Canneyt
  7. The FPC documentation is free text; you can redistribute it and/or
  8. modify it under the terms of the GNU Library General Public License as
  9. published by the Free Software Foundation; either version 2 of the
  10. License, or (at your option) any later version.
  11. The FPC Documentation is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. Library General Public License for more details.
  15. You should have received a copy of the GNU Library General Public
  16. License along with the FPC documentation; see the file COPYING.LIB. If not,
  17. write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18. Boston, MA 02111-1307, USA.
  19. -->
  20. <package name="rtl">
  21. <module name="objects">
  22. <short>TP-Compatible basic Objects.</short>
  23. <!-- \FPCexampledir{objectex} -->
  24. <descr>
  25. <p>
  26. This document documents the <file>objects</file> unit. The unit was implemented by
  27. many people, and was mainly taken from the FreeVision sources. It has been
  28. ported to all supported platforms.
  29. </p>
  30. <p>
  31. The methods and fields that are in a <var>Private</var> part of an object
  32. declaration have been left out of this documentation.
  33. </p>
  34. </descr>
  35. <element name="stOk">
  36. <short>Stream error codes: No error</short>
  37. </element>
  38. <element name="stError">
  39. <short>Stream error codes: Access error</short>
  40. </element>
  41. <element name="stInitError">
  42. <short>Stream error codes: Initialize error</short>
  43. </element>
  44. <element name="stReadError">
  45. <short>Stream error codes: Stream read error</short>
  46. </element>
  47. <element name="stWriteError">
  48. <short>Stream error codes: Stream write error</short>
  49. </element>
  50. <element name="stGetError">
  51. <short>Stream error codes: Get object error</short>
  52. </element>
  53. <element name="stPutError">
  54. <short>Stream error codes: Put object error</short>
  55. </element>
  56. <element name="stSeekError">
  57. <short>Stream error codes: Seek error in stream</short>
  58. </element>
  59. <element name="stOpenError">
  60. <short>Stream error codes: Error opening stream</short>
  61. </element>
  62. <element name="stCreate">
  63. <short>Stream initialization mode: Create new file</short>
  64. </element>
  65. <element name="stOpenRead">
  66. <short>Stream initialization mode: Read access only</short>
  67. </element>
  68. <element name="stOpenWrite">
  69. <short>Stream initialization mode: Write access only</short>
  70. </element>
  71. <element name="stOpen">
  72. <short>Stream initialization mode: Read/write access</short>
  73. </element>
  74. <element name="coIndexError">
  75. <short>Collection list error: Index out of range</short>
  76. </element>
  77. <element name="coOverflow">
  78. <short>Collection list error: Overflow</short>
  79. </element>
  80. <element name="MaxBytes">
  81. <short>Maximum data size (in bytes)</short>
  82. </element>
  83. <element name="MaxWords">
  84. <short>Maximum data size (in words)</short>
  85. </element>
  86. <element name="MaxPtrs">
  87. <short>Maximum data size (in pointers)</short>
  88. </element>
  89. <element name="MaxReadBytes">
  90. <short>Maximum data that can be read from a stream (not used)</short>
  91. </element>
  92. <element name="MaxCollectionSize">
  93. <short>Maximum collection size (in items)</short>
  94. </element>
  95. <element name="DefaulTPCompatible">
  96. <short>Is the default stream content TP compatible</short>
  97. <descr>
  98. This variable determines whether the default stream is filled or read in a
  99. TP compatible way. The <var>TPCompatible</var> field can be set on a
  100. per-stream basis, and is initialized with the <var>DefaulTPCompatible</var>
  101. value.
  102. </descr>
  103. </element>
  104. <element name="RCollection">
  105. <short>Default stream record for the <link id="TCollection"/> object.</short>
  106. </element>
  107. <element name="RStrCollection">
  108. <short>Default stream record for the <link id="TStrCollection"/> object.</short>
  109. </element>
  110. <element name="RStringCollection">
  111. <short>Default stream record for the <link id="TStringCollection"/> object.</short>
  112. </element>
  113. <element name="RStringList">
  114. <short>Default stream record for the <link id="TStringList"/> object.</short>
  115. </element>
  116. <element name="RStrListMaker">
  117. <short>Default stream record for the <link id="TStrListMaker"/> object.</short>
  118. </element>
  119. <element name="StreamError">
  120. <short>Pointer to default stream error handler.</short>
  121. </element>
  122. <element name="vmtHeaderSize">
  123. <short>Size of the VMT header in an object (not used).</short>
  124. </element>
  125. <element name="MaxTPCompatibleCollectionSize">
  126. <short>Maximum collection size (in items, same value as in TP)</short>
  127. </element>
  128. <element name="TCharSet">
  129. <short>Generic set of characters type.</short>
  130. </element>
  131. <element name="PCharSet">
  132. <short>Pointer to <link id="TCharSet"/>.</short>
  133. </element>
  134. <element name="TByteArray">
  135. <short>Array with maxmimum allowed number of bytes.</short>
  136. </element>
  137. <element name="PByteArray">
  138. <short>Pointer to <link id="TByteArray"/></short>
  139. </element>
  140. <element name="TWordArray">
  141. <short>Array with maxmimum allowed number of words.</short>
  142. </element>
  143. <element name="PWordArray">
  144. <short>Pointer to <link id="TWordArray"/></short>
  145. </element>
  146. <element name="TPointerArray">
  147. <short>Array with maxmimum allowed number of pointers</short>
  148. </element>
  149. <element name="PPointerArray">
  150. <short>Pointer to <link id="TPointerArray"/></short>
  151. </element>
  152. <element name="PString">
  153. <short>Pointer to a shortstring.</short>
  154. </element>
  155. <element name="AsciiZ">
  156. <short>Filename - null terminated array of characters.</short>
  157. </element>
  158. <element name="FNameStr">
  159. <short>Filename - shortstring version.</short>
  160. </element>
  161. <element name="Sw_Word">
  162. <short>Alias for Cardinal</short>
  163. </element>
  164. <element name="Sw_Integer">
  165. <short>Alias for longint</short>
  166. </element>
  167. <element name="WordRec">
  168. <short>Record describing a Word (in bytes)</short>
  169. </element>
  170. <element name="WordRec.Hi">
  171. <short>High byte of a word</short>
  172. </element>
  173. <element name="WordRec.Lo">
  174. <short>Low byte of a word</short>
  175. </element>
  176. <element name="LongRec">
  177. <short>Record describing a longint (in Words)</short>
  178. </element>
  179. <element name="LongRec.Lo">
  180. <short>Lower word of longint</short>
  181. </element>
  182. <element name="LongRec.Hi">
  183. <short>High word of longint</short>
  184. </element>
  185. <element name="PtrRec">
  186. <short>Record describing a pointer to a memory location.</short>
  187. </element>
  188. <element name="PtrRec.Ofs">
  189. <short>Pointer offset</short>
  190. </element>
  191. <element name="PtrRec.Seg">
  192. <short>Pointer segment</short>
  193. </element>
  194. <element name="PStreamRec">
  195. <short>Pointer to <link id="TStreamRec"/></short>
  196. </element>
  197. <element name="TStreamRec">
  198. <short>Record used in streaming mechanism. </short>
  199. <descr>
  200. <var>TSreamRec</var> is used by the <file>Objects</file> unit streaming
  201. mechanism: when an object is registered, a <var>TStreamRec</var> record is
  202. added to a list of records. This list is used when objects need to be
  203. streamed from/streamed to a stream. It contains all the information needed
  204. to stream the object.
  205. </descr>
  206. </element>
  207. <element name="TStreamRec.ObjType">
  208. <short>Unique identifier for this object type.</short>
  209. </element>
  210. <element name="TStreamRec.VmtLink">
  211. <short>Pointer to object VMT</short>
  212. </element>
  213. <element name="TStreamRec.Load">
  214. <short>Procedure to call when object must be loaded from a stream</short>
  215. </element>
  216. <element name="TStreamRec.Store">
  217. <short>Procedure to call when object must be stored in a stream.</short>
  218. </element>
  219. <element name="TStreamRec.Next">
  220. <short>Next item in list</short>
  221. </element>
  222. <element name="PPoint">
  223. <short>Pointer to <link id="TPoint"/> record.</short>
  224. </element>
  225. <element name="TPoint">
  226. <short>Record describing a point in a 2 dimensional plane.</short>
  227. </element>
  228. <element name="TPoint.X">
  229. <short>X coordinate</short>
  230. </element>
  231. <element name="TPoint.Y">
  232. <short>Y coordinate</short>
  233. </element>
  234. <element name="TItemList">
  235. <short>Pointer array type used in a <link id="TCollection"/></short>
  236. </element>
  237. <element name="TStrIndex">
  238. <short>Pointer array type used in a <link id="TStringList"/></short>
  239. </element>
  240. <element name="TStrIndexRec">
  241. <short>Record type used in a <link id="TStringList"/> to store the strings</short>
  242. </element>
  243. <element name="TStrIndexRec.Key">
  244. <short>String key value</short>
  245. </element>
  246. <element name="TStrIndexRec.Count">
  247. <short>String character count</short>
  248. </element>
  249. <element name="TStrIndexRec.Offset">
  250. <short>String offset in stream</short>
  251. </element>
  252. <element name="NewStr">
  253. <short>Allocate a copy of a shortstring on the heap.</short>
  254. <descr>
  255. <p>
  256. <var>NewStr</var> makes a copy of the string <var>S</var> on the heap,
  257. and returns a pointer to this copy. If the string is empty then
  258. <var>Nil</var> is returned.
  259. </p>
  260. <p>
  261. The allocated memory is not based on the declared size of the string passed
  262. to <var>NewStr</var>, but is baed on the actual length of the string.
  263. </p>
  264. </descr>
  265. <errors>
  266. If not enough memory is available, an 'out of memory' error will occur.
  267. </errors>
  268. <seealso>
  269. <link id="DisposeStr"/>
  270. <link id="SetStr"/>
  271. </seealso>
  272. <example file="objectex/ex40"/>
  273. </element>
  274. <element name="SetStr">
  275. <short>Allocate a copy of a shortstring on the heap.</short>
  276. <descr>
  277. <p>
  278. <var>SetStr</var> makes a copy of the string <var>S</var> on the heap and
  279. returns the pointer to this copy in <var>P</var>. If <var>P</var> pointed to
  280. another string (i.e. was not <var>Nil</var>, the memory is released first.
  281. Contrary to <link id="NewStr"/>, if the string is empty then a pointer to
  282. an empty string is returned.
  283. </p>
  284. <p>
  285. The allocated memory is not based on the declared size of the string passed
  286. to <var>NewStr</var>, but is based on the actual length of the string.
  287. </p>
  288. </descr>
  289. <errors>
  290. If not enough memory is available, an 'out of memory' error will occur.
  291. </errors>
  292. <seealso>
  293. <link id="DisposeStr"/>
  294. <link id="NewStr"/>
  295. </seealso>
  296. </element>
  297. <element name="DisposeStr">
  298. <short>Dispose of a shortstring which was allocated on the heap.</short>
  299. <descr>
  300. <p>
  301. <var>DisposeStr</var> removes a dynamically allocated string from the heap.
  302. </p>
  303. <p>
  304. For an example, see <link id="NewStr"/>.
  305. </p>
  306. </descr>
  307. <errors>
  308. None.
  309. </errors>
  310. <seealso>
  311. <link id="NewStr"/>
  312. <link id="SetStr"/>
  313. </seealso>
  314. </element>
  315. <element name="Abstract">
  316. <short>Abstract error handler.</short>
  317. <descr>
  318. <p>
  319. When implementing abstract methods, do not declare them as <var>abstract</var>.
  320. Instead, define them simply as <var>virtual</var>. In the implementation of such
  321. abstract methods, call the <var>Abstract</var> procedure. This allows explicit
  322. control of what happens when an abstract method is called.
  323. </p>
  324. <p>
  325. The current implementation of <var>Abstract</var> terminates the program with
  326. a run-time error 211.
  327. </p>
  328. </descr>
  329. <errors>
  330. None.
  331. </errors>
  332. </element>
  333. <element name="RegisterObjects">
  334. <short>Register standard objects.</short>
  335. <descr>
  336. <p>
  337. <var>RegisterObjects</var> registers the following objects for streaming:
  338. </p>
  339. <ol>
  340. <li> <var>TCollection</var>, see <link id="TCollection"/>.</li>
  341. <li> <var>TStringCollection</var>, see <link id="TStringCollection"/>.</li>
  342. <li> <var>TStrCollection</var>, see <link id="TStrCollection"/>.</li>
  343. </ol>
  344. </descr>
  345. <errors>
  346. None.
  347. </errors>
  348. <seealso>
  349. <link id="RegisterType"/>
  350. </seealso>
  351. </element>
  352. <element name="RegisterType">
  353. <short>Register new object for streaming.</short>
  354. <descr>
  355. <p>
  356. <var>RegisterType</var> registers a new type for streaming. An object cannot
  357. be streamed unless it has been registered first.
  358. The stream record <var>S</var> needs to have the following fields set:
  359. </p>
  360. <dl>
  361. <dt>ObjType: Sw_Word</dt>
  362. <dd> This should be a unique identifier. Each possible
  363. type should have it's own identifier.
  364. </dd>
  365. <dt>VmtLink: pointer</dt>
  366. <dd>This should contain a pointer to the VMT (Virtual
  367. Method Table) of the object you try to register.
  368. </dd>
  369. <dt>Load : Pointer</dt>
  370. <dd> is a pointer to a method that initializes an instance
  371. of that object, and reads the initial values from a stream. This method
  372. should accept as it's sole argument a <var>PStream</var> type variable.
  373. </dd>
  374. <dt>Store: Pointer</dt>
  375. <dd>is a pointer to a method that stores an instance of the
  376. object to a stream. This method should accept as it's sole argument
  377. a <var>PStream</var> type variable.
  378. </dd>
  379. </dl>
  380. <p>
  381. The VMT of the object can be retrieved with the
  382. following expression:
  383. </p>
  384. <code>
  385. VmtLink: Ofs(TypeOf(MyType)^);
  386. </code>
  387. </descr>
  388. <errors>
  389. In case of error (if a object with the same <var>ObjType</var>) is already
  390. registered), run-time error 212 occurs.
  391. </errors>
  392. <example file="objectex/myobject"/>
  393. </element>
  394. <element name="LongMul">
  395. <short>Overflow safe multiply.</short>
  396. <descr>
  397. <var>LongMul</var> multiplies <var>X</var> with <var>Y</var>. The result is of
  398. type <var>Longint</var>. This avoids possible overflow errors you would normally
  399. get when multiplying <var>X</var> and <var>Y</var> that are too big.
  400. </descr>
  401. <errors>
  402. None.
  403. </errors>
  404. <seealso>
  405. <link id="LongDiv"/>
  406. </seealso>
  407. </element>
  408. <element name="LongDiv">
  409. <short>Overflow safe divide</short>
  410. <descr>
  411. <var>LongDiv</var> divides <var>X</var> by <var>Y</var>. The result is of
  412. type <var>Integer</var> instead of type <var>Longint</var>, as you would get
  413. normally.
  414. </descr>
  415. <errors>
  416. If Y is zero, a run-time error will be generated.
  417. </errors>
  418. <seealso>
  419. <link id="LongMul"/>
  420. </seealso>
  421. </element>
  422. <element name="TRect">
  423. <short>Describes a rectangular region in a plane.</short>
  424. </element>
  425. <element name="TRect.A">
  426. <short>Top left corner of rectangle</short>
  427. </element>
  428. <element name="TRect.B">
  429. <short>Bottom right corner of rectangle</short>
  430. </element>
  431. <element name="TRect.Empty">
  432. <short>Is the surface of the rectangle zero</short>
  433. <descr>
  434. <var>Empty</var> returns <var>True</var> if the rectangle defined by the corner points
  435. <var>A</var>, <var>B</var> has zero or negative surface.
  436. </descr>
  437. <errors>
  438. None.
  439. </errors>
  440. <seealso>
  441. <link id="TRect.Equals"/>
  442. <link id="TRect.Contains"/>
  443. </seealso>
  444. <example file="objectex/ex1"/>
  445. </element>
  446. <element name="TRect.Equals">
  447. <short>Do the corners of the rectangles match</short>
  448. <descr>
  449. <p>
  450. <var>Equals</var> returns <var>True</var> if the rectangle has the
  451. same corner points <var>A,B</var> as the rectangle R, and <var>False</var>
  452. otherwise.
  453. </p>
  454. <p>
  455. For an example, see <link id="TRect.Empty"/>
  456. </p>
  457. </descr>
  458. <errors>
  459. None.
  460. </errors>
  461. <seealso>
  462. <link id="TRect.Empty"/>
  463. <link id="TRect.Contains"/>
  464. </seealso>
  465. </element>
  466. <element name="TRect.Contains">
  467. <short>Determine if a point is inside the rectangle</short>
  468. <descr>
  469. <var>Contains</var> returns <var>True</var> if the point <var>P</var> is contained
  470. in the rectangle (including borders), <var>False</var> otherwise.
  471. </descr>
  472. <errors>
  473. None.
  474. </errors>
  475. <seealso>
  476. <link id="TRect.Intersect"/>
  477. <link id="TRect.Equals"/>
  478. </seealso>
  479. </element>
  480. <element name="TRect.Copy">
  481. <short>Copy cornerpoints from another rectangle.</short>
  482. <descr>
  483. Assigns the rectangle R to the object. After the call to <var>Copy</var>, the
  484. rectangle R has been copied to the object that invoked <var>Copy</var>.
  485. </descr>
  486. <errors>
  487. None.
  488. </errors>
  489. <seealso>
  490. <link id="TRect.Assign"/>
  491. </seealso>
  492. <example file="objectex/ex2"/>
  493. </element>
  494. <element name="TRect.Union">
  495. <short>Enlarges rectangle to encompas another rectangle.</short>
  496. <descr>
  497. <var>Union</var> enlarges the current rectangle so that it becomes the union
  498. of the current rectangle with the rectangle <var>R</var>.
  499. </descr>
  500. <errors>
  501. None.
  502. </errors>
  503. <seealso>
  504. <link id="TRect.Intersect"/>
  505. </seealso>
  506. <example file="objectex/ex3"/>
  507. </element>
  508. <element name="TRect.Intersect">
  509. <short>Reduce rectangle to intersection with another rectangle</short>
  510. <descr>
  511. <var>Intersect</var> makes the intersection of the current rectangle with
  512. <var>R</var>. If the intersection is empty, then the rectangle is set to the empty
  513. rectangle at coordinate (0,0).
  514. </descr>
  515. <errors>
  516. None.
  517. </errors>
  518. <seealso>
  519. <link id="TRect.Union"/>
  520. </seealso>
  521. <example file="objectex/ex4"/>
  522. </element>
  523. <element name="TRect.Move">
  524. <short>Move rectangle along a vector.</short>
  525. <descr>
  526. <var>Move</var> moves the current rectangle along a vector with components
  527. <var>(ADX,ADY)</var>. It adds <var>ADX</var> to the X-coordinate of both corner
  528. points, and <var>ADY</var> to both end points.
  529. </descr>
  530. <errors>
  531. None.
  532. </errors>
  533. <seealso>
  534. <link id="TRect.Grow"/>
  535. </seealso>
  536. <example file="objectex/ex5"/>
  537. </element>
  538. <element name="TRect.Grow">
  539. <short>Expand rectangle with certain size.</short>
  540. <descr>
  541. <p>
  542. <var>Grow</var> expands the rectangle with an amount <var>ADX</var> in the <var>X</var>
  543. direction (both on the left and right side of the rectangle, thus adding a
  544. length 2*ADX to the width of the rectangle), and an amount <var>ADY</var> in
  545. the <var>Y</var> direction (both on the top and the bottom side of the rectangle,
  546. adding a length 2*ADY to the height of the rectangle.
  547. </p>
  548. <p>
  549. <var>ADX</var> and <var>ADY</var> can be negative. If the resulting rectangle is empty, it is set
  550. to the empty rectangle at <var>(0,0)</var>.
  551. </p>
  552. </descr>
  553. <errors>
  554. None.
  555. </errors>
  556. <seealso>
  557. <link id="TRect.Move"/>
  558. </seealso>
  559. <example file="objectex/ex6"/>
  560. </element>
  561. <element name="TRect.Assign">
  562. <short>Set rectangle corners.</short>
  563. <descr>
  564. <p>
  565. <var>Assign</var> sets the corner points of the rectangle to <var>(XA,YA)</var> and
  566. <var>(Xb,Yb)</var>.
  567. </p>
  568. <p>
  569. For an example, see <link id="TRect.Copy"/>.
  570. </p>
  571. </descr>
  572. <errors>
  573. None.
  574. </errors>
  575. <seealso>
  576. <link id="TRect.Copy"/>
  577. </seealso>
  578. </element>
  579. <element name="TObject">
  580. <short>Basis of all objects</short>
  581. <descr>
  582. This type serves as the basic object for all other objects in the
  583. <file>Objects</file> unit.
  584. </descr>
  585. </element>
  586. <element name="TObject.Init">
  587. <short>Construct (initialize) a new object</short>
  588. <descr>
  589. <p>
  590. Instantiates a new object of type <var>TObject</var>. It fills the instance up
  591. with Zero bytes.
  592. </p>
  593. <p>
  594. For an example, see <link id="TObject.Free">Free</link>
  595. </p>
  596. </descr>
  597. <errors>
  598. None.
  599. </errors>
  600. <seealso>
  601. <link id="TObject.Free"/>
  602. <link id="TObject.Done"/>
  603. </seealso>
  604. </element>
  605. <element name="TObject.Free">
  606. <short>Destroy an object and release all memory.</short>
  607. <descr>
  608. <var>Free</var> calls the destructor of the object, and releases the memory
  609. occupied by the instance of the object.
  610. </descr>
  611. <errors>
  612. No checking is performed to see whether <var>self</var> is <var>nil</var> and whether
  613. the object is indeed allocated on the heap.
  614. </errors>
  615. <seealso>
  616. <link id="TObject.Init"/>
  617. <link id="TObject.Done"/>
  618. </seealso>
  619. <example file="objectex/ex7"/>
  620. </element>
  621. <element name="TObject.Done">
  622. <short>Destroy an object.</short>
  623. <descr>
  624. <p>
  625. <var>Done</var>, the destructor of <var>TObject</var> does nothing. It is mainly
  626. intended to be used in the <link id="TObject.Free"/> method.
  627. </p>
  628. <p>
  629. The destructore Done does not free the memory occupied by the object.
  630. </p>
  631. </descr>
  632. <errors>
  633. None.
  634. </errors>
  635. <seealso>
  636. <link id="TObject.Free"/>
  637. <link id="TObject.Init"/>
  638. </seealso>
  639. <example file="objectex/ex8"/>
  640. </element>
  641. <element name="TObject.Is_Object">
  642. <short>Check whether a pointer points to an object.</short>
  643. <descr>
  644. <var>Is_Object</var> returns <var>True</var> if the pointer <var>P</var>
  645. points to an instance of a <var>TObject</var> descendent, it returns
  646. <var>false</var> otherwise.
  647. </descr>
  648. </element>
  649. <element name="TStream">
  650. <short>Base stream class</short>
  651. <descr>
  652. <p>
  653. The <var>TStream</var> object is the ancestor for all streaming objects, i.e.
  654. objects that have the capability to store and retrieve data.
  655. </p>
  656. <p>
  657. It defines a number of methods that are common to all objects that implement
  658. streaming, many of them are virtual, and are only implemented in the
  659. descendent types.
  660. </p>
  661. <p>
  662. Programs should not instantiate objects of type TStream directly, but
  663. instead instantiate a descendant type, such as <var>TDosStream</var>,
  664. <var>TMemoryStream</var>.
  665. </p>
  666. </descr>
  667. <seealso>
  668. <link id="PStream"/>
  669. <link id="TDosStream"/>
  670. <link id="TMemoryStream"/>
  671. </seealso>
  672. </element>
  673. <element name="PStream">
  674. <short>Pointer type to <link id="TStream"/></short>
  675. </element>
  676. <element name="TStream.Init">
  677. <short>Constructor for TStream instance</short>
  678. <descr>
  679. <var>Init</var> initializes a TStream instance. Descendent streams should
  680. always call the inherited <var>Init</var>.
  681. </descr>
  682. </element>
  683. <element name="TStream.Status">
  684. <short>Current stream status</short>
  685. </element>
  686. <element name="TStream.ErrorInfo">
  687. <short>Additional error info when there is an error.</short>
  688. </element>
  689. <element name="TStream.StreamSize">
  690. <short>Current size of the stream</short>
  691. </element>
  692. <element name="TStream.Position">
  693. <short>Current Stream position</short>
  694. </element>
  695. <element name="TStream.TPCompatible">
  696. <short>If set to <var>True</var> streamed data is written in a TP compatible format.</short>
  697. </element>
  698. <element name="TStream.Get">
  699. <short>Read an object definition from the stream.</short>
  700. <descr>
  701. <var>Get</var> reads an object definition from a stream, and returns
  702. a pointer to an instance of this object.
  703. </descr>
  704. <errors>
  705. On error, <link id="TStream.Status"/> is set, and <var>NIL</var> is returned.
  706. </errors>
  707. <seealso>
  708. <link id="TStream.Put"/>
  709. </seealso>
  710. <example file="objectex/ex9"/>
  711. </element>
  712. <element name="TStream.StrRead">
  713. <short>Read a null-terminated string from the stream.</short>
  714. <descr>
  715. <var>StrRead</var> reads a string from the stream, allocates memory
  716. for it, and returns a pointer to a null-terminated copy of the string
  717. on the heap.
  718. </descr>
  719. <errors>
  720. On error, <var>Nil</var> is returned.
  721. </errors>
  722. <seealso>
  723. <link id="TStream.StrWrite"/>
  724. <link id="TStream.ReadStr"/>
  725. </seealso>
  726. <example file="objectex/ex10"/>
  727. </element>
  728. <element name="TStream.GetPos">
  729. <short>Return current position in the stream</short>
  730. <descr>
  731. If the stream's status is <var>stOk</var>, <var>GetPos</var> returns the current
  732. position in the stream. Otherwise it returns <var>-1</var>
  733. </descr>
  734. <errors>
  735. <var>-1</var> is returned if the status is an error condition.
  736. </errors>
  737. <seealso>
  738. <link id="TStream.Seek"/>
  739. <link id="TStream.GetSize"/>
  740. </seealso>
  741. <example file="objectex/ex11"/>
  742. </element>
  743. <element name="TStream.GetSize">
  744. <short>Return the size of the stream.</short>
  745. <descr>
  746. If the stream's status is <var>stOk</var> then <var>GetSize</var> returns
  747. the size of the stream, otherwise it returns <var>-1</var>.
  748. </descr>
  749. <errors>
  750. <var>-1</var> is returned if the status is an error condition.
  751. </errors>
  752. <seealso>
  753. <link id="TStream.Seek"/>
  754. <link id="TStream.GetPos"/>
  755. </seealso>
  756. <example file="objectex/ex12"/>
  757. </element>
  758. <element name="TStream.ReadStr">
  759. <short>Read a shortstring from the stream.</short>
  760. <descr>
  761. <var>ReadStr</var> reads a string from the stream, copies it to the heap
  762. and returns a pointer to this copy. The string is saved as a pascal
  763. string, and hence is NOT null terminated.
  764. </descr>
  765. <errors>
  766. On error (e.g. not enough memory), <var>Nil</var> is returned.
  767. </errors>
  768. <seealso>
  769. <link id="TStream.StrRead"/>
  770. </seealso>
  771. <example file="objectex/ex13"/>
  772. </element>
  773. <element name="TStream.Open">
  774. <short>Open the stream</short>
  775. <descr>
  776. <p>
  777. <var>Open</var> is an abstract method, that should be overridden by descendent
  778. objects. Since opening a stream depends on the stream's type this is not
  779. surprising.
  780. </p>
  781. <p>
  782. For an example, see <link id="TDosStream.Open"/>.
  783. </p>
  784. </descr>
  785. <errors>
  786. None.
  787. </errors>
  788. <seealso>
  789. <link id="TStream.Close"/>
  790. <link id="TStream.Reset"/>
  791. </seealso>
  792. </element>
  793. <element name="TStream.Close">
  794. <short>Close the stream</short>
  795. <descr>
  796. <p>
  797. <var>Close</var> is an abstract method, that should be overridden by descendent
  798. objects. Since Closing a stream depends on the stream's type this is not
  799. surprising.
  800. </p>
  801. <p>
  802. for an example, see <link id="TDosStream.Open"/>.
  803. </p>
  804. </descr>
  805. <errors>
  806. None.
  807. </errors>
  808. <seealso>
  809. <link id="TStream.Open"/>
  810. <link id="TStream.Reset"/>
  811. </seealso>
  812. </element>
  813. <element name="TStream.Reset">
  814. <short>Reset the stream</short>
  815. <descr>
  816. <var>Reset</var> sets the stream's status to <var>0</var>, as well as the ErrorInfo
  817. </descr>
  818. <errors>
  819. None.
  820. </errors>
  821. <seealso>
  822. <link id="TStream.Open"/>
  823. <link id="TStream.Close"/>
  824. </seealso>
  825. </element>
  826. <element name="TStream.Flush">
  827. <short>Flush the stream data from the buffer, if any.</short>
  828. <descr>
  829. <p>
  830. <var>Flush</var> is an abstract method that should be overridden by descendent
  831. objects. It serves to enable the programmer to tell streams that implement
  832. a buffer to clear the buffer.
  833. </p>
  834. <p>
  835. for an example, see <link id="TBufStream.Flush"/>.
  836. </p>
  837. </descr>
  838. <errors>
  839. None.
  840. </errors>
  841. <seealso>
  842. <link id="TStream.Truncate"/>
  843. </seealso>
  844. </element>
  845. <element name="TStream.Truncate">
  846. <short>Truncate the stream size on current position.</short>
  847. <descr>
  848. <p>
  849. <var>Truncate</var> is an abstract procedure that should be overridden by
  850. descendent objects. It serves to enable the programmer to truncate the
  851. size of the stream to the current file position.
  852. </p>
  853. <p>
  854. For an example, see <link id="TDosStream.Truncate"/>.
  855. </p>
  856. </descr>
  857. <errors>
  858. None.
  859. </errors>
  860. <seealso>
  861. <link id="TStream.Seek"/>
  862. </seealso>
  863. </element>
  864. <element name="TStream.Put">
  865. <short>Write an object to the stream.</short>
  866. <descr>
  867. <p>
  868. <var>Put</var> writes the object pointed to by <var>P</var>. <var>P</var> should be
  869. non-nil. The object type must have been registered with <link id="RegisterType"/>.
  870. </p>
  871. <p>
  872. After the object has been written, it can be read again with <link id="TStream.Get">Get</link>.
  873. </p>
  874. <p>
  875. For an example, see <link id="TStream.Get"/>;
  876. </p>
  877. </descr>
  878. <errors>
  879. No check is done whether P is <var>Nil</var> or not. Passing <var>Nil</var> will cause
  880. a run-time error 216 to be generated. If the object has not been registered,
  881. the status of the stream will be set to <var>stPutError</var>.
  882. </errors>
  883. <seealso>
  884. <link id="TStream.Get"/>
  885. </seealso>
  886. </element>
  887. <element name="TStream.StrWrite">
  888. <short>Write a null-terminated string to the stream.</short>
  889. <descr>
  890. <p>
  891. <var>StrWrite</var> writes the null-terminated string <var>P</var> to the stream.
  892. <var>P</var> can only be 65355 bytes long.
  893. </p>
  894. <p>
  895. For an example, see <link id="TStream.StrRead"/>.
  896. </p>
  897. </descr>
  898. <errors>
  899. None.
  900. </errors>
  901. <seealso>
  902. <link id="TStream.WriteStr"/>
  903. <link id="TStream.StrRead"/>
  904. <link id="TStream.ReadStr"/>
  905. </seealso>
  906. </element>
  907. <element name="TStream.WriteStr">
  908. <short>Write a pascal string to the stream.</short>
  909. <descr>
  910. <p>
  911. <var>StrWrite</var> writes the pascal string pointed to by <var>P</var> to the stream.
  912. </p>
  913. <p>
  914. For an example, see <link id="TStream.ReadStr"/>.
  915. </p>
  916. </descr>
  917. <errors>
  918. None.
  919. </errors>
  920. <seealso>
  921. <link id="TStream.StrWrite"/>
  922. <link id="TStream.StrRead"/>
  923. <link id="TStream.ReadStr"/>
  924. </seealso>
  925. </element>
  926. <element name="TStream.Seek">
  927. <short>Set stream position.</short>
  928. <descr>
  929. <p>
  930. Seek sets the position to <var>Pos</var>. This position is counted
  931. from the beginning, and is zero based. (i.e. seeek(0) sets the position
  932. pointer on the first byte of the stream)
  933. </p>
  934. <p>
  935. For an example, see <link id="TDosStream.Seek"/>.
  936. </p>
  937. </descr>
  938. <errors>
  939. If <var>Pos</var> is larger than the stream size, <var>Status</var> is set to
  940. <var>StSeekError</var>.
  941. </errors>
  942. <seealso>
  943. <link id="TStream.GetPos"/>
  944. <link id="TStream.GetSize"/>
  945. </seealso>
  946. </element>
  947. <element name="TStream.Error">
  948. <short>Set stream status</short>
  949. <descr>
  950. <p>
  951. <var>Error</var> sets the stream's status to <var>Code</var> and <var>ErrorInfo</var>
  952. to <var>Info</var>. If the <var>StreamError</var> procedural variable is set,
  953. <var>Error</var> executes it, passing <var>Self</var> as an argument.
  954. </p>
  955. <p>
  956. This method should not be called directly from a program. It is intended to
  957. be used in descendent objects.
  958. </p>
  959. </descr>
  960. <errors>
  961. None.
  962. </errors>
  963. </element>
  964. <element name="TStream.Read">
  965. <short>Read data from stream to buffer.</short>
  966. <descr>
  967. <p>
  968. <var>Read</var> is an abstract method that should be overridden by descendent
  969. objects.
  970. </p>
  971. <p>
  972. <var>Read</var> reads <var>Count</var> bytes from the stream into <var>Buf</var>.
  973. It updates the position pointer, increasing it's value with <var>Count</var>.
  974. <var>Buf</var> must be large enough to contain <var>Count</var> bytes.
  975. </p>
  976. </descr>
  977. <errors>
  978. No checking is done to see if <var>Buf</var> is large enough to contain
  979. <var>Count</var> bytes.
  980. </errors>
  981. <seealso>
  982. <link id="TStream.Write"/>
  983. <link id="TStream.ReadStr"/>
  984. <link id="TStream.StrRead"/>
  985. </seealso>
  986. <example file="objectex/ex18"/>
  987. </element>
  988. <element name="TStream.Write">
  989. <short>Write a number of bytes to the stream.</short>
  990. <descr>
  991. <p>
  992. <var>Write</var> is an abstract method that should be overridden by descendent
  993. objects.
  994. </p>
  995. <p>
  996. <var>Write</var> writes <var>Count</var> bytes to the stream from <var>Buf</var>.
  997. It updates the position pointer, increasing it's value with <var>Count</var>.
  998. </p>
  999. <p>
  1000. For an example, see <link id="TStream.Read"/>.
  1001. </p>
  1002. </descr>
  1003. <errors>
  1004. No checking is done to see if <var>Buf</var> actually contains <var>Count</var> bytes.
  1005. </errors>
  1006. <seealso>
  1007. <link id="TStream.Read"/>
  1008. <link id="TStream.WriteStr"/>
  1009. <link id="TStream.StrWrite"/>
  1010. </seealso>
  1011. </element>
  1012. <element name="TStream.CopyFrom">
  1013. <short>Copy data from another stream. </short>
  1014. <descr>
  1015. <var>CopyFrom</var> reads Count bytes from stream <var>S</var> and stores them
  1016. in the current stream. It uses the <link id="TStream.Read">Read</link> method
  1017. to read the data, and the <link id="TStream.Write">Write</link> method to
  1018. write in the current stream.
  1019. </descr>
  1020. <errors>
  1021. None.
  1022. </errors>
  1023. <seealso>
  1024. <link id="TStream.Read">Read</link>
  1025. <link id="TStream.Write">Write</link>
  1026. </seealso>
  1027. <example file="objectex/ex19"/>
  1028. </element>
  1029. <element name="TDosStream">
  1030. <short>DOS file stream</short>
  1031. <descr>
  1032. <p>
  1033. <var>TDosStream</var> is a stream that stores it's contents in a file.
  1034. it overrides a couple of methods of <link id="TStream"/> for this.
  1035. </p>
  1036. <p>
  1037. In addition to the fields inherited from <var>TStream</var> (see <link id="TStream"/>),
  1038. there are some extra fields, that describe the file. (mainly the name and
  1039. the OS file handle)
  1040. </p>
  1041. <p>
  1042. No buffering in memory is done when using <var>TDosStream</var>.
  1043. All data are written directly to the file. For a stream that buffers
  1044. in memory, see <link id="TBufStream"/>.
  1045. </p>
  1046. </descr>
  1047. </element>
  1048. <element name="TDosStream.Handle">
  1049. <short>OS file handle for stream</short>
  1050. </element>
  1051. <element name="TDosStream.FName">
  1052. <short>File name</short>
  1053. </element>
  1054. <element name="TDosStream.Init">
  1055. <short>Instantiate a new instance of TDosStream.</short>
  1056. <descr>
  1057. <p>
  1058. <var>Init</var> instantiates an instance of <var>TDosStream</var>. The name of the
  1059. file that contains (or will contain) the data of the stream is given in
  1060. <var>FileName</var>. The <var>Mode</var> parameter determines whether a new file
  1061. should be created and what access rights you have on the file.
  1062. It can be one of the following constants:
  1063. </p>
  1064. <dl>
  1065. <dt>stCreate</dt><dd> Creates a new file.</dd>
  1066. <dt>stOpenRead</dt><dd> Read access only.</dd>
  1067. <dt>stOpenWrite</dt><dd> Write access only.</dd>
  1068. <dt>stOpen</dt><dd> Read and write access.</dd>
  1069. </dl>
  1070. <p>
  1071. For an example, see <link id="TDosStream.Truncate"/>.
  1072. </p>
  1073. </descr>
  1074. <errors>
  1075. On error, <link id="TStream.Status">Status</link> is set to <var>stInitError</var>, and <var>ErrorInfo</var>
  1076. is set to the dos error code.
  1077. </errors>
  1078. <seealso>
  1079. <link id="TDosStream.Done"/>
  1080. </seealso>
  1081. </element>
  1082. <element name="TDosStream.Done">
  1083. <short>Closes the file and cleans up the instance.</short>
  1084. <descr>
  1085. <p>
  1086. <var>Done</var> closes the file if it was open and cleans up the
  1087. instance of <var>TDosStream</var>.
  1088. </p>
  1089. <p>
  1090. for an example, see e.g. <link id="TDosStream.Truncate"/>.
  1091. </p>
  1092. </descr>
  1093. <errors>
  1094. None.
  1095. </errors>
  1096. <seealso>
  1097. <link id="TDosStream.Init"/>
  1098. <link id="TDosStream.Close"/>
  1099. </seealso>
  1100. </element>
  1101. <element name="TDosStream.Close">
  1102. <short>Close the file.</short>
  1103. <descr>
  1104. <p>
  1105. <var>Close</var> closes the file if it was open, and sets <var>Handle</var> to -1.
  1106. Contrary to <link id="TDosStream.Done">Done</link> it does not clean up the instance
  1107. of <var>TDosStream</var>
  1108. </p>
  1109. <p>
  1110. For an example, see <link id="TDosStream.Open"/>.
  1111. </p>
  1112. </descr>
  1113. <errors>
  1114. None.
  1115. </errors>
  1116. <seealso>
  1117. <link id="TStream.Close"/>
  1118. <link id="TDosStream.Init"/>
  1119. <link id="TDosStream.Done"/>
  1120. </seealso>
  1121. </element>
  1122. <element name="TDosStream.Truncate">
  1123. <short>Truncate the file on the current position.</short>
  1124. <descr>
  1125. If the status of the stream is <var>stOK</var>, then <var>Truncate</var> tries to
  1126. truncate the stream size to the current file position.
  1127. </descr>
  1128. <errors>
  1129. If an error occurs, the stream's status is set to <var>stError</var> and
  1130. <var>ErrorInfo</var> is set to the OS error code.
  1131. </errors>
  1132. <seealso>
  1133. <link id="TStream.Truncate"/>
  1134. <link id="TStream.GetSize"/>
  1135. </seealso>
  1136. <example file="objectex/ex16"/>
  1137. </element>
  1138. <element name="TDosStream.Seek">
  1139. <short>Set file position.</short>
  1140. <descr>
  1141. If the stream's status is <var>stOK</var>, then <var>Seek</var> sets the
  1142. file position to <var>Pos</var>. <var>Pos</var> is a zero-based offset, counted from
  1143. the beginning of the file.
  1144. </descr>
  1145. <errors>
  1146. In case an error occurs, the stream's status is set to <var>stSeekError</var>,
  1147. and the OS error code is stored in <var>ErrorInfo</var>.
  1148. </errors>
  1149. <seealso>
  1150. <link id="TStream.Seek"/>
  1151. <link id="TStream.GetPos"/>
  1152. </seealso>
  1153. <example file="objectex/ex17"/>
  1154. </element>
  1155. <element name="TDosStream.Open">
  1156. <short>Open the file stream</short>
  1157. <descr>
  1158. If the stream's status is <var>stOK</var>, and the stream is closed then
  1159. <var>Open</var> re-opens the file stream with mode <var>OpenMode</var>.
  1160. This call can be used after a <link id="TDosStream.Close">Close</link> call.
  1161. </descr>
  1162. <errors>
  1163. If an error occurs when re-opening the file, then <var>Status</var> is set
  1164. to <var>stOpenError</var>, and the OS error code is stored in <var>ErrorInfo</var>
  1165. </errors>
  1166. <seealso>
  1167. <link id="TStream.Open"/>
  1168. <link id="TDosStream.Close"/>
  1169. </seealso>
  1170. <example file="objectex/ex14"/>
  1171. </element>
  1172. <element name="TDosStream.Read">
  1173. <short>Read data from the stream to a buffer.</short>
  1174. <descr>
  1175. <p>
  1176. If the Stream is open and the stream status is <var>stOK</var> then
  1177. <var>Read</var> will read <var>Count</var> bytes from the stream and place them
  1178. in <var>Buf</var>.
  1179. </p>
  1180. <p>
  1181. For an example, see <link id="TStream.Read"/>.
  1182. </p>
  1183. </descr>
  1184. <errors>
  1185. In case of an error, <var>Status</var> is set to <var>StReadError</var>, and
  1186. <var>ErrorInfo</var> gets the OS specific error, or 0 when an attempt was
  1187. made to read beyond the end of the stream.
  1188. </errors>
  1189. <seealso>
  1190. <link id="TStream.Read"/>
  1191. <link id="TDosStream.Write"/>
  1192. </seealso>
  1193. </element>
  1194. <element name="TDosStream.Write">
  1195. <short>Write data from a buffer to the stream.</short>
  1196. <descr>
  1197. <p>
  1198. If the Stream is open and the stream status is <var>stOK</var> then
  1199. <var>Write</var> will write <var>Count</var> bytes from <var>Buf</var> and place them
  1200. in the stream.
  1201. </p>
  1202. <p>
  1203. For an example, see <link id="TStream.Read"/>.
  1204. </p>
  1205. </descr>
  1206. <errors>
  1207. In case of an error, <var>Status</var> is set to <var>StWriteError</var>, and
  1208. <var>ErrorInfo</var> gets the OS specific error.
  1209. </errors>
  1210. <seealso>
  1211. <link id="TStream.Write"/>
  1212. <link id="TDosStream.Read"/>
  1213. </seealso>
  1214. </element>
  1215. <element name="PBufStream">
  1216. <short>Pointer to <link id="TBufStream"/> object.</short>
  1217. </element>
  1218. <element name="PDosStream">
  1219. <short>Pointer to <link id="TDosStream"/> object.</short>
  1220. </element>
  1221. <element name="PMemoryStream">
  1222. <short>Pointer to <link id="TMemoryStream"/> object.</short>
  1223. </element>
  1224. <element name="PCollection">
  1225. <short>Pointer to <link id="TCollection"/> object.</short>
  1226. </element>
  1227. <element name="PItemList">
  1228. <short>Pointer to <link id="TItemList"/> object.</short>
  1229. </element>
  1230. <element name="PObject">
  1231. <short>Pointer to <link id="TObject"/> object.</short>
  1232. </element>
  1233. <element name="PRect">
  1234. <short>Pointer to <link id="TRect"/> object.</short>
  1235. </element>
  1236. <element name="PResourceCollection">
  1237. <short>Pointer to <link id="TResourceCollection"/> object.</short>
  1238. </element>
  1239. <element name="PSortedCollection">
  1240. <short>Pointer to <link id="TSortedCollection"/> object.</short>
  1241. </element>
  1242. <element name="PSTrCollection">
  1243. <short>Pointer to <link id="TStrCollection"/> object.</short>
  1244. </element>
  1245. <element name="PSTrListMaker">
  1246. <short>Pointer to <link id="TStrListMaker"/> object.</short>
  1247. </element>
  1248. <element name="PStringCollection">
  1249. <short>Pointer to <link id="TStringCollection"/> object.</short>
  1250. </element>
  1251. <element name="PStringList">
  1252. <short>Pointer to <link id="TStringList"/> object.</short>
  1253. </element>
  1254. <element name="PUnsortedStrCollection">
  1255. <short>Pointer to <link id="TUnsortedStrCollection"/> object.</short>
  1256. </element>
  1257. <element name="PResourceFile">
  1258. <short>Pointer to <link id="TResourceFile"/> object.</short>
  1259. </element>
  1260. <element name="PStrIndex">
  1261. <short>Pointer to <link id="TStrIndex"/> array.</short>
  1262. </element>
  1263. <element name="PObject">
  1264. <short>Pointer to <link id="TObject"/> object.</short>
  1265. </element>
  1266. <element name="TBufStream">
  1267. <short>Buffered file stream</short>
  1268. <descr>
  1269. <p>
  1270. <var>Bufstream</var> implements a buffered file stream. That is, all data written
  1271. to the stream is written to memory first. Only when the buffer is full, or
  1272. on explicit request, the data is written to disk.
  1273. </p>
  1274. <p>
  1275. Also, when reading from the stream, first the buffer is checked if there is
  1276. any unread data in it. If so, this is read first. If not the buffer is
  1277. filled again, and then the data is read from the buffer.
  1278. </p>
  1279. <p>
  1280. The size of the buffer is fixed and is set when constructing the file.
  1281. </p>
  1282. <p>
  1283. This is useful if you need heavy throughput for your stream, because it
  1284. speeds up operations.
  1285. </p>
  1286. </descr>
  1287. <seealso>
  1288. link id
  1289. </seealso>
  1290. </element>
  1291. <element name="TBufStream.LastMode">
  1292. <short>Last file open mode</short>
  1293. </element>
  1294. <element name="TBufStream.BufSize">
  1295. <short>Size of buffer</short>
  1296. </element>
  1297. <element name="TBufStream.BufPtr">
  1298. <short>Pointer to current position in buffer</short>
  1299. </element>
  1300. <element name="TBufStream.Bufend">
  1301. <short>End of data in buffer.</short>
  1302. </element>
  1303. <element name="TBufStream.Buffer">
  1304. <short>Actual buffer</short>
  1305. </element>
  1306. <element name="TBufStream.Init">
  1307. <short>Initialize an instance of <var>TBufStream</var> and open the file.</short>
  1308. <descr>
  1309. <p>
  1310. <var>Init</var> instantiates an instance of <var>TBufStream</var>. The name of the
  1311. file that contains (or will contain) the data of the stream is given in
  1312. <var>FileName</var>. The <var>Mode</var> parameter determines whether a new file
  1313. should be created and what access rights you have on the file.
  1314. It can be one of the following constants:
  1315. </p>
  1316. <dl>
  1317. <dt>stCreate</dt><dd> Creates a new file.</dd>
  1318. <dt>stOpenRead</dt><dd> Read access only.</dd>
  1319. <dt>stOpenWrite</dt><dd> Write access only.</dd>
  1320. <dt>stOpen</dt><dd> Read and write access.</dd>
  1321. </dl>
  1322. <p>
  1323. The <var>Size</var> parameter determines the size of the buffer that will be
  1324. created. It should be different from zero.
  1325. </p>
  1326. <p>
  1327. For an example see <link id="TBufStream.Flush"/>.
  1328. </p>
  1329. </descr>
  1330. <errors>
  1331. On error, <var>Status</var> is set to <var>stInitError</var>, and <var>ErrorInfo</var>
  1332. is set to the dos error code.
  1333. </errors>
  1334. <seealso>
  1335. <link id="TDosStream.Init"/>
  1336. <link id="TBufStream.Done"/>
  1337. </seealso>
  1338. </element>
  1339. <element name="TBufStream.Done">
  1340. <short>Close the file and cleans up the instance.</short>
  1341. <descr>
  1342. <p>
  1343. <var>Done</var> flushes and closes the file if it was open and cleans up the
  1344. instance of <var>TBufStream</var>.
  1345. </p>
  1346. <p>
  1347. For an example see <link id="TBufStream.Flush"/>.
  1348. </p>
  1349. </descr>
  1350. <errors>
  1351. None.
  1352. </errors>
  1353. <seealso>
  1354. <link id="TDosStream.Done"/>
  1355. <link id="TBufStream.Init"/>
  1356. <link id="TBufStream.Close"/>
  1357. </seealso>
  1358. </element>
  1359. <element name="TBufStream.Close">
  1360. <short>Flush data and Close the file.</short>
  1361. <descr>
  1362. <p>
  1363. <var>Close</var> flushes and closes the file if it was open, and sets <var>Handle</var> to -1.
  1364. Contrary to <link id="TBufStream.Done">Done</link> it does not clean up the instance
  1365. of <var>TBufStream</var>
  1366. </p>
  1367. <p>
  1368. For an example see <link id="TBufStream.Flush"/>.
  1369. </p>
  1370. </descr>
  1371. <errors>
  1372. None.
  1373. </errors>
  1374. <seealso>
  1375. <link id="TStream.Close"/>
  1376. <link id="TBufStream.Init"/>
  1377. <link id="TBufStream.Done"/>
  1378. </seealso>
  1379. </element>
  1380. <element name="TBufStream.Flush">
  1381. <short>FLush data from buffer, and write it to stream.</short>
  1382. <descr>
  1383. When the stream is in write mode, the contents of the buffer are written to
  1384. disk, and the buffer position is set to zero.
  1385. When the stream is in read mode, the buffer position is set to zero.
  1386. </descr>
  1387. <errors>
  1388. Write errors may occur if the file was in write mode.
  1389. see <link id="TBufStream.Write">Write</link> for more info on the errors.
  1390. </errors>
  1391. <seealso>
  1392. <link id="TStream.Close"/>
  1393. <link id="TBufStream.Init"/>
  1394. <link id="TBufStream.Done"/>
  1395. </seealso>
  1396. <example file="objectex/ex15"/>
  1397. </element>
  1398. <element name="TBufStream.Truncate">
  1399. <short>Flush buffer, and truncate the file at current position.</short>
  1400. <descr>
  1401. <p>
  1402. If the status of the stream is <var>stOK</var>, then <var>Truncate</var> tries to
  1403. flush the buffer, and then truncates the stream size to the current
  1404. file position.
  1405. </p>
  1406. <p>
  1407. For an example, see <link id="TDosStream.Truncate"/>.
  1408. </p>
  1409. </descr>
  1410. <errors>
  1411. Errors can be those of <link id="TBufStream.Flush">Flush</link> or
  1412. <link id="TDosStream.Truncate"/>.
  1413. </errors>
  1414. <seealso>
  1415. <link id="TStream.Truncate"/>
  1416. <link id="TDosStream.Truncate"/>
  1417. <link id="TStream.GetSize"/>
  1418. </seealso>
  1419. </element>
  1420. <element name="TBufStream.Seek">
  1421. <short>Set current position in file.</short>
  1422. <descr>
  1423. <p>
  1424. If the stream's status is <var>stOK</var>, then <var>Seek</var> sets the
  1425. file position to <var>Pos</var>. <var>Pos</var> is a zero-based offset, counted from
  1426. the beginning of the file.
  1427. </p>
  1428. <p>
  1429. For an example, see <link id="TStream.Seek"/>;
  1430. </p>
  1431. </descr>
  1432. <errors>
  1433. In case an error occurs, the stream's status is set to <var>stSeekError</var>,
  1434. and the OS error code is stored in <var>ErrorInfo</var>.
  1435. </errors>
  1436. <seealso>
  1437. <link id="TStream.Seek"/>
  1438. <link id="TStream.GetPos"/>
  1439. </seealso>
  1440. </element>
  1441. <element name="TBufStream.Open">
  1442. <short>Open the file if it is closed.</short>
  1443. <descr>
  1444. <p>
  1445. If the stream's status is <var>stOK</var>, and the stream is closed then
  1446. <var>Open</var> re-opens the file stream with mode <var>OpenMode</var>.
  1447. This call can be used after a <link id="TBufStream.Close">Close</link> call.
  1448. </p>
  1449. <p>
  1450. For an example, see <link id="TDosStream.Open"/>.
  1451. </p>
  1452. </descr>
  1453. <errors>
  1454. If an error occurs when re-opening the file, then <var>Status</var> is set
  1455. to <var>stOpenError</var>, and the OS error code is stored in <var>ErrorInfo</var>
  1456. </errors>
  1457. <seealso>
  1458. <link id="TStream.Open"/>
  1459. <link id="TBufStream.Close"/>
  1460. </seealso>
  1461. </element>
  1462. <element name="TBufStream.Read">
  1463. <short>Read data from the file to a buffer in memory.</short>
  1464. <descr>
  1465. <p>
  1466. If the Stream is open and the stream status is <var>stOK</var> then
  1467. <var>Read</var> will read <var>Count</var> bytes from the stream and place them
  1468. in <var>Buf</var>.
  1469. </p>
  1470. <p>
  1471. <var>Read</var> will first try to read the data from the stream's internal
  1472. buffer. If insufficient data is available, the buffer will be filled before
  1473. contiunuing to read. This process is repeated until all needed data
  1474. has been read.
  1475. </p>
  1476. <p>
  1477. For an example, see <link id="TStream.Read"/>.
  1478. </p>
  1479. </descr>
  1480. <errors>
  1481. In case of an error, <var>Status</var> is set to <var>StReadError</var>, and
  1482. <var>ErrorInfo</var> gets the OS specific error, or 0 when an attempt was
  1483. made to read beyond the end of the stream.
  1484. </errors>
  1485. <seealso>
  1486. <link id="TStream.Read"/>
  1487. <link id="TBufStream.Write"/>
  1488. </seealso>
  1489. </element>
  1490. <element name="TBufStream.Write">
  1491. <short>Write data to the file from a buffer in memory.</short>
  1492. <descr>
  1493. <p>
  1494. If the Stream is open and the stream status is <var>stOK</var> then
  1495. <var>Write</var> will write <var>Count</var> bytes from <var>Buf</var> and place them
  1496. in the stream.
  1497. </p>
  1498. <p>
  1499. <var>Write</var> will first try to write the data to the stream's internal
  1500. buffer. When the internal buffer is full, then the contents will be written
  1501. to disk. This process is repeated until all data has been written.
  1502. </p>
  1503. <p>
  1504. For an example, see <link id="TStream.Read"/>.
  1505. </p>
  1506. </descr>
  1507. <errors>
  1508. In case of an error, <var>Status</var> is set to <var>StWriteError</var>, and
  1509. <var>ErrorInfo</var> gets the OS specific error.
  1510. </errors>
  1511. <seealso>
  1512. <link id="TStream.Write"/>
  1513. <link id="TBufStream.Read"/>
  1514. </seealso>
  1515. </element>
  1516. <element name="TMemoryStream">
  1517. <short>Stream which keeps data in memory.</short>
  1518. <descr>
  1519. <p>
  1520. The <var>TMemoryStream</var> object implements a stream that stores it's data
  1521. in memory. The data is stored on the heap, with the possibility to specify
  1522. the maximum amout of data, and the the size of the memory blocks being used.
  1523. </p>
  1524. </descr>
  1525. <seealso>
  1526. <link id="TStream"/>
  1527. </seealso>
  1528. </element>
  1529. <element name="TMemoryStream.BlkCount">
  1530. <short>Number of allocated memory blocks</short>
  1531. </element>
  1532. <element name="TMemoryStream.BlkSize">
  1533. <short>Size of one memory block</short>
  1534. </element>
  1535. <element name="TMemoryStream.MemSize">
  1536. <short>Total memory size</short>
  1537. </element>
  1538. <element name="TMemoryStream.BlkList">
  1539. <short>Pointer to list of allocated blocks.</short>
  1540. </element>
  1541. <element name="TMemoryStream.Init">
  1542. <short>Initialize memory stream, reserves memory for stream data.</short>
  1543. <descr>
  1544. <p>
  1545. <var>Init</var> instantiates a new <var>TMemoryStream</var> object. The
  1546. memorystreamobject will initially allocate at least <var>ALimit</var> bytes memory,
  1547. divided into memory blocks of size <var>ABlockSize</var>.
  1548. The number of blocks needed to get to <var>ALimit</var> bytes is rounded up.
  1549. </p>
  1550. <p>
  1551. By default, the number of blocks is 1, and the size of a block is 8192. This
  1552. is selected if you specify 0 as the blocksize.
  1553. </p>
  1554. <p>
  1555. For an example, see e.g <link id="TStream.CopyFrom"/>.
  1556. </p>
  1557. </descr>
  1558. <errors>
  1559. If the stream cannot allocate the initial memory needed for the memory blocks, then
  1560. the stream's status is set to <var>stInitError</var>.
  1561. </errors>
  1562. <seealso>
  1563. <link id="TMemoryStream.Done"/>
  1564. </seealso>
  1565. </element>
  1566. <element name="TMemoryStream.Done">
  1567. <short>Clean up memory and destroy the object instance.</short>
  1568. <descr>
  1569. <p>
  1570. <var>Done</var> releases the memory blocks used by the stream, and then cleans up
  1571. the memory used by the stream object itself.
  1572. </p>
  1573. <p>
  1574. For an example, see e.g <link id="TStream.CopyFrom"/>.
  1575. </p>
  1576. </descr>
  1577. <errors>
  1578. None.
  1579. </errors>
  1580. <seealso>
  1581. <link id="TMemoryStream.Init"/>
  1582. </seealso>
  1583. </element>
  1584. <element name="TMemoryStream.Truncate">
  1585. <short>Set the stream size to the current position.</short>
  1586. <descr>
  1587. <var>Truncate</var> sets the size of the memory stream equal to the current
  1588. position. It de-allocates any memory-blocks that are no longer needed, so
  1589. that the new size of the stream is the current position in the stream,
  1590. rounded up to the first multiple of the stream blocksize.
  1591. </descr>
  1592. <errors>
  1593. If an error occurs during memory de-allocation, the stream's status is set
  1594. to <var>stError</var>
  1595. </errors>
  1596. <seealso>
  1597. <link id="TStream.Truncate"/>
  1598. </seealso>
  1599. <example file="objectex/ex20"/>
  1600. </element>
  1601. <element name="TMemoryStream.Read">
  1602. <short>Read data from the stream to a location in memory.</short>
  1603. <descr>
  1604. <p>
  1605. <var>Read</var> reads <var>Count</var> bytes from the stream to <var>Buf</var>. It updates
  1606. the position of the stream.
  1607. </p>
  1608. <p>
  1609. For an example, see <link id="TStream.Read"/>.
  1610. </p>
  1611. </descr>
  1612. <errors>
  1613. If there is not enough data available, no data is read, and the stream's
  1614. status is set to <var>stReadError</var>.
  1615. </errors>
  1616. <seealso>
  1617. <link id="TStream.Read"/>
  1618. <link id="TMemoryStream.Write"/>
  1619. </seealso>
  1620. </element>
  1621. <element name="TMemoryStream.Write">
  1622. <short>Write data to the stream.</short>
  1623. <descr>
  1624. <p>
  1625. <var>Write</var> copies <var>Count</var> bytes from <var>Buf</var> to the stream. It
  1626. updates the position of the stream.
  1627. </p>
  1628. <p>
  1629. If not enough memory is available to hold the extra <var>Count</var> bytes,
  1630. then the stream will try to expand, by allocating as much blocks with
  1631. size <var>BlkSize</var> (as specified in the constuctor call
  1632. <link id="TMemoryStream.Init">Init</link>) as needed.
  1633. </p>
  1634. <p>
  1635. For an example, see <link id="TStream.Read"/>.
  1636. </p>
  1637. </descr>
  1638. <errors>
  1639. If the stream cannot allocate more memory, then the status is set to
  1640. <var>stWriteError</var>
  1641. </errors>
  1642. <seealso>
  1643. <link id="TStream.Write"/>
  1644. <link id="TMemoryStream.Read"/>
  1645. </seealso>
  1646. </element>
  1647. <element name="TCollection">
  1648. <short>Manage a collection of pointers of objects</short>
  1649. <descr>
  1650. <p>
  1651. The <var>TCollection</var> object manages a collection of pointers or objects.
  1652. It also provides a series of methods to manipulate these pointers or
  1653. objects.
  1654. </p>
  1655. <p>
  1656. Whether or not objects are used depends on the kind of calls you use.
  1657. All kinds come in 2 flavors, one for objects, one for pointers.
  1658. </p>
  1659. </descr>
  1660. </element>
  1661. <element name="TCollection.Items">
  1662. <short>Pointer to list of items.</short>
  1663. </element>
  1664. <element name="TCollection.Count">
  1665. <short>Current count of items</short>
  1666. </element>
  1667. <element name="TCollection.Limit">
  1668. <short>Max number of items</short>
  1669. </element>
  1670. <element name="TCollection.Delta">
  1671. <short>Number of pointers to allocate when adding items.</short>
  1672. </element>
  1673. <element name="TCollection.Init">
  1674. <short>Instantiate a new collection.</short>
  1675. <descr>
  1676. <p>
  1677. <var>Init</var> initializes a new instance of a collection. It sets the (initial) maximum number
  1678. of items in the collection to <var>ALimit</var>. <var>ADelta</var> is the increase
  1679. size : The number of memory places that will be allocatiod in case <var>ALimit</var> is reached,
  1680. and another element is added to the collection.
  1681. </p>
  1682. <p>
  1683. For an example, see <link id="TCollection.ForEach"/>.
  1684. </p>
  1685. </descr>
  1686. <errors>
  1687. None.
  1688. </errors>
  1689. <seealso>
  1690. <link id="TCollection.Load"/>
  1691. <link id="TCollection.Done"/>
  1692. </seealso>
  1693. </element>
  1694. <element name="TCollection.Load">
  1695. <short>Initialize a new collection and load collection from a stream.</short>
  1696. <descr>
  1697. <var>Load</var> initializes a new instance of a collection. It reads from stream
  1698. <var>S</var> the item count, the item limit count, and the increase size. After
  1699. that, it reads the specified number of items from the stream.
  1700. <!-- Do not call this method if you intend to use only pointers in your collection. -->
  1701. </descr>
  1702. <errors>
  1703. Errors returned can be those of <link id="TCollection.GetItem">GetItem</link>.
  1704. </errors>
  1705. <seealso>
  1706. <link id="TCollection.Init"/>
  1707. <link id="TCollection.GetItem"/>
  1708. <link id="TCollection.Done"/>
  1709. </seealso>
  1710. <example file="objectex/ex22"/>
  1711. </element>
  1712. <element name="TCollection.Done">
  1713. <short>Clean up collection, release all memory.</short>
  1714. <descr>
  1715. <p>
  1716. <var>Done</var> frees all objects in the collection, and then releases all memory
  1717. occupied by the instance.
  1718. </p>
  1719. <p>
  1720. For an example, see <link id="TCollection.ForEach"/>.
  1721. </p>
  1722. <!-- Do not call this method if you intend to use only pointers in your collection. -->
  1723. </descr>
  1724. <errors>
  1725. None.
  1726. </errors>
  1727. <seealso>
  1728. <link id="TCollection.Init"/>
  1729. <link id="TCollection.FreeAll"/>
  1730. </seealso>
  1731. </element>
  1732. <element name="TCollection.At">
  1733. <short>Return the item at a certain index.</short>
  1734. <descr>
  1735. <var>At</var> returns the item at position <var>Index</var>.
  1736. </descr>
  1737. <errors>
  1738. If <var>Index</var> is less than zero or larger than the number of items
  1739. in the collection, seepl{Error}{TCollection.Error} is called with
  1740. <var>coIndexError</var> and <var>Index</var> as arguments, resulting in a run-time
  1741. error.
  1742. </errors>
  1743. <seealso>
  1744. <link id="TCollection.Insert"/>
  1745. </seealso>
  1746. <example file="objectex/ex23"/>
  1747. </element>
  1748. <element name="TCollection.IndexOf">
  1749. <short>Find the position of a certain item.</short>
  1750. <descr>
  1751. <var>IndexOf</var> returns the index of <var>Item</var> in the collection.
  1752. If <var>Item</var> isn't present in the collection, -1 is returned.
  1753. </descr>
  1754. <errors>
  1755. If the item is not present, -1 is returned.
  1756. </errors>
  1757. <seealso>
  1758. <link id="TCollection.At"/>
  1759. <link id="TCollection.GetItem"/>
  1760. <link id="TCollection.Insert"/>
  1761. </seealso>
  1762. <example file="objectex/ex24"/>
  1763. </element>
  1764. <element name="TCollection.GetItem">
  1765. <short>Read one item off the stream.</short>
  1766. <descr>
  1767. <var>GetItem</var> reads a single item off the stream <var>S</var>, and
  1768. returns a pointer to this item. This method is used internally by the Load
  1769. method, and should not be used directly.
  1770. </descr>
  1771. <errors>
  1772. Possible errors are the ones from <link id="TStream.Get"/>.
  1773. </errors>
  1774. <seealso>
  1775. <link id="TStream.Get"/>,
  1776. <link id="TCollection.Store"/>
  1777. </seealso>
  1778. </element>
  1779. <element name="TCollection.LastThat">
  1780. <short>Return last item which matches a test.</short>
  1781. <descr>
  1782. This function returns the last item in the collection for which <var>Test</var>
  1783. returns a non-nil result. <var>Test</var> is a function that accepts 1 argument:
  1784. a pointer to an object, and that returns a pointer as a result.
  1785. </descr>
  1786. <errors>
  1787. None.
  1788. </errors>
  1789. <seealso>
  1790. <link id="TCollection.FirstThat"/>
  1791. </seealso>
  1792. <example file="objectex/ex25"/>
  1793. </element>
  1794. <element name="TCollection.FirstThat">
  1795. <short>Return first item which matches a test.</short>
  1796. <descr>
  1797. This function returns the first item in the collection for which <var>Test</var>
  1798. returns a non-nil result. <var>Test</var> is a function that accepts 1 argument:
  1799. a pointer to an object, and that returns a pointer as a result.
  1800. </descr>
  1801. <errors>
  1802. None.
  1803. </errors>
  1804. <seealso>
  1805. <link id="TCollection.LastThat"/>
  1806. </seealso>
  1807. <example file="objectex/ex26"/>
  1808. </element>
  1809. <element name="TCollection.Pack">
  1810. <short>Remove all <var>>Nil</var> pointers from the collection.</short>
  1811. <descr>
  1812. <var>Pack</var> removes all <var>Nil</var> pointers from the collection, and adjusts
  1813. <var>Count</var> to reflect this change. No memory is freed as a result of this
  1814. call. In order to free any memory, you can call <var>SetLimit</var> with an
  1815. argument of <var>Count</var> after a call to <var>Pack</var>.
  1816. </descr>
  1817. <errors>
  1818. None.
  1819. </errors>
  1820. <seealso>
  1821. <link id="TCollection.SetLimit"/>
  1822. </seealso>
  1823. <example file="objectex/ex26"/>
  1824. </element>
  1825. <element name="TCollection.FreeAll">
  1826. <short>Release all objects from the collection.</short>
  1827. <descr>
  1828. <var>FreeAll</var> calls the destructor of each object in the collection.
  1829. It doesn't release any memory occumpied by the collection itself, but it
  1830. does set <var>Count</var> to zero.
  1831. </descr>
  1832. <errors>
  1833. </errors>
  1834. <seealso>
  1835. <link id="TCollection.DeleteAll"/>
  1836. <link id="TCollection.FreeItem"/>
  1837. </seealso>
  1838. <example file="objectex/ex28"/>
  1839. </element>
  1840. <element name="TCollection.DeleteAll">
  1841. <short>Delete all elements from the collection. Objects are not destroyed.</short>
  1842. <descr>
  1843. <var>DeleteAll</var> deletes all elements from the collection. It just sets
  1844. the <var>Count</var> variable to zero. Contrary to
  1845. <link id="TCollection.FreeAll">FreeAll</link>, <var>DeletAll</var> doesn't call the
  1846. destructor of the objects.
  1847. </descr>
  1848. <errors>
  1849. None.
  1850. </errors>
  1851. <seealso>
  1852. <link id="TCollection.FreeAll"/>
  1853. <link id="TCollection.Delete"/>
  1854. </seealso>
  1855. <example file="objectex/ex29"/>
  1856. </element>
  1857. <element name="TCollection.Free">
  1858. <short>Free item from collection, calling it's destructor.</short>
  1859. <descr>
  1860. <var>Free</var> Deletes <var>Item</var> from the collection, and calls the destructor
  1861. <var>Done</var> of the object.
  1862. </descr>
  1863. <errors>
  1864. If the <var>Item</var> is not in the collection, <var>Error</var> will be called with
  1865. <var>coIndexError</var>.
  1866. </errors>
  1867. <seealso>
  1868. <link id="TCollection.FreeItem"/>
  1869. </seealso>
  1870. <example file="objectex/ex30"/>
  1871. </element>
  1872. <element name="TCollection.Insert">
  1873. <short>Insert a new item in the collection at the end.</short>
  1874. <descr>
  1875. <var>Insert</var> inserts <var>Item</var> in the collection. <var>TCollection</var>
  1876. inserts this item at the end, but descendent objects may insert it at
  1877. another place.
  1878. </descr>
  1879. <errors>
  1880. None.
  1881. </errors>
  1882. <seealso>
  1883. <link id="TCollection.AtInsert"/>
  1884. <link id="TCollection.AtPut"/>
  1885. </seealso>
  1886. </element>
  1887. <element name="TCollection.Delete">
  1888. <short>Delete an item from the collection, but does not destroy it.</short>
  1889. <descr>
  1890. <var>Delete</var> deletes <var>Item</var> from the collection. It doesn't call the
  1891. item's destructor, though. For this the <link id="TCollection.Free">Free</link>
  1892. call is provided.
  1893. </descr>
  1894. <errors>
  1895. If the <var>Item</var> is not in the collection, <var>Error</var> will be called with
  1896. <var>coIndexError</var>.
  1897. </errors>
  1898. <seealso>
  1899. <link id="TCollection.AtDelete"/>
  1900. <link id="TCollection.Free"/>
  1901. </seealso>
  1902. <example file="objectex/ex31"/>
  1903. </element>
  1904. <element name="TCollection.AtFree">
  1905. <short>Free an item at the indicates position, calling it's destructor.</short>
  1906. <descr>
  1907. <var>AtFree</var> deletes the item at position <var>Index</var> in the collection,
  1908. and calls the item's destructor if it is not <var>Nil</var>.
  1909. </descr>
  1910. <errors>
  1911. If <var>Index</var> isn't valid then <link id="TCollection.Error">Error</link> is called
  1912. with <var>CoIndexError</var>.
  1913. </errors>
  1914. <seealso>
  1915. <link id="TCollection.Free"/>
  1916. <link id="TCollection.AtDelete"/>
  1917. </seealso>
  1918. <example file="objectex/ex32"/>
  1919. </element>
  1920. <element name="TCollection.FreeItem">
  1921. <short>Destroy a non-nil item.</short>
  1922. <descr>
  1923. <p>
  1924. <var>FreeItem</var> calls the destructor of <var>Item</var> if it is not
  1925. nil.
  1926. </p>
  1927. <remark>
  1928. This function is used internally by the TCollection object, and should not be
  1929. called directly.
  1930. </remark>
  1931. </descr>
  1932. <errors>
  1933. None.
  1934. </errors>
  1935. <seealso>
  1936. <link id="TCollection.Free"/>
  1937. <link id="TCollection.AtFree"/>
  1938. </seealso>
  1939. </element>
  1940. <element name="TCollection.AtDelete">
  1941. <short>Delete item at certain position.</short>
  1942. <descr>
  1943. <var>AtDelete</var> deletes the pointer at position <var>Index</var> in the
  1944. collection. It doesn't call the object's destructor.
  1945. </descr>
  1946. <errors>
  1947. If <var>Index</var> isn't valid then <link id="TCollection.Error">Error</link> is called
  1948. with <var>CoIndexError</var>.
  1949. </errors>
  1950. <seealso>
  1951. <link id="TCollection.Delete"/>
  1952. </seealso>
  1953. <example file="objectex/ex33"/>
  1954. </element>
  1955. <element name="TCollection.ForEach">
  1956. <short>Execute procedure for each item in the list.</short>
  1957. <descr>
  1958. <p>
  1959. <var>ForEach</var> calls <var>Action</var> for each element in the collection,
  1960. and passes the element as an argument to <var>Action</var>.
  1961. </p>
  1962. <p>
  1963. <var>Action</var> is a procedural type variable that accepts a pointer as an
  1964. argument.
  1965. </p>
  1966. </descr>
  1967. <errors>
  1968. None.
  1969. </errors>
  1970. <seealso>
  1971. <link id="TCollection.FirstThat"/>
  1972. <link id="TCollection.LastThat"/>
  1973. </seealso>
  1974. <example file="objectex/ex21"/>
  1975. </element>
  1976. <element name="TCollection.SetLimit">
  1977. <short>Set maximum number of elements in the collection.</short>
  1978. <descr>
  1979. <p>
  1980. <var>SetLimit</var> sets the maximum number of elements in the collection.
  1981. <var>ALimit</var> must not be less than <var>Count</var>, and should not be larger
  1982. than <var>MaxCollectionSize</var>
  1983. </p>
  1984. <p>
  1985. For an example, see <link id="TCollection.Pack">Pack</link>.
  1986. </p>
  1987. </descr>
  1988. <errors>
  1989. None.
  1990. </errors>
  1991. <seealso>
  1992. <link id="TCollection.Init"/>
  1993. </seealso>
  1994. </element>
  1995. <element name="TCollection.Error">
  1996. <short>Set error code.</short>
  1997. <descr>
  1998. <p>
  1999. <var>Error</var> is called by the various <var>TCollection</var> methods
  2000. in case of an error condition. The default behaviour is to make
  2001. a call to <var>RunError</var> with an error of <var>212-Code</var>.
  2002. </p>
  2003. <p>
  2004. This method can be overridden by descendent objects to implement
  2005. a different error-handling.
  2006. </p>
  2007. </descr>
  2008. <errors>
  2009. </errors>
  2010. <seealso>
  2011. <link id="Abstract"/>
  2012. </seealso>
  2013. </element>
  2014. <element name="TCollection.AtPut">
  2015. <short>Set collection item, overwriting an existing value.</short>
  2016. <descr>
  2017. <p>
  2018. <var>AtPut</var> sets the element at position <var>Index</var> in the collection
  2019. to <var>Item</var>. Any previous value is overwritten.
  2020. </p>
  2021. <p>
  2022. For an example, see <link id="TCollection.Pack">Pack</link>.
  2023. </p>
  2024. </descr>
  2025. <errors>
  2026. If <var>Index</var> isn't valid then <link id="TCollection.Error">Error</link> is called
  2027. with <var>CoIndexError</var>.
  2028. </errors>
  2029. <seealso>
  2030. </seealso>
  2031. </element>
  2032. <element name="TCollection.AtInsert">
  2033. <short>Insert an element at a certain position in the collection.</short>
  2034. <descr>
  2035. <var>AtInsert</var> inserts <var>Item</var> in the collection at position <var>Index</var>,
  2036. shifting all elements by one position. In case the current limit is reached,
  2037. the collection will try to expand with a call to <var>SetLimit</var>
  2038. </descr>
  2039. <errors>
  2040. If <var>Index</var> isn't valid then <link id="TCollection.Error">Error</link> is called
  2041. with <var>CoIndexError</var>. If the collection fails to expand, then
  2042. <var>coOverFlow</var> is passd to <var>Error</var>.
  2043. </errors>
  2044. <seealso>
  2045. <link id="TCollection.Insert"/>
  2046. </seealso>
  2047. <example file="objectex/ex34"/>
  2048. </element>
  2049. <element name="TCollection.Store">
  2050. <short>Write collection to a stream.</short>
  2051. <descr>
  2052. <p>
  2053. <var>Store</var> writes the collection to the stream <var>S</var>. It does
  2054. this by writeing the current <var>Count</var>, <var>Limit</var> and <var>Delta</var>
  2055. to the stream, and then writing each item to the stream.
  2056. </p>
  2057. <p>
  2058. The contents of the stream are then suitable for instantiating another
  2059. collection with <link id="TCollection.Load">Load</link>.
  2060. </p>
  2061. <p>
  2062. For an example, see <link id="TCollection.Load"/>.
  2063. </p>
  2064. </descr>
  2065. <errors>
  2066. Errors returned are those by <link id="TStream.Put"/>.
  2067. </errors>
  2068. <seealso>
  2069. <link id="TCollection.Load"/>
  2070. <link id="TCollection.PutItem"/>
  2071. </seealso>
  2072. </element>
  2073. <element name="TCollection.PutItem">
  2074. <short>Put one item on the stream</short>
  2075. <descr>
  2076. <var>PutItem</var> writes <var>Item</var> to stream <var>S</var>. This method is used
  2077. internaly by the <var>TCollection</var> object, and should not be called
  2078. directly.
  2079. </descr>
  2080. <errors>
  2081. Errors are those returned by <link id="TStream.Put"/>.
  2082. </errors>
  2083. <seealso>
  2084. <link id="TCollection.Store">Store</link>
  2085. <link id="TCollection.GetItem">GetItem</link>
  2086. </seealso>
  2087. </element>
  2088. <element name="TSortedCollection">
  2089. <short>Abstract sorted collection.</short>
  2090. <descr>
  2091. <p>
  2092. <var>TSortedCollection</var> is an abstract class, implementing a sorted
  2093. collection. You should never use an instance of <var>TSortedCollection</var>
  2094. directly, instead you should declare a descendent type, and override the
  2095. <link id="TSortedCollection.Compare">Compare</link> method.
  2096. </p>
  2097. <p>
  2098. Because the collection is ordered, <var>TSortedCollection</var> overrides some
  2099. <var>TCollection</var> methods, to provide faster routines for lookup.
  2100. </p>
  2101. <p>
  2102. The <link id="TSortedCollection.Compare">Compare</link> method decides how elements
  2103. in the collection should be ordered. Since <var>TCollection</var> has no way
  2104. of knowing how to order pointers, you must override the compare method.
  2105. </p>
  2106. <p>
  2107. Additionally, <var>TCollection</var> provides a means to filter out duplicates.
  2108. if you set <var>Duplicates</var> to <var>False</var> (the default) then duplicates
  2109. will not be allowed.
  2110. </p>
  2111. <p>
  2112. The example below defines a descendent of <var>TSortedCollection</var> which
  2113. is used in the examples.
  2114. </p>
  2115. </descr>
  2116. <example file="objectex/mysortc"/>
  2117. </element>
  2118. <element name="TSortedCollection.Duplicates">
  2119. <short>If <var>True</var> duplicate strings are allowed in the collection.</short>
  2120. </element>
  2121. <element name="TSortedCollection.Init">
  2122. <short>Instantiates a new instance of a <var>TSortedCollection</var></short>
  2123. <descr>
  2124. <p>
  2125. <var>Init</var> calls the inherited constuctor (see <link id="TCollection.Init"/>) and
  2126. sets the <var>Duplicates</var> flag to false.
  2127. </p>
  2128. <p>
  2129. You should not call this method directly, since <var>TSortedCollection</var> is a
  2130. abstract class. Instead, the descendent classes should call it via the
  2131. <var>inherited</var> keyword.
  2132. </p>
  2133. </descr>
  2134. <errors>
  2135. None.
  2136. </errors>
  2137. <seealso>
  2138. <link id="TSortedCollection.Load"/>
  2139. <link id="TCollection.Done"/>
  2140. </seealso>
  2141. </element>
  2142. <element name="TSortedCollection.Load">
  2143. <short>Instantiates a new instance of a <var>TSortedCollection</var> and
  2144. loads it from stream.</short>
  2145. <descr>
  2146. <p>
  2147. <var>Load</var> calls the inherited constuctor (see <link id="TCollection.Load"/>) and
  2148. reads the <var>Duplicates</var> flag from the stream..
  2149. </p>
  2150. <p>
  2151. You should not call this method directly, since <var>TSortedCollection</var> is a
  2152. abstract class. Instead, the descendent classes should call it via the
  2153. <var>inherited</var> keyword.
  2154. </p>
  2155. <p>
  2156. For an example, see <link id="TCollection.Load"/>.
  2157. </p>
  2158. </descr>
  2159. <errors>
  2160. None.
  2161. </errors>
  2162. <seealso>
  2163. <link id="TSortedCollection.Init"/>
  2164. <link id="TCollection.Done"/>
  2165. </seealso>
  2166. </element>
  2167. <element name="TSortedCollection.KeyOf">
  2168. <short>Return the key of an item</short>
  2169. <descr>
  2170. <p>
  2171. <var>KeyOf</var> returns the key associated with <var>Item</var>.
  2172. <var>TSortedCollection</var> returns the item itself as the key, descendent
  2173. objects can override this method to calculate a (unique) key based on the
  2174. item passed (such as hash values).
  2175. </p>
  2176. <p>
  2177. <var>Keys</var> are used to sort the objects, they are used to search and sort
  2178. the items in the collection. If descendent types override this method then
  2179. it allows possibly for faster search/sort methods based on keys rather than
  2180. on the objects themselves.
  2181. </p>
  2182. </descr>
  2183. <errors>
  2184. None.
  2185. </errors>
  2186. <seealso>
  2187. <link id="TSortedCollection.IndexOf"/>
  2188. <link id="TSortedCollection.Compare"/>
  2189. </seealso>
  2190. </element>
  2191. <element name="TSortedCollection.IndexOf">
  2192. <short>Return index of an item in the collection.</short>
  2193. <descr>
  2194. <p>
  2195. <var>IndexOf</var> returns the index of <var>Item</var> in the collection. It searches
  2196. for the object based on it's key. If duplicates are allowed, then it returns
  2197. the index of last object that matches <var>Item</var>.
  2198. </p>
  2199. <p>
  2200. In case <var>Item</var> is not found in the collection, -1 is returned.
  2201. </p>
  2202. <p>
  2203. For an example, see <link id="TCollection.IndexOf"/>
  2204. </p>
  2205. </descr>
  2206. <errors>
  2207. None.
  2208. </errors>
  2209. <seealso>
  2210. <link id="TSortedCollection.Search"/>
  2211. <link id="TSortedCollection.Compare"/>
  2212. </seealso>
  2213. </element>
  2214. <element name="TSortedCollection.Compare">
  2215. <short>Compare two items in the collection.</short>
  2216. <descr>
  2217. <p>
  2218. <var>Compare</var> is an abstract method that should be overridden by descendent
  2219. objects in order to compare two items in the collection. This method is used
  2220. in the <link id="TSortedCollection.Search">Search</link> method and in the
  2221. <link id="TSortedCollection.Insert">Insert</link> method to determine the ordering of
  2222. the objects.
  2223. </p>
  2224. <p>
  2225. The function should compare the two keys of items and return the following
  2226. function results:
  2227. </p>
  2228. <dl>
  2229. <dt>Result &lt; 0</dt><dd>If <var>Key1</var> is logically before <var>Key2</var> (<var>Key1&lt;Key2</var>)</dd>
  2230. <dt>Result = 0</dt><dd> If <var>Key1</var> and <var>Key2</var> are equal. (<var>Key1=Key2</var>)</dd>
  2231. <dt>Result &gt; 0</dt><dd> If <var>Key1</var> is logically after <var>Key2</var> (<var>Key1&gt;Key2</var>)</dd>
  2232. </dl>
  2233. </descr>
  2234. <errors>
  2235. An 'abstract run-time error' will be generated if you call
  2236. <var>TSortedCollection.Compare</var> directly.
  2237. </errors>
  2238. <seealso>
  2239. <link id="TSortedCollection.IndexOf"/>
  2240. <link id="TSortedCollection.Search"/>
  2241. </seealso>
  2242. <example file="objectex/mysortc"/>
  2243. </element>
  2244. <element name="TSortedCollection.Search">
  2245. <short>Search for item with given key.</short>
  2246. <descr>
  2247. <p>
  2248. <var>Search</var> looks for the item with key <var>Key</var> and returns the position
  2249. of the item (if present) in the collection in <var>Index</var>.
  2250. </p>
  2251. <p>
  2252. Instead of a linear search as <var>TCollection</var> does, <var>TSortedCollection</var>
  2253. uses a binary search based on the keys of the objects. It uses the
  2254. <link id="TSortedCollection.Compare">Compare</link> function to implement this
  2255. search.
  2256. </p>
  2257. <p>
  2258. If the item is found, <var>Search</var> returns <var>True</var>, otherwise <var>False</var>
  2259. is returned.
  2260. </p>
  2261. </descr>
  2262. <errors>
  2263. None.
  2264. </errors>
  2265. <seealso>
  2266. <link id="TCollection.IndexOf"/>
  2267. </seealso>
  2268. <example file="objectex/ex36"/>
  2269. </element>
  2270. <element name="TSortedCollection.Insert">
  2271. <short>Insert new item in collection.</short>
  2272. <descr>
  2273. <p>
  2274. <var>Insert</var> inserts an item in the collection at the correct position, such
  2275. that the collection is ordered at all times. You should never use
  2276. <link id="TCollection.AtInsert">Atinsert</link>, since then the collection ordering
  2277. is not guaranteed.
  2278. </p>
  2279. <p>
  2280. If <var>Item</var> is already present in the collection, and <var>Duplicates</var> is
  2281. <var>False</var>, the item will not be inserted.
  2282. </p>
  2283. </descr>
  2284. <errors>
  2285. None.
  2286. </errors>
  2287. <seealso>
  2288. <link id="TCollection.AtInsert"/>
  2289. </seealso>
  2290. <example file="objectex/ex35"/>
  2291. </element>
  2292. <element name="TSortedCollection.Store">
  2293. <short>Write the collection to the stream.</short>
  2294. <descr>
  2295. <p>
  2296. <var>Store</var> writes the collection to the stream <var>S</var>. It does this by
  2297. calling the inherited <link id="TCollection.Store"/>, and then writing the
  2298. <var>Duplicates</var> flag to the stream.
  2299. </p>
  2300. <p>
  2301. After a <var>Store</var>, the collection can be loaded from the stream with the
  2302. constructor <link id="TSortedCollection.Load">Load</link>
  2303. </p>
  2304. <p>
  2305. For an example, see <link id="TCollection.Load"/>.
  2306. </p>
  2307. </descr>
  2308. <errors>
  2309. Errors can be those of <link id="TStream.Put"/>.
  2310. </errors>
  2311. <seealso>
  2312. <link id="TSortedCollection.Load"/>
  2313. </seealso>
  2314. </element>
  2315. <element name="TStringCollection">
  2316. <short>Collection of pascal strings.</short>
  2317. <descr>
  2318. <p>
  2319. The <var>TStringCollection</var> object manages a sorted collection of pascal
  2320. strings.
  2321. To this end, it overrides the <link id="TSortedCollection.Compare">Compare</link>
  2322. method of <var>TSortedCollection</var>, and it introduces methods to read/write
  2323. strings from a stream.
  2324. </p>
  2325. </descr>
  2326. </element>
  2327. <element name="TStringCollection.GetItem">
  2328. <short>Get string from the stream.</short>
  2329. <descr>
  2330. <p>
  2331. <var>GetItem</var> reads a string from the stream <var>S</var> and returns a pointer
  2332. to it. It doesn't insert the string in the collection.
  2333. </p>
  2334. <p>
  2335. This method is primarily introduced to be able to load and store the
  2336. collection from and to a stream.
  2337. </p>
  2338. </descr>
  2339. <errors>
  2340. The errors returned are those of <link id="TStream.ReadStr"/>.
  2341. </errors>
  2342. <seealso>
  2343. <link id="TStringCollection.PutItem"/>
  2344. </seealso>
  2345. </element>
  2346. <element name="TStringCollection.Compare">
  2347. <short>Compare two strings in the collection.</short>
  2348. <descr>
  2349. <p>
  2350. <var>TStringCollection</var> overrides the <var>Compare</var> function so it compares
  2351. the two keys as if they were pointers to strings. The compare is done case
  2352. sensitive. It returns the following results:
  2353. </p>
  2354. <dl>
  2355. <dt>-1</dt><dd> if the first string is alphabetically earlier than the second string.</dd>
  2356. <dt>0</dt><dd> if the two strings are equal.</dd>
  2357. <dt>1</dt><dd> if the first string is alphabetically later than the second string.</dd>
  2358. </dl>
  2359. </descr>
  2360. <errors>
  2361. None.
  2362. </errors>
  2363. <seealso>
  2364. <link id="TSortedCollection.Compare"/>
  2365. </seealso>
  2366. <example file="objectex/ex37"/>
  2367. </element>
  2368. <element name="TStringCollection.FreeItem">
  2369. <short>Dispose a string in the collection from memory.</short>
  2370. <descr>
  2371. <var>TStringCollection</var> overrides <var>FreeItem</var> so that the string pointed
  2372. to by <var>Item</var> is disposed from memory.
  2373. </descr>
  2374. <errors>
  2375. None.
  2376. </errors>
  2377. <seealso>
  2378. <link id="TCollection.FreeItem"/>
  2379. </seealso>
  2380. </element>
  2381. <element name="TStringCollection.PutItem">
  2382. <short>Write a string to the stream.</short>
  2383. <descr>
  2384. <p>
  2385. <var>PutItem</var> writes the string pointed to by <var>Item</var> to the stream
  2386. <var>S</var>.
  2387. </p>
  2388. <p>
  2389. This method is primarily used in the <var>Load</var> and <var>Store</var> methods,
  2390. and should not be used directly.
  2391. </p>
  2392. </descr>
  2393. <errors>
  2394. Errors are those of <link id="TStream.WriteStr"/>.
  2395. </errors>
  2396. <seealso>
  2397. <link id="TStringCollection.GetItem"/>
  2398. </seealso>
  2399. </element>
  2400. <element name="TStrCollection">
  2401. <short>Collection of null-terminated strings</short>
  2402. <descr>
  2403. <p>
  2404. The <var>TStrCollection</var> object manages a sorted collection
  2405. of null-terminated strings (pchar strings).
  2406. To this end, it overrides the <link id="TSortedCollection.Compare">Compare</link>
  2407. method of <var>TSortedCollection</var>, and it introduces methods to read/write
  2408. strings from a stream.
  2409. </p>
  2410. </descr>
  2411. </element>
  2412. <element name="TStrCollection.GetItem">
  2413. <short>Read a null-terminated string from the stream.</short>
  2414. <descr>
  2415. <p>
  2416. <var>GetItem</var> reads a null-terminated string from the stream <var>S</var>
  2417. and returns a pointer to it. It doesn't insert the string in the
  2418. collection.
  2419. </p>
  2420. <p>
  2421. This method is primarily introduced to be able to load and store the
  2422. collection from and to a stream.
  2423. </p>
  2424. </descr>
  2425. <errors>
  2426. The errors returned are those of <link id="TStream.StrRead"/>.
  2427. </errors>
  2428. <seealso>
  2429. <link id="TStrCollection.PutItem"/>
  2430. </seealso>
  2431. </element>
  2432. <element name="TStrCollection.Compare">
  2433. <short>Compare two strings in the collection.</short>
  2434. <descr>
  2435. <p>
  2436. <var>TStrCollection</var> overrides the <var>Compare</var> function so it compares
  2437. the two keys as if they were pointers to strings. The compare is done case
  2438. sensitive. It returns
  2439. </p>
  2440. <dl>
  2441. <dt>-1</dt><dd> if the first string is alphabetically earlier than the second string. </dd>
  2442. <dt>0</dt><dd> if the two strings are equal. </dd>
  2443. <dt>1</dt><dd> if the first string is alphabetically later than the second string.</dd>
  2444. </dl>
  2445. </descr>
  2446. <errors>
  2447. None.
  2448. </errors>
  2449. <seealso>
  2450. <link id="TSortedCollection.Compare"/>
  2451. </seealso>
  2452. <example file="objectex/ex38"/>
  2453. </element>
  2454. <element name="TStrCollection.FreeItem">
  2455. <short>Free null-terminated string from the collection.</short>
  2456. <descr>
  2457. <var>TStrCollection</var> overrides <var>FreeItem</var> so that the string pointed
  2458. to by <var>Item</var> is disposed from memory.
  2459. </descr>
  2460. <errors>
  2461. None.
  2462. </errors>
  2463. <seealso>
  2464. <link id="TCollection.FreeItem"/>
  2465. </seealso>
  2466. </element>
  2467. <element name="TStrCollection.PutItem">
  2468. <short>Write a null-terminated string to the stream.</short>
  2469. <descr>
  2470. <p>
  2471. <var>PutItem</var> writes the string pointed to by <var>Item</var> to the stream
  2472. <var>S</var>.
  2473. </p>
  2474. <p>
  2475. This method is primarily used in the <var>Load</var> and <var>Store</var> methods,
  2476. and should not be used directly.
  2477. </p>
  2478. </descr>
  2479. <errors>
  2480. Errors are those of <link id="TStream.StrWrite"/>.
  2481. </errors>
  2482. <seealso>
  2483. <link id="TStrCollection.GetItem"/>
  2484. </seealso>
  2485. </element>
  2486. <element name="TUnSortedStrCollection">
  2487. <short>Unsorted string collection</short>
  2488. <descr>
  2489. <p>
  2490. The <var>TUnSortedStrCollection</var> object manages an unsorted list of strings.
  2491. To this end, it overrides the <link id="TStringCollection.Insert"/> method to add
  2492. strings at the end of the collection, rather than in the alphabetically
  2493. correct position.
  2494. </p>
  2495. <p>
  2496. Take care, the <link id="TSortedCollection.Search">Search</link> and
  2497. <link id="TCollection.IndexOf">IndexOf</link> methods will not work on an unsorted
  2498. string collection.
  2499. </p>
  2500. </descr>
  2501. </element>
  2502. <element name="TUnSortedStrCollection.Insert">
  2503. <short>Insert a new string in the collection.</short>
  2504. <descr>
  2505. <var>Insert</var> inserts a string at the end of the collection, instead
  2506. of on it's alphabetical place, resulting in an unsorted collection of
  2507. strings.
  2508. </descr>
  2509. <errors>
  2510. None.
  2511. </errors>
  2512. <seealso>
  2513. <link id="TCollection.Insert"/>
  2514. </seealso>
  2515. <example file="objectex/ex39"/>
  2516. </element>
  2517. <element name="TResourceCollection">
  2518. <short>Collection of resource names</short>
  2519. <descr>
  2520. <p>
  2521. A <var>TResourceCollection</var> manages a collection of resource names.
  2522. It stores the position and the size of a resource, as well as the name of
  2523. the resource. It stores these items in records that look like this:
  2524. </p>
  2525. <code>
  2526. TYPE
  2527. TResourceItem = packed RECORD
  2528. Posn: LongInt;
  2529. Size: LongInt;
  2530. Key : String;
  2531. End;
  2532. PResourceItem = ^TResourceItem;
  2533. </code>
  2534. <p>
  2535. It overrides some methods of <var>TStringCollection</var> in order to accomplish
  2536. this.
  2537. </p>
  2538. <remark>
  2539. Remark that the <var>TResourceCollection</var> manages the names of the
  2540. resources and their assiciated positions and sizes, it doesn't manage
  2541. the resources themselves.
  2542. </remark>
  2543. </descr>
  2544. </element>
  2545. <element name="TResourceCollection.KeyOf">
  2546. <short>Return the key of an item in the collection.</short>
  2547. <descr>
  2548. <var>KeyOf</var> returns the key of an item in the collection. For resources, the
  2549. key is a pointer to the string with the resource name.
  2550. </descr>
  2551. <errors>
  2552. None.
  2553. </errors>
  2554. <seealso>
  2555. <link id="TStringCollection.Compare"/>
  2556. </seealso>
  2557. </element>
  2558. <element name="TResourceCollection.GetItem">
  2559. <short>Read an item from the stream.</short>
  2560. <descr>
  2561. <p>
  2562. <var>GetItem</var> reads a resource item from the stream <var>S</var>. It reads the
  2563. position, size and name from the stream, in that order. It DOES NOT read the
  2564. resource itself from the stream.
  2565. </p>
  2566. <p>
  2567. The resulting item is not inserted in the collection. This call is manly for
  2568. internal use by the <link id="TCollection.Load"/> method.
  2569. </p>
  2570. </descr>
  2571. <errors>
  2572. Errors returned are those by <link id="TStream.Read"/>
  2573. </errors>
  2574. <seealso>
  2575. <link id="TCollection.Load"/>
  2576. <link id="TStream.Read"/>
  2577. </seealso>
  2578. </element>
  2579. <element name="TResourceCollection.FreeItem">
  2580. <short>Release memory occupied by item.</short>
  2581. <descr>
  2582. <p>
  2583. <var>FreeItem</var> releases the memory occupied by <var>Item</var>. It de-allocates
  2584. the name, and then the resourceitem record.
  2585. </p>
  2586. <p>
  2587. It does NOT remove the item from the collection.
  2588. </p>
  2589. </descr>
  2590. <errors>
  2591. None.
  2592. </errors>
  2593. <seealso>
  2594. <link id="TCollection.FreeItem"/>
  2595. </seealso>
  2596. </element>
  2597. <element name="TResourceCollection.PutItem">
  2598. <short>Write an item to the stream.</short>
  2599. <descr>
  2600. <p>
  2601. <var>PutItem</var> writes <var>Item</var> to the stream <var>S</var>. It does this by
  2602. writing the position and size and name of the resource item to the stream.
  2603. </p>
  2604. <p>
  2605. This method is used primarily by the <link id="TCollection.Store">Store</link>
  2606. method.
  2607. </p>
  2608. </descr>
  2609. <errors>
  2610. Errors returned are those by <link id="TStream.Write"/>.
  2611. </errors>
  2612. <seealso>
  2613. <link id="TCollection.Store"/>
  2614. </seealso>
  2615. </element>
  2616. <element name="TResourceFile">
  2617. <short>Resource file</short>
  2618. <descr>
  2619. <link id="TResourceFile"/> represents the resources in a binary file image.
  2620. </descr>
  2621. </element>
  2622. <element name="TResourceFile.Stream">
  2623. <short>Actual file stream</short>
  2624. <descr>
  2625. contains the (file) stream that has the executable image and
  2626. the resources. It can be initialized by the <link id="TResourceFile.Init">Init</link>
  2627. constructor call.
  2628. </descr>
  2629. </element>
  2630. <element name="TResourceFile.Modified">
  2631. <short>Have resources changed ?</short>
  2632. <descr>
  2633. <var>Modified</var> is set to <var>True</var> if one of the resources has been changed.
  2634. It is set by the <link id="TResourceFile.Init">SwitchTo</link>,
  2635. <link id="TResourceFile.Delete">Delete</link> and <link id="TResourceFile.Put">Put</link>
  2636. methods. Calling <link id="TResourceFile.Flush">Flush</link> will clear the
  2637. <var>Modified</var> flag.
  2638. </descr>
  2639. </element>
  2640. <element name="TResourceFile.Init">
  2641. <short>Instantiate a new instance.</short>
  2642. <descr>
  2643. <p>
  2644. <var>Init</var> instantiates a new instance of a <var>TResourceFile</var> object.
  2645. If <var>AStream</var> is not nil then it is considered as a stream describing an
  2646. executable image on disk.
  2647. </p>
  2648. <p>
  2649. <var>Init</var> will try to position the stream on the start of the resources section,
  2650. and read all resources from the stream.
  2651. </p>
  2652. </descr>
  2653. <errors>
  2654. None.
  2655. </errors>
  2656. <seealso>
  2657. <link id="TResourceFile.Done"/>
  2658. </seealso>
  2659. </element>
  2660. <element name="TResourceFile.Done">
  2661. <short>Destroy the instance and remove it from memory.</short>
  2662. <descr>
  2663. <var>Done</var> cleans up the instance of the <var>TResourceFile</var> Object.
  2664. If <var>Stream</var> was specified at initialization, then <var>Stream</var> is
  2665. disposed of too.
  2666. </descr>
  2667. <errors>
  2668. None.
  2669. </errors>
  2670. <seealso>
  2671. <link id="TResourceFile.Init"/>
  2672. </seealso>
  2673. </element>
  2674. <element name="TResourceFile.Count">
  2675. <short>Number of resources in the file</short>
  2676. <descr>
  2677. <var>Count</var> returns the number of resources. If no resources were
  2678. read, zero is returned.
  2679. </descr>
  2680. <errors>
  2681. None.
  2682. </errors>
  2683. <seealso>
  2684. <link id="TResourceFile.Init"/>
  2685. </seealso>
  2686. </element>
  2687. <element name="TResourceFile.KeyAt">
  2688. <short>Return the key of the item at a certain position.</short>
  2689. <descr>
  2690. <var>KeyAt</var> returns the key (the name) of the <var>I</var>-th resource.
  2691. </descr>
  2692. <errors>
  2693. In case <var>I</var> is invalid, <var>TCollection.Error</var> will be executed.
  2694. </errors>
  2695. <seealso>
  2696. <link id="TResourceFile.Get"/>
  2697. </seealso>
  2698. </element>
  2699. <element name="TResourceFile.Get">
  2700. <short>Return a resource by key name.</short>
  2701. <descr>
  2702. <var>Get</var> returns a pointer to a instance of a resource identified by
  2703. <var>Key</var>. If <var>Key</var> cannot be found in the list of resources, then
  2704. <var>Nil</var> is returned.
  2705. </descr>
  2706. <errors>
  2707. Errors returned may be those by <var>TStream.Get</var>
  2708. </errors>
  2709. <seealso>
  2710. </seealso>
  2711. </element>
  2712. <element name="TResourceFile.SwitchTo">
  2713. <short>Write resources to a new stream.</short>
  2714. <descr>
  2715. <p>
  2716. <var>SwitchTo</var> switches to a new stream to hold the resources in.
  2717. <var>AStream</var> will be the new stream after the call to <var>SwitchTo</var>.
  2718. </p>
  2719. <p>
  2720. If <var>Pack</var> is true, then all the known resources will be copied from
  2721. the current stream to the new stream (<var>AStream</var>). If <var>Pack</var> is
  2722. <var>False</var>, then only the current resource is copied.
  2723. </p>
  2724. <p>
  2725. The return value is the value of the original stream: <var>Stream</var>.
  2726. </p>
  2727. <p>
  2728. The <var>Modified</var> flag is set as a consequence of this call.
  2729. </p>
  2730. </descr>
  2731. <errors>
  2732. Errors returned can be those of <link id="TStream.Read"/> and
  2733. <link id="TStream.Write"/>.
  2734. </errors>
  2735. <seealso>
  2736. <link id="TResourceFile.Flush"/>
  2737. </seealso>
  2738. </element>
  2739. <element name="TResourceFile.Flush">
  2740. <short>Writes the resources to the stream.</short>
  2741. <descr>
  2742. If the <var>Modified</var> flag is set to <var>True</var>, then <var>Flush</var>
  2743. writes the resources to the stream <var>Stream</var>. It sets the <var>Modified</var>
  2744. flag to true after that.
  2745. </descr>
  2746. <errors>
  2747. Errors can be those by <link id="TStream.Seek"/> and <link id="TStream.Write"/>.
  2748. </errors>
  2749. <seealso>
  2750. <link id="TResourceFile.SwitchTo"/>
  2751. </seealso>
  2752. </element>
  2753. <element name="TResourceFile.Delete">
  2754. <short>Delete a resource from the file</short>
  2755. <descr>
  2756. <var>Delete</var> deletes the resource identified by <var>Key</var> from the
  2757. collection. It sets the <var>Modified</var> flag to true.
  2758. </descr>
  2759. <errors>
  2760. None.
  2761. </errors>
  2762. <seealso>
  2763. <link id="TResourceFile.Flush"/>
  2764. </seealso>
  2765. </element>
  2766. <element name="TResourceFile.Put">
  2767. <short>Set a resource by key name.</short>
  2768. <descr>
  2769. <var>Put</var> sets the resource identified by <var>Key</var> to <var>Item</var>.
  2770. If no such resource exists, a new one is created. The item is written
  2771. to the stream.
  2772. </descr>
  2773. <errors>
  2774. Errors returned may be those by <link id="TStream.Put"/> and <var>TStream.Seek</var>
  2775. </errors>
  2776. <seealso>
  2777. <link id="TResourceFile.Get">Get</link>
  2778. </seealso>
  2779. </element>
  2780. <element name="TStringList">
  2781. <short>Collection of strings</short>
  2782. <descr>
  2783. <p>
  2784. A <var>TStringList</var> object can be used to read a collection of strings
  2785. stored in a stream. If you register this object with the <link id="RegisterType"/>
  2786. function, you cannot register the <var>TStrListMaker</var> object.
  2787. </p>
  2788. </descr>
  2789. </element>
  2790. <element name="TStringList.Load">
  2791. <short>Load stringlist from stream.</short>
  2792. <descr>
  2793. The <var>Load</var> constructor reads the <var>TStringList</var> object from the
  2794. stream <var>S</var>. It also reads the descriptions of the strings from the
  2795. stream. The string descriptions are stored as an array of
  2796. <var>TstrIndexrec</var> records, where each record describes a string on the
  2797. stream. These records are kept in memory.
  2798. </descr>
  2799. <errors>
  2800. If an error occurs, a stream error is triggered.
  2801. </errors>
  2802. <seealso>
  2803. <link id="TStringList.Done"/>
  2804. </seealso>
  2805. </element>
  2806. <element name="TStringList.Done">
  2807. <short>Clean up the instance</short>
  2808. <descr>
  2809. The <var>Done</var> destructor frees the memory occupied by the string
  2810. descriptions, and destroys the object.
  2811. </descr>
  2812. <errors>
  2813. None.
  2814. </errors>
  2815. <seealso>
  2816. <link id="TStringList.Load">Load</link>
  2817. <link id="TObject.Done"/>
  2818. </seealso>
  2819. </element>
  2820. <element name="TStringList.Get">
  2821. <short>Return a string by key name</short>
  2822. <descr>
  2823. <var>Get</var> reads the string with key <var>Key</var> from the list of strings on the
  2824. stream, and returns this string. If there is no string with such a key, an
  2825. empty string is returned.
  2826. </descr>
  2827. <errors>
  2828. If no string with key <var>Key</var> is found, an empty string is returned.
  2829. A stream error may result if the stream doesn't contain the needed strings.
  2830. </errors>
  2831. <seealso>
  2832. <link id="TStrListMaker.Put"/>
  2833. </seealso>
  2834. </element>
  2835. <element name="TStrListMaker">
  2836. <short>Generate a stream with strings, readable by <link id="TStringList"/></short>
  2837. <descr>
  2838. <p>
  2839. The <var>TStrListMaker</var> object can be used to generate a stream with
  2840. strings, which can be read with the <var>TStringList</var> object.
  2841. If you register this object with the <link id="RegisterType"/>
  2842. function, you cannot register the <var>TStringList</var> object.
  2843. </p>
  2844. </descr>
  2845. </element>
  2846. <element name="TStrListMaker.Init">
  2847. <short>Instantiate a new instance of <var>TStrListMaker</var></short>
  2848. <descr>
  2849. <p>
  2850. The <var>Init</var> constructor creates a new instance of the <var>TstrListMaker</var>
  2851. object. It allocates <var>AStrSize</var> bytes on the heap to hold all the
  2852. strings you wish to store. It also allocates enough room for
  2853. <var>AIndexSize</var> key description entries (of the type <var>TStrIndexrec</var>).
  2854. </p>
  2855. <p>
  2856. <var>AStrSize</var> must be large enough to contain all the strings you wish to
  2857. store. If not enough memory is allocated, other memory will be overwritten.
  2858. The same is true for <var>AIndexSize</var> : maximally <var>AIndexSize</var> strings
  2859. can be written to the stream.
  2860. </p>
  2861. </descr>
  2862. <errors>
  2863. None.
  2864. </errors>
  2865. <seealso>
  2866. <link id="TObject.Init"/>
  2867. <link id="TStrListMaker.Done"/>
  2868. </seealso>
  2869. </element>
  2870. <element name="TStrListMaker.Done">
  2871. <short>Clean up the instance and free all related memory.</short>
  2872. <descr>
  2873. The <var>Done</var> destructor de-allocates the memory for the index description
  2874. records and the string data, and then destroys the object.
  2875. </descr>
  2876. <errors>
  2877. None.
  2878. </errors>
  2879. <seealso>
  2880. <link id="TObject.Done"/>
  2881. <link id="TStrListMaker.Init"/>
  2882. </seealso>
  2883. </element>
  2884. <element name="TStrListMaker.Put">
  2885. <short>Add a new string to the list with associated key.</short>
  2886. <descr>
  2887. <var>Put</var> adds they string <var>S</var> with key <var>Key</var> to the collection of
  2888. strings. This action doesn't write the string to a stream. To write the
  2889. strings to the stream, see the <link id="TStrListMaker.Store">Store</link> method.
  2890. </descr>
  2891. <errors>
  2892. None.
  2893. </errors>
  2894. <seealso>
  2895. <link id="TStrListMaker.Store"/>
  2896. </seealso>
  2897. </element>
  2898. <element name="TStrListMaker.Store">
  2899. <short>Write the strings to the stream.</short>
  2900. <descr>
  2901. <var>Store</var> writes the collection of strings to the stream <var>S</var>.
  2902. The collection can then be read with the <var>TStringList</var> object.
  2903. </descr>
  2904. <errors>
  2905. A stream error may occur when writing the strings to the stream.
  2906. </errors>
  2907. <seealso>
  2908. <link id="TStringList.Load"/>
  2909. <link id="TStrListMaker.Put"/>
  2910. </seealso>
  2911. </element>
  2912. <element name="InvalidHandle">
  2913. <short>Value for invalid handle. Initial value for file stream handles or when the stream is closed.</short>
  2914. </element>
  2915. <!-- function Visibility: default -->
  2916. <element name="CallVoidConstructor">
  2917. <short>Call a constructor with no arguments</short>
  2918. <descr>
  2919. <p>
  2920. <var>CallVoidConstructor</var> calls the constructor of an object.
  2921. <var>Ctor</var> is the address of the constructor, <var>Obj</var> is a
  2922. pointer to the instance. If it is <var>Nil</var>, then a new instance is
  2923. allocated. <var>VMT</var> is a pointer to the object's VMT. The return value
  2924. is a pointer to the instance.
  2925. </p>
  2926. <p>
  2927. Note that this can only be used on constructors that require no arguments.
  2928. </p>
  2929. </descr>
  2930. <errors>
  2931. If the constructor expects arguments, the stack may be corrupted.
  2932. </errors>
  2933. <seealso>
  2934. <link id="CallPointerConstructor"/>
  2935. <link id="CallPointerMethod"/>
  2936. <link id="CallVoidLocal"/>
  2937. <link id="CallPointerLocal"/>
  2938. <link id="CallVoidMethodLocal"/>
  2939. <link id="CallPointerMethodLocal"/>
  2940. </seealso>
  2941. </element>
  2942. <!-- function Visibility: default -->
  2943. <element name="CallPointerConstructor">
  2944. <short>Call a constructor with a pointer argument.</short>
  2945. <descr>
  2946. <p>
  2947. <var>CallVoidConstructor</var> calls the constructor of an object.
  2948. <var>Ctor</var> is the address of the constructor, <var>Obj</var> is a
  2949. pointer to the instance. If it is <var>Nil</var>, then a new instance is
  2950. allocated. <var>VMT</var> is a pointer to the object's VMT.
  2951. <var>Param1</var> is passed to the constructor. The return value
  2952. is a pointer to the instance.
  2953. </p>
  2954. <p>
  2955. Note that this can only be used on constructors that require a pointer as
  2956. the sole argument. It can also be used to call a constructor with a single
  2957. argument by reference.
  2958. </p>
  2959. </descr>
  2960. <errors>
  2961. If the constructor expects other arguments than a pointer, the stack may be corrupted.
  2962. </errors>
  2963. <seealso>
  2964. <link id="CallVoidConstructor"/>
  2965. <link id="CallPointerMethod"/>
  2966. <link id="CallVoidLocal"/>
  2967. <link id="CallPointerLocal"/>
  2968. <link id="CallVoidMethodLocal"/>
  2969. <link id="CallPointerMethodLocal"/>
  2970. </seealso>
  2971. </element>
  2972. <!-- function Visibility: default -->
  2973. <element name="CallVoidMethod">
  2974. <short>Call an object method</short>
  2975. <descr>
  2976. <var>CallVoidMethod</var> calls the method with address <var>Method</var>
  2977. for instance <var>Obj</var>. It returns a pointer to the instance.
  2978. </descr>
  2979. <errors>
  2980. If the method expects parameters, the stack may become corrupted.
  2981. </errors>
  2982. <seealso>
  2983. <link id="CallPointerMethod"/>
  2984. <link id="CallVoidLocal"/>
  2985. <link id="CallPointerLocal"/>
  2986. <link id="CallVoidMethodLocal"/>
  2987. <link id="CallPointerMethodLocal"/>
  2988. <link id="CallVoidConstructor"/>
  2989. <link id="CallPointerConstructor"/>
  2990. </seealso>
  2991. </element>
  2992. <!-- function Visibility: default -->
  2993. <element name="CallPointerMethod">
  2994. <short>Call a method with a single pointer argument</short>
  2995. <descr>
  2996. <var>CallPointerMethod</var> calls the method with address <var>Method</var>
  2997. for instance <var>Obj</var>. It passes <var>Param1</var> to the method as
  2998. the single argument. It returns a pointer to the instance.
  2999. </descr>
  3000. <errors>
  3001. If the method expects other parameters than a single pointer, the stack may become corrupted.
  3002. </errors>
  3003. <seealso>
  3004. <link id="CallVoidMethod"/>
  3005. <link id="CallVoidLocal"/>
  3006. <link id="CallPointerLocal"/>
  3007. <link id="CallVoidMethodLocal"/>
  3008. <link id="CallPointerMethodLocal"/>
  3009. <link id="CallVoidConstructor"/>
  3010. <link id="CallPointerConstructor"/>
  3011. </seealso>
  3012. </element>
  3013. <!-- function Visibility: default -->
  3014. <element name="CallVoidLocal">
  3015. <short>Call a local nested procedure.</short>
  3016. <descr>
  3017. <var>CallVoidLocal</var> calls the local procedure with address
  3018. <var>Func</var>, where <var>Frame</var> is the frame of the wrapping
  3019. function.
  3020. </descr>
  3021. <errors>
  3022. If the local function expects parameters, the stack may become corrupted.
  3023. </errors>
  3024. <seealso>
  3025. <link id="CallPointerMethod"/>
  3026. <link id="CallVoidMethod"/>
  3027. <link id="CallPointerLocal"/>
  3028. <link id="CallVoidMethodLocal"/>
  3029. <link id="CallPointerMethodLocal"/>
  3030. <link id="CallVoidConstructor"/>
  3031. <link id="CallPointerConstructor"/>
  3032. </seealso>
  3033. </element>
  3034. <!-- function Visibility: default -->
  3035. <element name="CallPointerLocal">
  3036. <short>Call a local nested function with a pointer argument</short>
  3037. <descr>
  3038. <var>CallPointerLocal</var> calls the local procedure with address
  3039. <var>Func</var>, where <var>Frame</var> is the frame of the wrapping
  3040. function. It passes <var>Param1</var> to the local function.
  3041. </descr>
  3042. <errors>
  3043. If the local function expects other parameters than a pointer, the stack may become corrupted.
  3044. </errors>
  3045. <seealso>
  3046. <link id="CallPointerMethod"/>
  3047. <link id="CallVoidMethod"/>
  3048. <link id="CallVoidLocal"/>
  3049. <link id="CallVoidMethodLocal"/>
  3050. <link id="CallPointerMethodLocal"/>
  3051. <link id="CallVoidConstructor"/>
  3052. <link id="CallPointerConstructor"/>
  3053. </seealso>
  3054. </element>
  3055. <!-- function Visibility: default -->
  3056. <element name="CallVoidMethodLocal">
  3057. <short>Call a local procedure of a method</short>
  3058. <descr>
  3059. <var>CallVoidMethodLocal</var> calls the local procedure with address
  3060. <var>Func</var>, where <var>Frame</var> is the frame of the wrapping
  3061. method.
  3062. </descr>
  3063. <errors>
  3064. If the local function expects parameters, the stack may become corrupted.
  3065. </errors>
  3066. <seealso>
  3067. <link id="CallPointerMethod"/>
  3068. <link id="CallVoidMethod"/>
  3069. <link id="CallPointerLocal"/>
  3070. <link id="CallVoidLocal"/>
  3071. <link id="CallPointerMethodLocal"/>
  3072. <link id="CallVoidConstructor"/>
  3073. <link id="CallPointerConstructor"/>
  3074. </seealso>
  3075. </element>
  3076. <!-- function Visibility: default -->
  3077. <element name="CallPointerMethodLocal">
  3078. <short>Call a local procedure of a method with a pointer argument</short>
  3079. <descr>
  3080. <var>CallPointerMethodLocal</var> calls the local procedure with address
  3081. <var>Func</var>, where <var>Frame</var> is the frame of the wrapping
  3082. method. It passes <var>Param1</var> to the local function.
  3083. </descr>
  3084. <errors>
  3085. If the local function expects other parameters than a pointer, the stack may become corrupted.
  3086. </errors>
  3087. <seealso>
  3088. <link id="CallPointerMethod"/>
  3089. <link id="CallVoidMethod"/>
  3090. <link id="CallPointerLocal"/>
  3091. <link id="CallVoidLocal"/>
  3092. <link id="CallVoidMethodLocal"/>
  3093. <link id="CallVoidConstructor"/>
  3094. <link id="CallPointerConstructor"/>
  3095. </seealso>
  3096. </element>
  3097. <!-- constant Visibility: default -->
  3098. <element name="DefaultTPCompatible">
  3099. <short>Default value for <link id="#rtl.objects.tstream.tpcompatible">tstream.tpcompatible</link></short>
  3100. <descr>
  3101. <var>DefaultTPCompatible</var> is used to initialize <link
  3102. id="tstream.tpcompatible">tstream.tpcompatible</link>.
  3103. </descr>
  3104. </element>
  3105. </module>
  3106. </package>
  3107. </fpdoc-descriptions>