typinfo.xml 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507
  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="typinfo">
  22. <short>Access Run-Time Type Information (RTTI)</short>
  23. <!-- \FPCexampledir{typinfex} -->
  24. <descr>
  25. <p>
  26. The <file>TypeInfo</file> unit contains many routines which can be used for
  27. the querying of the Run-Time Type Information (RTTI) which is generated
  28. by the compiler for classes that are compiled under the <var>{$M+}</var>
  29. switch. This information can be used to retrieve or set property values
  30. for published properties for totally unknown classes. In particular, it
  31. can be used to stream classes. The <var>TPersistent</var> class in the
  32. <file>Classes</file> unit is compiled in the <var>{$M+}</var> state and serves
  33. as the base class for all classes that need to be streamed.
  34. </p>
  35. <p>
  36. The unit should be compatible to the Delphi 5 unit with the same name.
  37. The only calls that are still missing are the Variant calls, since Free Pascal
  38. does not support the variant type yet.
  39. </p>
  40. <p>
  41. The examples in this chapter use a <file>rttiobj</file> file, which contains
  42. an object that has a published property of all supported types. It also
  43. contains some auxiliary routines and definitions.
  44. </p>
  45. </descr>
  46. <topic name="ExaminePropInfo">
  47. <short>Examining published property information</short>
  48. <descr>
  49. <p>
  50. Functions for retrieving or examining property information
  51. </p>
  52. <table>
  53. <th><td>Name</td><td>Description</td></th>
  54. <tr><td><link id="FindPropInfo"/></td><td>Getting property type information, With error checking.</td></tr>
  55. <tr><td><link id="GetPropInfo"/></td><td>Getting property type information, No error checking.</td></tr>
  56. <tr><td><link id="GetPropInfos"/></td><td>Find property information of a certain kind</td></tr>
  57. <tr><td><link id="GetObjectPropClass"/></td><td>Return the declared class of an object property </td></tr>
  58. <tr><td><link id="GetPropList"/></td><td>Get a list of all published properties</td></tr>
  59. <tr><td><link id="IsPublishedProp"/></td><td>Is a property published</td></tr>
  60. <tr><td><link id="IsStoredProp"/></td><td>Is a property stored</td></tr>
  61. <tr><td><link id="PropIsType"/></td><td>Is a property of a certain kind</td></tr>
  62. <tr><td><link id="PropType"/></td><td>Return the type of a property</td></tr>
  63. </table>
  64. </descr>
  65. </topic>
  66. <topic name="ManipulatePropValues">
  67. <short>Getting or setting property values</short>
  68. <descr>
  69. <p>
  70. Functions to set or set a property's value.
  71. </p>
  72. <table>
  73. <th><td>Name</td><td>Description</td></th>
  74. <tr><td><link id="GetEnumProp"/></td><td>Return the value of an enumerated type property</td></tr>
  75. <tr><td><link id="GetFloatProp"/></td><td>Return the value of a float property</td></tr>
  76. <tr><td><link id="GetInt64Prop"/></td><td>Return the value of an Int64 property</td></tr>
  77. <tr><td><link id="GetMethodProp"/></td><td>Return the value of a procedural type property</td></tr>
  78. <tr><td><link id="GetObjectProp"/></td><td>Return the value of an object property</td></tr>
  79. <tr><td><link id="GetOrdProp"/></td><td>Return the value of an ordinal type property</td></tr>
  80. <tr><td><link id="GetPropValue"/></td><td>Return the value of a property as a variant</td></tr>
  81. <tr><td><link id="GetSetProp"/></td><td>Return the value of a set property</td></tr>
  82. <tr><td><link id="GetStrProp"/></td><td>Return the value of a string property</td></tr>
  83. <tr><td><link id="GetVariantProp"/></td><td>Return the value of a variant property</td></tr>
  84. <tr><td><link id="SetEnumProp"/></td><td>Set the value of an enumerated type property</td></tr>
  85. <tr><td><link id="SetFloatProp"/></td><td>Set the value of a float property</td></tr>
  86. <tr><td><link id="SetInt64Prop"/></td><td>Set the value of an Int64 property</td></tr>
  87. <tr><td><link id="SetMethodProp"/></td><td>Set the value of a procedural type property</td></tr>
  88. <tr><td><link id="SetObjectProp"/></td><td>Set the value of an object property</td></tr>
  89. <tr><td><link id="SetOrdProp"/></td><td>Set the value of an ordinal type property</td></tr>
  90. <tr><td><link id="SetPropValue"/></td><td>Set the value of a property trhough a variant</td></tr>
  91. <tr><td><link id="SetSetProp"/></td><td>Set the value of a set property</td></tr>
  92. <tr><td><link id="SetStrProp"/></td><td>Set the value of a string property</td></tr>
  93. <tr><td><link id="SetVariantProp"/></td><td>Set the value of a variant property</td></tr>
  94. </table>
  95. </descr>
  96. </topic>
  97. <topic name="AuxiliaryTypinfo">
  98. <short>Auxiliary functions</short>
  99. <descr>
  100. <p>
  101. Other typinfo related functions.
  102. </p>
  103. <table>
  104. <th><td>Name</td><td>Description</td></th>
  105. <tr><td><link id="GetEnumName"/></td><td>Get an enumerated type element name</td></tr>
  106. <tr><td><link id="GetEnumValue"/></td><td>Get ordinal number of an enumerated tye, based on the name.</td></tr>
  107. <tr><td><link id="GetTypeData"/></td><td>Skip type name and return a pointer to the type data</td></tr>
  108. <tr><td><link id="SetToString"/></td><td>Convert a set to its string representation</td></tr>
  109. <tr><td><link id="StringToSet"/></td><td>Convert a string representation of a set to a set</td></tr>
  110. </table>
  111. </descr>
  112. </topic>
  113. <element name="BooleanIdents">
  114. <short>Names for boolean values</short>
  115. </element>
  116. <element name="DotSep">
  117. <short>Name separator character</short>
  118. </element>
  119. <element name="ptField">
  120. <short>Property acces directly from field</short>
  121. </element>
  122. <element name="ptStatic">
  123. <short>Property acces via static method</short>
  124. </element>
  125. <element name="ptVirtual">
  126. <short>Property acces via virtual method</short>
  127. </element>
  128. <element name="ptConst">
  129. <short>Constant used in acces method</short>
  130. </element>
  131. <element name="tkAny">
  132. <short>Any property type</short>
  133. </element>
  134. <element name="tkMethods">
  135. <short>Only method properties. (event handlers)</short>
  136. </element>
  137. <element name="tkProperties">
  138. <short>Real properties. (not methods)</short>
  139. </element>
  140. <element name="PShortString">
  141. <short>Pointer to shortstring</short>
  142. </element>
  143. <element name="PByte">
  144. <short>Pointer to byte</short>
  145. </element>
  146. <element name="PWord">
  147. <short>Pointer to Word</short>
  148. </element>
  149. <element name="PLongint">
  150. <short>Pointer to longint</short>
  151. </element>
  152. <element name="PBoolean">
  153. <short>Pointer to boolean</short>
  154. </element>
  155. <element name="PSingle">
  156. <short>Pointer to single</short>
  157. </element>
  158. <element name="PDouble">
  159. <short>Pointer to double</short>
  160. </element>
  161. <element name="PExtended">
  162. <short>Pointer to extended</short>
  163. </element>
  164. <element name="PComp">
  165. <short>Pointer to comp</short>
  166. </element>
  167. <element name="PFixed16">
  168. <short>Pointer to Fixed16</short>
  169. </element>
  170. <element name="Variant">
  171. <short>Dummy type. Do not use.</short>
  172. </element>
  173. <element name="TTypeKind">
  174. <short>Type of a property.</short>
  175. </element>
  176. <element name="tkString">
  177. <short>Alias for the <var>tsSString</var> enumeration value</short>
  178. </element>
  179. <element name="TTypeKind.tkUnknown">
  180. <short>Unknown property type.</short>
  181. </element>
  182. <element name="TTypeKind.tkInteger">
  183. <short>Integer property.</short>
  184. </element>
  185. <element name="TTypeKind.tkChar">
  186. <short>Char property.</short>
  187. </element>
  188. <element name="TTypeKind.tkEnumeration">
  189. <short>Enumeration type property.</short>
  190. </element>
  191. <element name="TTypeKind.tkFloat">
  192. <short>Float property.</short>
  193. </element>
  194. <element name="TTypeKind.tkSet">
  195. <short>Set property.</short>
  196. </element>
  197. <element name="TTypeKind.tkMethod">
  198. <short>Method property.</short>
  199. </element>
  200. <element name="TTypeKind.tkSString">
  201. <short>Shortstring property.</short>
  202. </element>
  203. <element name="TTypeKind.tkLString">
  204. <short>Longstring property.</short>
  205. </element>
  206. <element name="TTypeKind.tkAString">
  207. <short>Ansistring property.</short>
  208. </element>
  209. <element name="TTypeKind.tkWString">
  210. <short>Widestring property.</short>
  211. </element>
  212. <element name="TTypeKind.tkVariant">
  213. <short>Variant property.</short>
  214. </element>
  215. <element name="TTypeKind.tkArray">
  216. <short>Array property.</short>
  217. </element>
  218. <element name="TTypeKind.tkRecord">
  219. <short>Record property.</short>
  220. </element>
  221. <element name="TTypeKind.tkInterface">
  222. <short>Interface property.</short>
  223. </element>
  224. <element name="TTypeKind.tkClass">
  225. <short>Class property.</short>
  226. </element>
  227. <element name="TTypeKind.tkObject">
  228. <short>Object property.</short>
  229. </element>
  230. <element name="TTypeKind.tkWChar">
  231. <short>Widechar property.</short>
  232. </element>
  233. <element name="TTypeKind.tkBool">
  234. <short>Boolean property.</short>
  235. </element>
  236. <element name="TTypeKind.tkInt64">
  237. <short>Int64 property.</short>
  238. </element>
  239. <element name="TTypeKind.tkQWord">
  240. <short>QWord property.</short>
  241. </element>
  242. <element name="TTypeKind.tkDynArray">
  243. <short>Dynamical array property.</short>
  244. </element>
  245. <element name="TTypeKind.tkInterfaceRaw">
  246. <short>Raw interface property.</short>
  247. </element>
  248. <element name="TTOrdType">
  249. <short>Size and sign of ordinal property type.</short>
  250. <descr>
  251. If the property is and ordinal type, then <var>TTOrdType</var> determines
  252. the size and sign of the ordinal type:
  253. </descr>
  254. </element>
  255. <element name="TTOrdType.otSByte">
  256. <short>Signed byte</short>
  257. </element>
  258. <element name="TTOrdType.otUByte">
  259. <short>Unsigned byte</short>
  260. </element>
  261. <element name="TTOrdType.otSWord">
  262. <short>Signed word</short>
  263. </element>
  264. <element name="TTOrdType.otUWord">
  265. <short>Unsigned word</short>
  266. </element>
  267. <element name="TTOrdType.otSLong">
  268. <short>Signed longint</short>
  269. </element>
  270. <element name="TTOrdType.otULong">
  271. <short>Unsigned longing (Cardinal)</short>
  272. </element>
  273. <element name="TFloatType">
  274. <short>The size of a float type.</short>
  275. </element>
  276. <element name="TFloatType.ftSingle">
  277. <short>Single-sized float</short>
  278. </element>
  279. <element name="TFloatType.ftDouble">
  280. <short>Double-sized float</short>
  281. </element>
  282. <element name="TFloatType.ftExtended">
  283. <short>Extended-size float</short>
  284. </element>
  285. <element name="TFloatType.ftComp">
  286. <short>Comp-type float</short>
  287. </element>
  288. <element name="TFloatType.ftCurr">
  289. <short>Currency-type float</short>
  290. </element>
  291. <element name="TFloatType.ftFixed16">
  292. <short>16-bit float type</short>
  293. </element>
  294. <element name="TFloatType.ftFixed32">
  295. <short>32-bit float type.</short>
  296. </element>
  297. <element name="TMethodKind">
  298. <short>Method type description</short>
  299. </element>
  300. <element name="TMethodKind.mkProcedure">
  301. <short>Procedure method.</short>
  302. </element>
  303. <element name="TMethodKind.mkFunction">
  304. <short>Function method</short>
  305. </element>
  306. <element name="TMethodKind.mkConstructor">
  307. <short>Class constructor</short>
  308. </element>
  309. <element name="TMethodKind.mkDestructor">
  310. <short>Class Desctructor</short>
  311. </element>
  312. <element name="TMethodKind.mkClassProcedure">
  313. <short>Class procedure</short>
  314. </element>
  315. <element name="TMethodKind.mkClassFunction">
  316. <short>Class function</short>
  317. </element>
  318. <element name="TParamFlags">
  319. <short>The kind of parameter for a method</short>
  320. </element>
  321. <element name="TParamFlags.pfVar">
  322. <short>Parameter passed by reference</short>
  323. </element>
  324. <element name="TParamFlags.pfConst">
  325. <short>Parameter passed as const (reference)</short>
  326. </element>
  327. <element name="TParamFlags.pfArray">
  328. <short>Array parameter</short>
  329. </element>
  330. <element name="TParamFlags.pfAddress">
  331. <short>Address is passed</short>
  332. </element>
  333. <element name="TParamFlags.pfReference">
  334. <short>Reference passed</short>
  335. </element>
  336. <element name="TParamFlags.pfOut">
  337. <short>Out (by reference)</short>
  338. </element>
  339. <element name="TIntfFlag">
  340. <short>Type of interface.</short>
  341. </element>
  342. <element name="TIntfFlags">
  343. <short>Set of <link id="TIntfFlag"/>.</short>
  344. </element>
  345. <element name="TIntfFlagsBase">
  346. <short>Set of <link id="TIntfFlag"/>.</short>
  347. </element>
  348. <element name="TIntfFlag.ifHasGuid">
  349. <short>Interface has GUID identifier</short>
  350. </element>
  351. <element name="TIntfFlag.ifDispInterface">
  352. <short>Interface is a dual dispatch interface</short>
  353. </element>
  354. <element name="TIntfFlag.ifDispatch">
  355. <short>Interface is a dispatch interface</short>
  356. </element>
  357. <element name="TTypeKinds">
  358. <short>Set of <link id="TTypeKind"/> enumeration.</short>
  359. </element>
  360. <element name="TTypeInfo">
  361. <short>Type information record</short>
  362. <descr>
  363. <p>
  364. The <var>TypeInfo</var> function returns a pointer to a <var>TTypeInfo</var>
  365. record.
  366. </p>
  367. <p>
  368. Note that the Name field is stored with as much bytes as needed to store the name,
  369. it is not padded to 255 characters.
  370. The type data immediatly follows the <var>TTypeInfo</var> record as a <link
  371. id="TTypeData"/> record.
  372. </p>
  373. </descr>
  374. </element>
  375. <element name="TTypeInfo.Name">
  376. <short>Type name</short>
  377. </element>
  378. <element name="TTypeInfo.Kind">
  379. <short>Type kind</short>
  380. </element>
  381. <element name="PTypeInfo">
  382. <short>Pointer to <link id="TTypeInfo"/> record</short>
  383. </element>
  384. <element name="PPTypeInfo">
  385. <short>Pointer to <link id="PTypeInfo"/> pointer</short>
  386. </element>
  387. <element name="PTypeData">
  388. <short>Pointer to <link id="TTypeData"/> record.</short>
  389. </element>
  390. <element name="TTypeData">
  391. <short>Class properties type data record.</short>
  392. <descr>
  393. <p>
  394. If the typeinfo kind is <var>tkClass</var>, then the property
  395. information follows the <var>UnitName</var> string, as an array of <link
  396. id="TPropInfo"/> records.
  397. </p>
  398. </descr>
  399. </element>
  400. <element name="TPropData">
  401. <short>Property data record</short>
  402. <descr>
  403. The <var>TPropData</var> record is not used, but is provided for completeness and
  404. compatibility with Delphi.
  405. </descr>
  406. </element>
  407. <element name="PPropInfo">
  408. <short>Pointer to <link id="TPropInfo"/> record</short>
  409. </element>
  410. <element name="TPropInfo">
  411. <short>Record describing one published property of a class</short>
  412. <descr>
  413. <p>
  414. The <var>TPropInfo</var> record describes one published property of a class.
  415. The property information of a class are stored as an array of
  416. <var>TPropInfo</var> records.
  417. </p>
  418. <p>
  419. The <var>Name</var> field is stored not with 255 characters, but with just as many characters
  420. as required to store the name.
  421. </p>
  422. </descr>
  423. </element>
  424. <element name="TPropInfo.PropType">
  425. <short>Property type</short>
  426. </element>
  427. <element name="TPropInfo.GetProc">
  428. <short>Read handler</short>
  429. </element>
  430. <element name="TPropInfo.SetProc">
  431. <short>Write handler</short>
  432. </element>
  433. <element name="TPropInfo.StoredProc">
  434. <short>Procedure pointer for stored keyword.</short>
  435. </element>
  436. <element name="TPropInfo.Index">
  437. <short>Index for array properties</short>
  438. </element>
  439. <element name="TPropInfo.Default">
  440. <short>Default value</short>
  441. </element>
  442. <element name="TPropInfo.NameIndex">
  443. <short>Index for indexed properties</short>
  444. </element>
  445. <element name="TPropInfo.PropProcs">
  446. <short>Flags describing property procedures.</short>
  447. </element>
  448. <element name="TPropInfo.Name">
  449. <short>Property name</short>
  450. </element>
  451. <element name="TProcInfoProc">
  452. <short>Property info callback method</short>
  453. </element>
  454. <element name="TPropList">
  455. <short>Array of property information pointers</short>
  456. </element>
  457. <element name="PPropList">
  458. <short>Pointer to <link id="TPropList"/></short>
  459. </element>
  460. <element name="EPropertyError">
  461. <short>Exception raised in case of an error in one of the functions.</short>
  462. </element>
  463. <element name="FindPropInfo">
  464. <short>Return property information by property name.</short>
  465. <descr>
  466. <p>
  467. <var>FindPropInfo</var> examines the published property information of a class and
  468. returns a pointer to the property information for property <var>PropName</var>.
  469. The class to be examined can be specified in one of two ways:
  470. </p>
  471. <dl>
  472. <dt>AClass</dt><dd> a class pointer.</dd>
  473. <dt>Instance</dt><dd> an instance of the class to be investigated.</dd>
  474. </dl>
  475. <p>
  476. If the property does not exist, a <var>EPropertyError</var> exception will be
  477. raised. The <link id="GetPropInfo"/> function has the same function as the
  478. <var>FindPropInfo</var> function, but returns <var>Nil</var> if the property does not
  479. exist.
  480. </p>
  481. </descr>
  482. <errors>
  483. Specifying an invalid property name in <var>PropName</var> will result in an
  484. <var>EPropertyError</var> exception.
  485. </errors>
  486. <seealso>
  487. <link id="GetPropInfo"/>
  488. <link id="GetPropList"/>
  489. <link id="GetPropInfos"/>
  490. </seealso>
  491. <example file="typinfex/ex14"/>
  492. </element>
  493. <element name="GetEnumName">
  494. <short>Return name of enumeration constant.</short>
  495. <descr>
  496. <p>
  497. <var>GetEnumName</var> scans the type information for the enumeration type
  498. described by <var>TypeInfo</var> and returns the name of the enumeration
  499. constant for the element with ordinal value equal to <var>Value</var>.
  500. </p>
  501. <p>
  502. If <var>Value</var> is out of range, the first element of the enumeration type
  503. is returned. The result is lowercased, but this may change in the future.
  504. </p>
  505. <p>
  506. This can be used in combination with <var>GetOrdProp</var> to stream a property
  507. of an enumerated type.
  508. </p>
  509. </descr>
  510. <errors>
  511. No check is done to determine whether <var>TypeInfo</var> really points to the
  512. type information for an enumerated type.
  513. </errors>
  514. <seealso>
  515. <link id="GetOrdProp"/>
  516. <link id="GetEnumValue"/>
  517. </seealso>
  518. <example file="typinfex/ex9"/>
  519. </element>
  520. <element name="GetEnumProp">
  521. <short>Return the value of an enumeration type property.</short>
  522. <descr>
  523. <var>GetEnumProp</var> returns the value of an property of an enumerated type
  524. and returns the name of the enumerated value for the objetc <var>Instance</var>.
  525. The property whose value must be returned can be specified by its property
  526. info in <var>PropInfo</var> or by its name in <var>PropName</var>
  527. </descr>
  528. <errors>
  529. No check is done to determine whether <var>PropInfo</var> really points to the
  530. property information for an enumerated type.
  531. Specifying an invalid property name in <var>PropName</var> will result in an
  532. <var>EPropertyError</var> exception.
  533. </errors>
  534. <seealso>
  535. <link id="SetEnumProp"/>
  536. <link id="GetOrdProp"/>
  537. <link id="GetStrProp"/>
  538. <link id="GetInt64Prop"/>
  539. <link id="GetMethodProp"/>
  540. <link id="GetSetProp"/>
  541. <link id="GetObjectProp"/>
  542. <link id="GetEnumProp"/>
  543. </seealso>
  544. <example file="typinfex/ex2"/>
  545. </element>
  546. <element name="GetEnumValue">
  547. <short>Get ordinal value for enumerated type by name</short>
  548. <descr>
  549. <p>
  550. <var>GetEnumValue</var> scans the type information for the enumeration type
  551. described by <var>TypeInfo</var> and returns the ordinal value for the element
  552. in the enumerated type that has identifier <var>Name</var>. The identifier is
  553. searched in a case-insensitive manner.
  554. </p>
  555. <p>
  556. This can be used to set the value of enumerated properties from a stream.
  557. </p>
  558. <p>
  559. For an example, see <link id="GetEnumName"/>.
  560. </p>
  561. </descr>
  562. <errors>
  563. If <var>Name</var> is not found in the list of enumerated values, then -1 is
  564. returned. No check is done whether <var>TypeInfo</var> points to the type information
  565. for an enumerated type.
  566. </errors>
  567. <seealso>
  568. <link id="GetEnumName"/>
  569. <link id="SetOrdProp"/>
  570. </seealso>
  571. </element>
  572. <element name="GetFloatProp">
  573. <short>Return value of floating point property</short>
  574. <descr>
  575. <var>GetFloatProp</var> returns the value of the float property described by
  576. <var>PropInfo</var> or with name <var>Propname</var> for the object <var>Instance</var>.
  577. All float types are converted
  578. to extended.
  579. </descr>
  580. <errors>
  581. No checking is done whether <var>Instance</var> is non-nil, or whether
  582. <var>PropInfo</var> describes a valid float property of <var>Instance</var>.
  583. Specifying an invalid property name in <var>PropName</var> will result in an
  584. <var>EPropertyError</var> exception.
  585. </errors>
  586. <seealso>
  587. <link id="SetFloatProp"/>
  588. <link id="GetOrdProp"/>
  589. <link id="GetStrProp"/>
  590. <link id="GetInt64Prop"/>
  591. <link id="GetMethodProp"/>
  592. <link id="GetSetProp"/>
  593. <link id="GetObjectProp"/>
  594. <link id="GetEnumProp"/>
  595. </seealso>
  596. <example file="typinfex/ex4"/>
  597. </element>
  598. <element name="GetInt64Prop">
  599. <short>return value of an Int64 property</short>
  600. <descr>
  601. <remark>
  602. Publishing of Int64 properties is not yet supported by Free Pascal. This
  603. function is provided for Delphi compatibility only at the moment.
  604. </remark>
  605. <p>
  606. <var>GetInt64Prop</var> returns the value of the property of type
  607. <var>Int64</var> that is described by <var>PropInfo</var> or with name <var>Propname</var>
  608. for the object <var>Instance</var>.
  609. </p>
  610. </descr>
  611. <errors>
  612. No checking is done whether <var>Instance</var> is non-nil, or whether
  613. <var>PropInfo</var> describes a valid <var>Int64</var> property of <var>Instance</var>.
  614. Specifying an invalid property name in <var>PropName</var> will result in an
  615. <var>EPropertyError</var> exception
  616. </errors>
  617. <seealso>
  618. <link id="SetInt64Prop"/>
  619. <link id="GetOrdProp"/>
  620. <link id="GetStrProp"/>
  621. <link id="GetFloatProp"/>
  622. <link id="GetMethodProp"/>
  623. <link id="GetSetProp"/>
  624. <link id="GetObjectProp"/>
  625. <link id="GetEnumProp"/>
  626. </seealso>
  627. <example file="typinfex/ex15"/>
  628. </element>
  629. <element name="GetMethodProp">
  630. <short>Return value of a method property</short>
  631. <descr>
  632. <p>
  633. <var>GetMethodProp</var> returns the method the property described by
  634. <var>PropInfo</var> or with name <var>Propname</var> for object <var>Instance</var>.
  635. The return type <var>TMethod</var> is defined in the <file>SysUtils</file> unit as:
  636. </p>
  637. <code>
  638. TMethod = packed record
  639. Code, Data: Pointer;
  640. end;
  641. </code>
  642. <p>
  643. <var>Data</var> points to the instance of the class with the method <var>Code</var>.
  644. </p>
  645. </descr>
  646. <errors>
  647. No checking is done whether <var>Instance</var> is non-nil, or whether
  648. <var>PropInfo</var> describes a valid method property of <var>Instance</var>.
  649. Specifying an invalid property name in <var>PropName</var> will result in an
  650. <var>EPropertyError</var> exception.
  651. </errors>
  652. <seealso>
  653. <link id="SetMethodProp"/>
  654. <link id="GetOrdProp"/>
  655. <link id="GetStrProp"/>
  656. <link id="GetFloatProp"/>
  657. <link id="GetInt64Prop"/>
  658. <link id="GetSetProp"/>
  659. <link id="GetObjectProp"/>
  660. <link id="GetEnumProp"/>
  661. </seealso>
  662. <example file="typinfex/ex6"/>
  663. </element>
  664. <element name="GetObjectProp">
  665. <short>Return value of an object-type property.</short>
  666. <descr>
  667. <p>
  668. <var>GetObjectProp</var> returns the object which the property described by
  669. <var>PropInfo</var> with name <var>Propname</var> points to for object <var>Instance</var>.
  670. </p>
  671. <p>
  672. If <var>MinClass</var> is specified, then if the object is not descendent of
  673. class <var>MinClass</var>, then <var>Nil</var> is returned.
  674. </p>
  675. </descr>
  676. <errors>
  677. No checking is done whether <var>Instance</var> is non-nil, or whether
  678. <var>PropInfo</var> describes a valid method property of <var>Instance</var>.
  679. Specifying an invalid property name in <var>PropName</var> will result in an
  680. <var>EPropertyError</var> exception.
  681. </errors>
  682. <seealso>
  683. <link id="SetMethodProp"/>
  684. <link id="GetOrdProp"/>
  685. <link id="GetStrProp"/>
  686. <link id="GetFloatProp"/>
  687. <link id="GetInt64Prop"/>
  688. <link id="GetSetProp"/>
  689. <link id="GetObjectProp"/>
  690. <link id="GetEnumProp"/>
  691. </seealso>
  692. <example file="typinfex/ex5"/>
  693. </element>
  694. <element name="GetObjectPropClass">
  695. <short>Return class of property.</short>
  696. <descr>
  697. <p>
  698. <var>GetObjectPropClass</var> returns the declared class of the property with name
  699. <var>PropName</var>. This may not be the actual class of the property value.
  700. </p>
  701. <p>
  702. For an example, see <link id="GetObjectProp"/>.
  703. </p>
  704. </descr>
  705. <errors>
  706. No checking is done whether <var>Instance</var> is non-nil.
  707. Specifying an invalid property name in <var>PropName</var> will result in an
  708. <var>EPropertyError</var> exception.
  709. </errors>
  710. <seealso>
  711. <link id="SetMethodProp"/>
  712. <link id="GetOrdProp"/>
  713. <link id="GetStrProp"/>
  714. <link id="GetFloatProp"/>
  715. <link id="GetInt64Prop"/>
  716. </seealso>
  717. </element>
  718. <element name="GetOrdProp">
  719. <short>Get the value of an ordinal property</short>
  720. <descr>
  721. <p>
  722. <var>GetOrdProp</var> returns the value of the ordinal property described by
  723. <var>PropInfo</var> or with name <var>PropName</var> for the object <var>Instance</var>.
  724. The value is returned as a longint, which should be typecasted to the
  725. needed type.
  726. </p>
  727. <p>
  728. Ordinal properties that can be retrieved include:
  729. </p>
  730. <dl>
  731. <dt>Integers and subranges of integers</dt>
  732. <dd>The value of the integer will be returned.</dd>
  733. <dt>Enumerated types and subranges of enumerated types</dt>
  734. <dd>The ordinal value of the enumerated type will be returned.</dd>
  735. <dt>Sets</dt>
  736. <dd>If the base type of the set has less than 31 possible values.
  737. If a bit is set in the return value, then the corresponding element of the
  738. base ordinal class of the set type must be included in the set.
  739. </dd>
  740. </dl>
  741. </descr>
  742. <errors>
  743. No checking is done whether <var>Instance</var> is non-nil, or whether
  744. <var>PropInfo</var> describes a valid ordinal property of <var>Instance</var>
  745. Specifying an invalid property name in <var>PropName</var> will result in an
  746. <var>EPropertyError</var> exception.
  747. </errors>
  748. <seealso>
  749. <link id="SetOrdProp"/>
  750. <link id="GetStrProp"/>
  751. <link id="GetFloatProp"/>
  752. <link id="GetInt64Prop"/>
  753. <link id="GetMethodProp"/>
  754. <link id="GetSetProp"/>
  755. <link id="GetObjectProp"/>
  756. <link id="GetEnumProp"/>
  757. </seealso>
  758. <example file="typinfex/ex1"/>
  759. </element>
  760. <element name="GetPropInfo">
  761. <short>Return property type information, by property name.</short>
  762. <descr>
  763. <p>
  764. <var>GetPropInfo</var> returns a pointer to the <var>TPropInfo</var> record for a the
  765. <var>PropName</var> property of a class. The class to examine can be specified
  766. in one of three ways:
  767. </p>
  768. <dl>
  769. <dt>Instance</dt><dd> An instance of the class.</dd>
  770. <dt>AClass</dt><dd> A class pointer to the class.</dd>
  771. <dt>TypeInfo</dt><dd> A pointer to the type information of the class.</dd>
  772. </dl>
  773. <p>
  774. In each of these three ways, if <var>AKinds</var> is specified, if the property
  775. has <var>TypeKind</var> which is not included in <var>Akinds</var>, <var>Nil</var> will be
  776. returned.
  777. </p>
  778. <p>
  779. For an example, see most of the other functions.
  780. </p>
  781. </descr>
  782. <errors>
  783. If the property <var>PropName</var> does not exist, <var>Nil</var> is returned.
  784. </errors>
  785. <seealso>
  786. <link id="GetPropInfos"/>
  787. <link id="GetPropList"/>
  788. </seealso>
  789. </element>
  790. <element name="GetPropInfos">
  791. <short>Return a list of published properties.</short>
  792. <descr>
  793. <var>GetPropInfos</var> stores pointers to the property information of all published
  794. properties of a class with class info <var>TypeInfo</var> in the list pointed to by
  795. <var>Proplist</var>. The <var>PropList</var> pointer must point to a memory location that
  796. contains enough space to hold all properties of the class and its parent classes.
  797. </descr>
  798. <errors>
  799. No checks are done to see whether <var>PropList</var> points to a memory area that
  800. is big enough to hold all pointers.
  801. </errors>
  802. <seealso>
  803. <link id="GetPropInfo"/>
  804. <link id="GetPropList"/>
  805. </seealso>
  806. <example file="typinfex/ex12"/>
  807. </element>
  808. <element name="GetPropList">
  809. <short>Return a list of a certain type of published properties.</short>
  810. <descr>
  811. <p>
  812. <var>GetPropList</var> stores pointers to property information of the class with class
  813. info <var>TypeInfo</var> for properties of kind <var>TypeKinds</var> in the list pointed to
  814. by <var>Proplist</var>. <var>PropList</var> must contain enough space to hold all properties.
  815. </p>
  816. <p>
  817. The function returns the number of pointers that matched the criteria and were stored
  818. in <var>PropList</var>.
  819. </p>
  820. </descr>
  821. <errors>
  822. No checks are done to see whether <var>PropList</var> points to a memory area that is big enough
  823. to hold all pointers.
  824. </errors>
  825. <seealso>
  826. <link id="GetPropInfos"/>
  827. <link id="GetPropInfo"/>
  828. </seealso>
  829. <example file="typinfex/ex13"/>
  830. </element>
  831. <element name="GetPropValue">
  832. <short>Get property value as a string.</short>
  833. <descr>
  834. Due to missing <var>Variant</var> support, <var>GetPropValue</var> is not yet implemented.
  835. The declaration is provided for compatibility with Delphi.
  836. </descr>
  837. <errors>
  838. </errors>
  839. <seealso>
  840. </seealso>
  841. </element>
  842. <element name="GetSetProp">
  843. <short>Return the value of a set property.</short>
  844. <descr>
  845. <p>
  846. <var>GetSetProp</var> returns the contents of a set property as a string.
  847. The property to be returned can be specified by it's name in <var>PropName</var>
  848. or by its property information in <var>PropInfo</var>.
  849. </p>
  850. <p>
  851. The returned set is a string representation of the elements in the set as
  852. returned by <link id="SetToString"/>. The <var>Brackets</var> option can be used to
  853. enclose the string representation in square brackets.
  854. </p>
  855. </descr>
  856. <errors>
  857. No checking is done whether <var>Instance</var> is non-nil, or whether
  858. <var>PropInfo</var> describes a valid ordinal property of <var>Instance</var>
  859. Specifying an invalid property name in <var>PropName</var> will result in an
  860. <var>EPropertyError</var> exception.
  861. </errors>
  862. <seealso>
  863. <link id="SetSetProp"/>
  864. <link id="GetStrProp"/>
  865. <link id="GetFloatProp"/>
  866. <link id="GetInt64Prop"/>
  867. <link id="GetMethodProp"/>
  868. </seealso>
  869. <example file="typinfex/ex7"/>
  870. </element>
  871. <element name="GetStrProp">
  872. <short>Return the value of a string property.</short>
  873. <descr>
  874. <var>GetStrProp</var> returns the value of the string property described by
  875. <var>PropInfo</var> or with name <var>PropName</var> for object <var>Instance</var>.
  876. </descr>
  877. <errors>
  878. No checking is done whether <var>Instance</var> is non-nil, or whether
  879. <var>PropInfo</var> describes a valid string property of <var>Instance</var>.
  880. Specifying an invalid property name in <var>PropName</var> will result in an
  881. <var>EPropertyError</var> exception.
  882. </errors>
  883. <seealso>
  884. <link id="SetStrProp"/>
  885. <link id="GetOrdProp"/>
  886. <link id="GetFloatProp"/>,
  887. <link id="GetInt64Prop"/>
  888. <link id="GetMethodProp"/>
  889. </seealso>
  890. <example file="typinfex/ex3"/>
  891. </element>
  892. <element name="GetTypeData">
  893. <short>Return a pointer to type data, based on type information.</short>
  894. <descr>
  895. <var>GetTypeData</var> returns a pointer to the <var>TTypeData</var> record that
  896. follows after the <var>TTypeInfo</var> record pointed to by <var>TypeInfo</var>.
  897. It essentially skips the <var>Kind</var> and <var>Name</var> fields in the
  898. <var>TTypeInfo</var> record.
  899. </descr>
  900. <errors>
  901. None.
  902. </errors>
  903. <seealso>
  904. </seealso>
  905. </element>
  906. <element name="GetVariantProp">
  907. <short>Return the value of a variant property.</short>
  908. <descr>
  909. Due to mising Variant support, the <var>GetVariantProp</var> function is not
  910. yet implemented. Provided for Delphi compatibility only.
  911. </descr>
  912. <errors>
  913. </errors>
  914. <seealso>
  915. <link id="SetVariantProp"/>
  916. </seealso>
  917. </element>
  918. <element name="IsPublishedProp">
  919. <short>Check whether a published property exists.</short>
  920. <descr>
  921. <p>
  922. <var>IsPublishedProp</var> returns true if a class has a published property with
  923. name <var>PropName</var>. The class can be specfied in one of two ways:
  924. </p>
  925. <dl>
  926. <dt>AClass</dt><dd> A class pointer to the class.</dd>
  927. <dt>Instance</dt><dd> An instance of the class.</dd>
  928. </dl>
  929. </descr>
  930. <errors>
  931. No checks are done to ensure <var>Instance</var> or <var>AClass</var> are valid
  932. pointers. Specifying an invalid property name in <var>PropName</var> will result
  933. in an <var>EPropertyError</var> exception.
  934. </errors>
  935. <seealso>
  936. <link id="IsStoredProp"/>
  937. <link id="PropIsType"/>
  938. </seealso>
  939. <example file="typinfex/ex10"/>
  940. </element>
  941. <element name="IsStoredProp">
  942. <short>Check whether a property is stored.</short>
  943. <descr>
  944. <p>
  945. <var>IsStoredProp</var> returns <var>True</var> if the <var>Stored</var> modifier evaluates
  946. to <var>True</var> for the property described by <var>PropInfo</var> or with name
  947. <var>PropName</var> for object <var>Instance</var>.
  948. It returns <var>False</var> otherwise. If the function returns
  949. <var>True</var>, this indicates that the property should be written when
  950. streaming the object <var>Instance</var>.
  951. </p>
  952. <p>
  953. If there was no <var>stored</var> modifier in the declaration of the property,
  954. <var>True</var> will be returned.
  955. </p>
  956. </descr>
  957. <errors>
  958. No checking is done whether <var>Instance</var> is non-nil, or whether
  959. <var>PropInfo</var> describes a valid property of <var>Instance</var>.
  960. Specifying an invalid property name in <var>PropName</var> will result in an
  961. <var>EPropertyError</var> exception.
  962. </errors>
  963. <seealso>
  964. <link id="IsPublishedProp"/>
  965. <link id="PropIsType"/>
  966. </seealso>
  967. <example file="typinfex/ex11"/>
  968. </element>
  969. <element name="PropIsType">
  970. <short>Check the type of a published property.</short>
  971. <descr>
  972. <p>
  973. <var>PropIsType</var> returns <var>True</var> if the property with name <var>PropName</var>
  974. has type <var>TypeKind</var>. It returns <var>False</var> otherwise. The class to be
  975. examined can be specified in one of two ways:
  976. </p>
  977. <dl>
  978. <dt>AClass</dt><dd> A class pointer. </dd>
  979. <dt>Instance</dt><dd> An instance of the class.</dd>
  980. </dl>
  981. </descr>
  982. <errors>
  983. No checks are done to ensure <var>Instance</var> or <var>AClass</var> are valid
  984. pointers.Specifying an invalid property name in <var>PropName</var> will result
  985. in an <var>EPropertyError</var> exception.
  986. </errors>
  987. <seealso>
  988. <link id="IsPublishedProp"/>
  989. <link id="IsStoredProp"/>
  990. <link id="PropType"/>
  991. </seealso>
  992. <example file="typinfex/ex16"/>
  993. </element>
  994. <element name="PropType">
  995. <short>Return the type of a property</short>
  996. <descr>
  997. <p>
  998. <var>Proptype</var> returns the type of the property <var>PropName</var> for a class.
  999. The class to be examined can be specified in one of 2 ways:
  1000. </p>
  1001. <dl>
  1002. <dt>AClass</dt><dd>A class pointer.</dd>
  1003. <dt>Instance</dt><dd>An instance of the class.</dd>
  1004. </dl>
  1005. </descr>
  1006. <errors>
  1007. No checks are done to ensure <var>Instance</var> or <var>AClass</var> are valid
  1008. pointers. Specifying an invalid property name in <var>PropName</var> will result
  1009. in an <var>EPropertyError</var> exception.
  1010. </errors>
  1011. <seealso>
  1012. <link id="IsPublishedProp"/>
  1013. <link id="IsStoredProp"/>
  1014. <link id="PropIsType"/>
  1015. </seealso>
  1016. <example file="typinfex/ex17"/>
  1017. </element>
  1018. <element name="SetEnumProp">
  1019. <short>Set value of an enumerated-type property</short>
  1020. <descr>
  1021. <p>
  1022. <var>SetEnumProp</var> sets the property described by <var>PropInfo</var> or with name
  1023. <var>PropName</var> to <var>Value</var>. <var>Value</var> must be a string with the name
  1024. of the enumerate value, i.e. it can be used as an argument to
  1025. <link id="GetEnumValue"/>.
  1026. </p>
  1027. <p>
  1028. For an example, see <link id="GetEnumProp"/>.
  1029. </p>
  1030. </descr>
  1031. <errors>
  1032. No checks are done to ensure <var>Instance</var> or <var>PropInfo</var> are valid
  1033. pointers. Specifying an invalid property name in <var>PropName</var> will result
  1034. in an <var>EPropertyError</var> exception.
  1035. </errors>
  1036. <seealso>
  1037. <link id="GetEnumProp"/>
  1038. <link id="SetStrProp"/>
  1039. <link id="SetFloatProp"/>
  1040. <link id="SetInt64Prop"/>
  1041. <link id="SetMethodProp"/>
  1042. </seealso>
  1043. </element>
  1044. <element name="SetFloatProp">
  1045. <short>Set value of a float property.</short>
  1046. <descr>
  1047. <p>
  1048. <var>SetFloatProp</var> assigns <var>Value</var> to the property described by
  1049. <var>PropInfo</var> or with name <var>Propname</var> for the object <var>Instance</var>.
  1050. </p>
  1051. <p>
  1052. For an example, see <link id="GetFloatProp"/>.
  1053. </p>
  1054. </descr>
  1055. <errors>
  1056. No checking is done whether <var>Instance</var> is non-nil, or whether
  1057. <var>PropInfo</var> describes a valid float property of <var>Instance</var>.
  1058. Specifying an invalid property name in <var>PropName</var> will result in an
  1059. <var>EPropertyError</var> exception.
  1060. </errors>
  1061. <seealso>
  1062. <link id="GetFloatProp"/>
  1063. <link id="SetOrdProp"/>
  1064. <link id="SetStrProp"/>,
  1065. <link id="SetInt64Prop"/>
  1066. <link id="SetMethodProp"/>
  1067. </seealso>
  1068. </element>
  1069. <element name="SetInt64Prop">
  1070. <short>Set value of a Int64 property</short>
  1071. <descr>
  1072. <p>
  1073. <var>SetInt64Prop</var> assigns <var>Value</var> to the property of type
  1074. <var>Int64</var> that is described by <var>PropInfo</var> or with name <var>Propname</var>
  1075. for the object <var>Instance</var>.
  1076. </p>
  1077. <p>
  1078. For an example, see <link id="GetInt64Prop"/>.
  1079. </p>
  1080. </descr>
  1081. <errors>
  1082. No checking is done whether <var>Instance</var> is non-nil, or whether
  1083. <var>PropInfo</var> describes a valid <var>Int64</var> property of <var>Instance</var>.
  1084. Specifying an invalid property name in <var>PropName</var> will result in an
  1085. <var>EPropertyError</var> exception.
  1086. </errors>
  1087. <seealso>
  1088. <link id="GetInt64Prop"/>
  1089. <link id="GetMethodProp"/>
  1090. <link id="SetOrdProp"/>
  1091. <link id="SetStrProp"/>
  1092. <link id="SetFloatProp"/>
  1093. </seealso>
  1094. </element>
  1095. <element name="SetMethodProp">
  1096. <short>Set the value of a method property</short>
  1097. <descr>
  1098. <p>
  1099. <var>SetMethodProp</var> assigns <var>Value</var> to the method the property described
  1100. by <var>PropInfo</var> or with name <var>Propname</var> for object <var>Instance</var>.
  1101. </p>
  1102. <p>
  1103. The type <var>TMethod</var> of the <var>Value</var> parameter is defined in the
  1104. <file>SysUtils</file> unit as:
  1105. </p>
  1106. <code>
  1107. TMethod = packed record
  1108. Code, Data: Pointer;
  1109. end;
  1110. </code>
  1111. <p>
  1112. <var>Data</var> should point to the instance of the class with the method <var>Code</var>.
  1113. </p>
  1114. <p>
  1115. For an example, see <link id="GetMethodProp"/>.
  1116. </p>
  1117. </descr>
  1118. <errors>
  1119. No checking is done whether <var>Instance</var> is non-nil, or whether
  1120. <var>PropInfo</var> describes a valid method property of <var>Instance</var>.
  1121. Specifying an invalid property name in <var>PropName</var> will result in an
  1122. <var>EPropertyError</var> exception.
  1123. </errors>
  1124. <seealso>
  1125. <link id="GetMethodProp"/>
  1126. <link id="SetOrdProp"/>
  1127. <link id="SetStrProp"/>
  1128. <link id="SetFloatProp"/>
  1129. <link id="SetInt64Prop"/>
  1130. </seealso>
  1131. </element>
  1132. <element name="SetObjectProp">
  1133. <short>Set the value of an object-type property.</short>
  1134. <descr>
  1135. <p>
  1136. <var>SetObjectProp</var> assigns <var>Value</var> to the the object property described by
  1137. <var>PropInfo</var> or with name <var>Propname</var> for the object <var>Instance</var>.
  1138. </p>
  1139. <p>
  1140. For an example, see <link id="GetObjectProp"/>.
  1141. </p>
  1142. </descr>
  1143. <errors>
  1144. No checking is done whether <var>Instance</var> is non-nil, or whether
  1145. <var>PropInfo</var> describes a valid method property of <var>Instance</var>.
  1146. Specifying an invalid property name in <var>PropName</var> will result in an
  1147. <var>EPropertyError</var> exception.
  1148. </errors>
  1149. <seealso>
  1150. <link id="GetObjectProp"/>
  1151. <link id="SetOrdProp"/>
  1152. <link id="SetStrProp"/>
  1153. <link id="SetFloatProp"/>
  1154. <link id="SetInt64Prop"/>
  1155. <link id="SetMethodProp"/>
  1156. </seealso>
  1157. </element>
  1158. <element name="SetOrdProp">
  1159. <short>Set value of an ordinal property</short>
  1160. <descr>
  1161. <p>
  1162. <var>SetOrdProp</var> assigns <var>Value</var> to the the ordinal property described by
  1163. <var>PropInfo</var> or with name <var>Propname</var> for the object <var>Instance</var>.
  1164. </p>
  1165. <p>
  1166. Ordinal properties that can be set include:
  1167. </p>
  1168. <dl>
  1169. <dt>Integers and subranges of integers</dt>
  1170. <dd>The actual value of the integer must be passed.</dd>
  1171. <dt>Enumerated types and subranges of enumerated types</dt>
  1172. <dd>The ordinal value of the enumerated type must be passed.</dd>
  1173. <dt>Subrange types</dt>
  1174. <dd>of integers or enumerated types. Here the ordinal value must be passed.</dd>
  1175. <dt>Sets</dt>
  1176. <dd> If the base type of the set has less than 31 possible values.
  1177. For each possible value; the corresponding bit of <var>Value</var> must be set.</dd>
  1178. </dl>
  1179. <p>
  1180. For an example, see <link id="GetOrdProp"/>.
  1181. </p>
  1182. </descr>
  1183. <errors>
  1184. No checking is done whether <var>Instance</var> is non-nil, or whether
  1185. <var>PropInfo</var> describes a valid ordinal property of <var>Instance</var>.
  1186. No range checking is performed.
  1187. Specifying an invalid property name in <var>PropName</var> will result in an
  1188. <var>EPropertyError</var> exception.
  1189. </errors>
  1190. <seealso>
  1191. <link id="GetOrdProp"/>
  1192. <link id="SetStrProp"/>
  1193. <link id="SetFloatProp"/>
  1194. <link id="SetInt64Prop"/>
  1195. <link id="SetMethodProp"/>
  1196. </seealso>
  1197. </element>
  1198. <element name="SetPropValue">
  1199. <short>Set property value as variant</short>
  1200. <descr>
  1201. Due to missing Variant support, this function is not yet implemented;
  1202. it is provided for Delphi compatibility only.
  1203. </descr>
  1204. <errors>
  1205. </errors>
  1206. <seealso>
  1207. </seealso>
  1208. </element>
  1209. <element name="SetSetProp">
  1210. <short>Set value of set-typed property.</short>
  1211. <descr>
  1212. <p>
  1213. <var>SetSetProp</var> sets the property specified by <var>PropInfo</var> or
  1214. <var>PropName</var> for object <var>Instance</var> to <var>Value</var>. <var>Value</var> is a
  1215. string which contains a comma-separated list of values, each value being a
  1216. string-representation of the enumerated value that should be included in
  1217. the set. The value should be accepted by the <link id="StringToSet"/> function.
  1218. </p>
  1219. <p>
  1220. The value can be formed using the <link id="SetToString"/> function.
  1221. </p>
  1222. <p>
  1223. For an example, see <link id="GetSetProp"/>.
  1224. </p>
  1225. </descr>
  1226. <errors>
  1227. No checking is done whether <var>Instance</var> is non-nil, or whether
  1228. <var>PropInfo</var> describes a valid ordinal property of <var>Instance</var>.
  1229. No range checking is performed.
  1230. Specifying an invalid property name in <var>PropName</var> will result in an
  1231. <var>EPropertyError</var> exception.
  1232. </errors>
  1233. <seealso>
  1234. <link id="GetSetProp"/>
  1235. <link id="SetOrdProp"/>
  1236. <link id="SetStrProp"/>
  1237. <link id="SetFloatProp"/>
  1238. <link id="SetInt64Prop"/>
  1239. <link id="SetMethodProp"/>
  1240. <link id="SetToString"/>
  1241. <link id="StringToSet"/>
  1242. </seealso>
  1243. </element>
  1244. <element name="SetStrProp">
  1245. <short>Set value of a string property</short>
  1246. <descr>
  1247. <p>
  1248. <var>SetStrProp</var> assigns <var>Value</var> to the string property described by
  1249. <var>PropInfo</var> or with name <var>Propname</var> for object <var>Instance</var>.
  1250. </p>
  1251. <p>
  1252. For an example, see <link id="GetStrProp"/>
  1253. </p>
  1254. </descr>
  1255. <errors>
  1256. No checking is done whether <var>Instance</var> is non-nil, or whether
  1257. <var>PropInfo</var> describes a valid string property of <var>Instance</var>.
  1258. Specifying an invalid property name in <var>PropName</var> will result in an
  1259. <var>EPropertyError</var> exception.
  1260. </errors>
  1261. <seealso>
  1262. <link id="GetStrProp"/>
  1263. <link id="SetOrdProp"/>
  1264. <link id="SetFloatProp"/>,
  1265. <link id="SetInt64Prop"/>
  1266. <link id="SetMethodProp"/>
  1267. </seealso>
  1268. </element>
  1269. <element name="SetToString">
  1270. <short>Convert set to a string description</short>
  1271. <descr>
  1272. <p>
  1273. <var>SetToString</var> takes an integer representation of a set (as received e.g.
  1274. by <var>GetOrdProp</var>) and turns it into a string representing the elements in
  1275. the set, based on the type information found in the <var>PropInfo</var> property
  1276. information. By default, the string representation is not surrounded by
  1277. square brackets. Setting the <var>Brackets</var> parameter to <var>True</var> will
  1278. surround the string representation with brackets.
  1279. </p>
  1280. <p>
  1281. The function returns the string representation of the set.
  1282. </p>
  1283. </descr>
  1284. <errors>
  1285. No checking is done to see whether <var>PropInfo</var> points to valid property
  1286. information.
  1287. </errors>
  1288. <seealso>
  1289. <link id="GetEnumName"/>
  1290. <link id="GetEnumValue"/>
  1291. <link id="StringToSet"/>
  1292. </seealso>
  1293. <example file="typinfex/ex18"/>
  1294. </element>
  1295. <element name="SetVariantProp">
  1296. <short>Set value of a variant property</short>
  1297. <descr>
  1298. Due to missing Variant support, this function is not yet implemented.
  1299. Provided for Delphi compatibility only.
  1300. </descr>
  1301. <errors>
  1302. </errors>
  1303. <seealso>
  1304. </seealso>
  1305. </element>
  1306. <element name="StringToSet">
  1307. <short>Convert string description to a set.</short>
  1308. <descr>
  1309. <p>
  1310. <var>StringToSet</var> converts the string representation of a set in <var>Value</var>
  1311. to a integer representation of the set, using the property information found
  1312. in <var>PropInfo</var>. This property information should point to the property
  1313. information of a set property. The function returns the integer
  1314. representation of the set. (i.e, the set value, typecast to an integer)
  1315. </p>
  1316. <p>
  1317. The string representation can be surrounded with square brackets, and must
  1318. consist of the names of the elements of the base type of the set. The base
  1319. type of the set should be an enumerated type. The elements should be
  1320. separated by commas, and may be surrounded by spaces.
  1321. each of the names will be fed to the <link id="GetEnumValue"/> function.
  1322. </p>
  1323. <p>
  1324. For an example, see <link id="SetToString"/>.
  1325. </p>
  1326. </descr>
  1327. <errors>
  1328. No checking is done to see whether <var>PropInfo</var> points to valid property
  1329. information. If a wrong name is given for an enumerated value, then an
  1330. <var>EPropertyError</var> will be raised.
  1331. </errors>
  1332. <seealso>
  1333. <link id="GetEnumName"/>
  1334. <link id="GetEnumValue"/>
  1335. <link id="SetToString"/>
  1336. </seealso>
  1337. </element>
  1338. </module>
  1339. </package>
  1340. </fpdoc-descriptions>