/usr/share/GNUstep/Documentation/Developer/Base/Reference/Functions.gsdoc is in gnustep-base-doc 1.25.1-2ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 | <?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.dtd">
<!--
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
-->
<gsdoc base="Functions" up="Base">
<head>
<title>Functions</title>
<author name="Richard Frith-Macdonald"></author>
<copy>2005 Free Software Foundation, Inc.</copy>
</head>
<body>
<front>
<contents />
<chapter>
<heading>Function index</heading>
<index type="function" scope="file" />
</chapter>
<chapter>
<heading>Macro index</heading>
<index type="macro" scope="file" />
</chapter>
</front>
<!--StartMacros-->
<!--StartNSBundleMacros-->
<chapter>
<heading>NSBundle macros</heading>
<p></p>
<macro name="NSLocalizedString" ovadd="1.0.0">
<arg>key</arg>
<arg>comment</arg>
<desc>
<p>
This function (macro) is used to get the localized
translation of the string
<code><var>key</var></code>.
<code><var>key</var></code> is looked up in the
<code>Localizable.strings</code> file for the
current language. The current language is
determined by the available languages in which
the application is translated, and by using the
<code>NSLanguages</code> user defaults (which should
contain an array of the languages preferred by the
user, in order of preference).
</p>
<p>
Technically, the function works by calling
<code>localizedStringForKey:value:table:</code> on
the main bundle, using <code>@""</code> as value, and
<code>nil</code> as the table. The
<code><var>comment</var></code> is ignored when the
macro is expanded; but when we have tools which can
generate the <code>Localizable.strings</code>
files automatically from source code, the
<code><var>comment</var></code> will be used by the
tools and added as a <var>comment</var> before the
string to translate. Upon finding something like
</p>
<p>
<code>
NSLocalizedString (@"My useful string",
@"My useful <var>comment</var> about the string");
</code>
</p>
<p>
in the source code, the tools will generate a
<var>comment</var> and the line
</p>
<p>
<code>
" My useful string" = "My useful string";
</code>
</p>
<p>
in the <code>Localizable.strings</code> file (the
translator then can use this as a skeleton for
the <code>Localizable.strings</code> for his/her own
language, where she/he can replace the right hand
side with the translation in her/his own language).
The <var>comment</var> can help the translator to
decide how to translate when it is not clear how to
translate (because the original string is now out
of context, and out of context might not be so clear
what the string means). The <var>comment</var> is
totally ignored by the library code.
</p>
<p>
If you don't have a <var>comment</var> (because the
string is so self-explanatory that it doesn't need
it), you can leave it blank, by using <code>@""</code>
as a <var>comment</var>. If the string might be unclear
out of context, it is recommended that you add a
<var>comment</var> (even if it is unused for now).
</p>
</desc>
</macro>
<macro name="NSLocalizedStringFromTable" ovadd="1.0.0">
<arg>key</arg>
<arg>tbl</arg>
<arg>comment</arg>
<desc>
This function (macro) does the same as
<code>NSLocalizedString</code>, but uses the table
<code>table</code> rather than the default table. This
means that the string to translate will be looked up in
a different file than <code>Localizable.strings</code>. For
example, if you pass <code>DatabaseErrors</code> as
the <code>table</code>, the string will be looked up for
translation in the file
<code>DatabaseErrors.strings</code>. This allows you
to have the same string translated in different ways, by
having a different translation in different tables,
and choosing between the different translation by
choosing a different table.
</desc>
</macro>
<macro name="NSLocalizedStringFromTableInBundle" ovadd="1.0.0">
<arg>key</arg>
<arg>tbl</arg>
<arg>bundle</arg>
<arg>comment</arg>
<desc>
This function is the full-blown localization function
(it is actually a macro). It looks up the string
<code><var>key</var></code> for translation in the
table <code>table</code> of the <var>bundle</var>
<code><var>bundle</var></code> (please refer to the
NSBundle documentation for more information on how
this lookup is done). <code><var>comment</var></code> is
a <var>comment</var>, which is ignored by the library (it
is discarded when the macro is expanded) but which can be
used by tools which parse the source code and generate
strings table to provide a <var>comment</var> which
the translator can use when translating the string.
</desc>
</macro>
</chapter>
<!--EndNSBundleMacros-->
<!--StartNSDecimalMacros-->
<chapter>
<heading>NSDecimal macros</heading>
<p></p>
<macro name="NSDecimalMaxSize" ovadd="10.0.0">
<desc>
Give a precision of at least 38 decimal digits requires
128 bits.
</desc>
</macro>
</chapter>
<!--EndNSDecimalMacros-->
<!--StartNSExceptionMacros-->
<chapter>
<heading>NSException macros</heading>
<p></p>
<macro name="NSAssert" ovadd="1.0.0">
<arg>condition</arg>
<arg>desc</arg>
<desc>
Used in an ObjC method body. <br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception using <var>desc</var>
</desc>
</macro>
<macro name="NSAssert1" ovadd="1.0.0">
<arg>condition</arg>
<arg>desc</arg>
<arg>arg1</arg>
<desc>
Used in an ObjC method body. <br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception using <var>desc</var> and
<var>arg1</var>
</desc>
</macro>
<macro name="NSAssert2" ovadd="1.0.0">
<arg>condition</arg>
<arg>desc</arg>
<arg>arg1</arg>
<arg>arg2</arg>
<desc>
Used in an ObjC method body. <br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception using <var>desc</var> and
<var>arg1</var>, <var>arg2</var>
</desc>
</macro>
<macro name="NSAssert3" ovadd="1.0.0">
<arg>condition</arg>
<arg>desc</arg>
<arg>arg1</arg>
<arg>arg2</arg>
<arg>arg3</arg>
<desc>
Used in an ObjC method body. <br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception using <var>desc</var> and
<var>arg1</var>, <var>arg2</var>, <var>arg3</var>
</desc>
</macro>
<macro name="NSAssert4" ovadd="1.0.0">
<arg>condition</arg>
<arg>desc</arg>
<arg>arg1</arg>
<arg>arg2</arg>
<arg>arg3</arg>
<arg>arg4</arg>
<desc>
Used in an ObjC method body. <br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception using <var>desc</var> and
<var>arg1</var>, <var>arg2</var>, <var>arg3</var>,
<var>arg4</var>
</desc>
</macro>
<macro name="NSAssert5" ovadd="1.0.0">
<arg>condition</arg>
<arg>desc</arg>
<arg>arg1</arg>
<arg>arg2</arg>
<arg>arg3</arg>
<arg>arg4</arg>
<arg>arg5</arg>
<desc>
Used in an ObjC method body. <br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception using <var>desc</var> and
<var>arg1</var>, <var>arg2</var>, <var>arg3</var>,
<var>arg4</var>, <var>arg5</var>
</desc>
</macro>
<macro name="NSCAssert" ovadd="1.0.0">
<arg>condition</arg>
<arg>desc</arg>
<desc>
Used in plain C code (not in an ObjC method body).
<br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception using <var>desc</var>
</desc>
</macro>
<macro name="NSCAssert1" ovadd="1.0.0">
<arg>condition</arg>
<arg>desc</arg>
<arg>arg1</arg>
<desc>
Used in plain C code (not in an ObjC method body).
<br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception using <var>desc</var> and
<var>arg1</var>
</desc>
</macro>
<macro name="NSCAssert2" ovadd="1.0.0">
<arg>condition</arg>
<arg>desc</arg>
<arg>arg1</arg>
<arg>arg2</arg>
<desc>
Used in plain C code (not in an ObjC method body).
<br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception using <var>desc</var> and
<var>arg1</var>, <var>arg2</var>
</desc>
</macro>
<macro name="NSCAssert3" ovadd="1.0.0">
<arg>condition</arg>
<arg>desc</arg>
<arg>arg1</arg>
<arg>arg2</arg>
<arg>arg3</arg>
<desc>
Used in plain C code (not in an ObjC method body).
<br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception using <var>desc</var> and
<var>arg1</var>, <var>arg2</var>, <var>arg3</var>
</desc>
</macro>
<macro name="NSCAssert4" ovadd="1.0.0">
<arg>condition</arg>
<arg>desc</arg>
<arg>arg1</arg>
<arg>arg2</arg>
<arg>arg3</arg>
<arg>arg4</arg>
<desc>
Used in plain C code (not in an ObjC method body).
<br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception using <var>desc</var> and
<var>arg1</var>, <var>arg2</var>, <var>arg3</var>,
<var>arg4</var>
</desc>
</macro>
<macro name="NSCAssert5" ovadd="1.0.0">
<arg>condition</arg>
<arg>desc</arg>
<arg>arg1</arg>
<arg>arg2</arg>
<arg>arg3</arg>
<arg>arg4</arg>
<arg>arg5</arg>
<desc>
Used in plain C code (not in an ObjC method body).
<br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception using <var>desc</var> and
<var>arg1</var>, <var>arg2</var>, <var>arg3</var>,
<var>arg4</var>, <var>arg5</var>
</desc>
</macro>
<macro name="NSCParameterAssert" ovadd="1.0.0">
<arg>condition</arg>
<desc>
Used in plain C code (not in an ObjC method body).
<br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception saying that an invalid parameter
was supplied to the method.
</desc>
</macro>
<macro name="NSParameterAssert" ovadd="1.0.0">
<arg>condition</arg>
<desc>
Used in an ObjC method body. <br /> See
<ref type="class" id="NSAssertionHandler">NSAssertionHandler</ref>
for details. <br /> When <var>condition</var> is false,
raise an exception saying that an invalid parameter
was supplied to the method.
</desc>
</macro>
</chapter>
<!--EndNSExceptionMacros-->
<!--StartNSInvocationMacros-->
<chapter>
<heading>NSInvocation macros</heading>
<p></p>
<macro name="NS_INVOCATION" ovadd="1.0.0">
<arg>aClass</arg>
<arg>message</arg>
<vararg />
<desc>
Creates and returns an autoreleased invocation
containing a <var>message</var> to an instance of
the class. The 'message' consists of selector and
arguments like a standard ObjectiveC method call.
<br /> Before using the returned invocation, you need
to set its target.
</desc>
</macro>
<macro name="NS_MESSAGE" ovadd="1.0.0">
<arg>target</arg>
<arg>message</arg>
<vararg />
<desc>
Creates and returns an autoreleased invocation
containing a <var>message</var> to the
<var>target</var> object. The 'message' consists of
selector and arguments like a standard ObjectiveC
method call.
</desc>
</macro>
</chapter>
<!--EndNSInvocationMacros-->
<!--StartNSObjCRuntimeMacros-->
<chapter>
<heading>NSObjCRuntime macros</heading>
<p></p>
<macro name="FOUNDATION_EXPORT" ovadd="1.0.0">
<desc>
Declare the foundation export macro as an alias to
GS_EXPORT
</desc>
</macro>
<macro name="NS_CLASS_AVAILABLE" ovadd="1.0.0">
<vararg />
<desc>
Declare Apple availability macros for compatibility
purposes as no-ops.
</desc>
</macro>
</chapter>
<!--EndNSObjCRuntimeMacros-->
<!--EndMacros-->
<!--StartFunctions-->
<!--StartNSDebugFunctions-->
<chapter>
<heading>NSDebug functions</heading>
<p></p>
<function type="BOOL" name="GSDebugAllocationActive" ovadd="1.0.0">
<arg type="BOOL">active</arg>
<desc>
This function activates or deactivates object allocation
debugging. <br /> Returns the previous state.
<br /> You should call this function to activate
allocation debugging before using any of the other
allocation debugging functions such as
<ref type="function" id="GSDebugAllocationList">
GSDebugAllocationList()
</ref>
or
<ref type="function" id="GSDebugAllocationTotal">
GSDebugAllocationTotal()
</ref>
. <br /> Object allocation debugging should not affect
performance too much, and is very useful as it
allows you to monitor how many objects of each class
your application has allocated.
</desc>
</function>
<function type="void" name="GSDebugAllocationActiveRecordingObjects" ovadd="1.0.0">
<arg type="Class">c</arg>
<desc>
DEPRECATED... use GSDebugAllocationRecordObjects
instead.
</desc>
</function>
<function type="void" name="GSDebugAllocationAdd" ovadd="1.0.0">
<arg type="Class">c</arg>
<arg type="id">o</arg>
<desc>
Used internally by
<ref type="function" id="NSAllocateObject">
NSAllocateObject()
</ref>
... you probably don't need this.
</desc>
</function>
<function type="Class*" name="GSDebugAllocationClassList" ovadd="1.0.0">
<desc>
This function returns a NULL terminated array listing
all the classes for which statistical information has
been collected. Usually, you call this function, and
then loop on all the classes returned, and for each one
you get current, peak and total count by using
<ref type="function" id="GSDebugAllocationCount">
GSDebugAllocationCount()
</ref>
,
<ref type="function" id="GSDebugAllocationPeak">
GSDebugAllocationPeak()
</ref>
and
<ref type="function" id="GSDebugAllocationTotal">
GSDebugAllocationTotal()
</ref>
.
</desc>
</function>
<function type="int" name="GSDebugAllocationCount" ovadd="1.0.0">
<arg type="Class">c</arg>
<desc>
<p>
Returns the number of instances of the specified
class which are currently allocated. This number is
very important to detect memory leaks. If you notice
that this number is constantly increasing without
apparent reason, it is very likely a memory leak -
you need to check that you are correctly releasing
objects of this class, otherwise when your
application runs for a <strong>long</strong>
time, it will eventually allocate so many objects as
to eat up all your system's memory...
</p>
<p>
This function, like the ones below, returns the number
of objects allocated/released from the time when
<ref type="function" id="GSDebugAllocationActive">
GSDebugAllocationActive()
</ref>
was first called. A negative number means that in
total, there are less objects of this class
allocated now than there were when you called
<ref type="function" id="GSDebugAllocationActive">
GSDebugAllocationActive()
</ref>
; a positive one means there are more.
</p>
</desc>
</function>
<function type="const char*" name="GSDebugAllocationList" ovadd="1.0.0">
<arg type="BOOL">changeFlag</arg>
<desc>
This function returns a newline separated list of the
classes which have instances allocated, and the
instance counts. If the 'changeFlag' argument is
<code>YES</code> then the list gives the number of
instances allocated/deallocated since the function
was last called with that setting. This function only
returns the current count of instances (not the peak
or total count), but its output is ready to be displayed
or logged.
</desc>
</function>
<function type="const char*" name="GSDebugAllocationListAll" ovadd="1.0.0">
<desc>
This function returns a newline separated list of the
classes which have had instances allocated at any
point, and the total count of the number of instances
allocated for each class. The difference with
<ref type="function" id="GSDebugAllocationList">
GSDebugAllocationList()
</ref>
is that this function returns also classes which have no
objects allocated at the moment, but which had in the
past.
</desc>
</function>
<function type="NSArray*" name="GSDebugAllocationListRecordedObjects" ovadd="1.0.0">
<arg type="Class">c</arg>
<desc>
This function returns an array containing all the
allocated objects of a certain class which have
been recorded... to start the recording, you need to
invoke
<ref type="function" id="GSDebugAllocationRecordObjects">
GSDebugAllocationRecordObjects()
</ref>
. Presumably, you will immediately call
<ref type="method" id="-description" class="NSObject">
[NSObject -description]
</ref>
on them to find out the objects you are leaking. The
objects are returned in an autoreleased array, so
until the array is deallocated, the objects are not
released.
</desc>
</function>
<function type="int" name="GSDebugAllocationPeak" ovadd="1.0.0">
<arg type="Class">c</arg>
<desc>
Returns the peak number of instances of the specified
class which have been concurrently allocated. If this
number is very high, it means at some point in time
you had a situation with a huge number of objects of this
class allocated - this is an indicator that probably at
some point in time your application was using a lot of
memory - so you might want to investigate whether you
can prevent this problem by inserting autorelease pools
in your application's processing loops.
</desc>
</function>
<function type="BOOL" name="GSDebugAllocationRecordObjects" ovadd="1.0.0">
<arg type="Class">c</arg>
<arg type="BOOL">newState</arg>
<desc>
This function activates (or deactivates) tracking all
allocated instances of the specified class
<var>c</var>. <br /> Turning on tracking implicitly
turns on memory debug (counts) for all classes
(GSAllocationActive()). <br />
Deactivation of tracking releases all currently
tracked instances of the class (but deactivation of
general counting does not). <br /> The previous
tracking state as reported as the return value of
this function. <br /> This tracking can slow your
application down, so you should use it only when
you are into serious debugging. Usually, you will monitor
your application by using the functions
<ref type="function" id="GSDebugAllocationList">
GSDebugAllocationList()
</ref>
and similar, which do not slow things down much and
return * the number of allocated instances; when (if)
by studying the reports generated by these functions you
have found a leak of objects of a certain class, and if
you can't figure out how to fix it by looking at the
code, you can use this function to start tracking
allocated instances of that class, and the
following one can sometime allow you to list the
leaked objects directly.
</desc>
</function>
<function type="void" name="GSDebugAllocationRemove" ovadd="1.0.0">
<arg type="Class">c</arg>
<arg type="id">o</arg>
<desc>
Used internally by
<ref type="function" id="NSDeallocateObject">
NSDeallocateObject()
</ref>
... you probably don't need this.
</desc>
</function>
<function type="id" name="GSDebugAllocationTagRecordedObject" ovadd="1.0.0">
<arg type="id">object</arg>
<arg type="id">tag</arg>
<desc>
This function associates the supplied <var>tag</var>
with a recorded <var>object</var> and returns the
<var>tag</var> which was previously associated with it
(if any). <br /> If the <var>object</var> was not
recorded, the method returns <code>nil</code>
<br /> The <var>tag</var> is retained while it is
associated with the <var>object</var>. <br /> If
the tagged <var>object</var> is deallocated, the
<var>tag</var> is released (so you can track the
lifetime of the <var>object</var> by having the
<var>tag</var> perform some operation when it is
released). <br /> See also the
<ref type="function" id="NSDebugFRLog">
NSDebugFRLog()
</ref>
and
<ref type="function" id="NSDebugMRLog">
NSDebugMRLog()
</ref>
macros.
</desc>
</function>
<function type="int" name="GSDebugAllocationTotal" ovadd="1.0.0">
<arg type="Class">c</arg>
<desc>
Returns the total number of instances of the
specified class <var>c</var> which have been
allocated - basically the number of times you have
allocated an object of this class. If this number
is very high, it means you are creating a lot of objects
of this class; even if you are releasing them correctly,
you must not forget that allocating and deallocating
objects is usually one of the slowest things you can
do, so you might want to consider whether you can reduce
the number of allocations and deallocations that you are
doing - for example, by recycling objects of this
class, uniquing them, and/or using some sort of
flyweight pattern. It might also be possible that
you are unnecessarily creating too many objects of this
class. Well - of course some times there is nothing
you can do about it.
</desc>
</function>
<function type="void" name="GSSetDebugAllocationFunctions" ovadd="1.0.0">
<arg type="void(*)">newAddObjectFunc</arg>
<arg type="void(*)">newRemoveObjectFunc</arg>
<desc>
This functions allows to set own function callbacks for
debugging allocation of objects. Useful if you
intend to write your own object allocation code.
</desc>
</function>
<function type="NSUInteger" name="NSCountFrames" ovadd="1.0.0">
<desc>
Retrieve stack information. Use caution: uses
built-in gcc functions and currently only works up
to 100 frames.
</desc>
</function>
<function type="void*" name="NSFrameAddress" ovadd="1.0.0">
<arg type="NSUInteger">offset</arg>
<desc>
Retrieve stack information. Use caution: uses
built-in gcc functions and currently only works up
to 100 frames.
</desc>
</function>
<function type="void*" name="NSReturnAddress" ovadd="1.0.0">
<arg type="NSUInteger">offset</arg>
<desc>
Retrieve stack information. Use caution: uses
built-in gcc functions and currently only works up
to 100 frames.
</desc>
</function>
</chapter>
<!--EndNSDebugFunctions-->
<!--StartNSDecimalFunctions-->
<chapter>
<heading>NSDecimal functions</heading>
<p></p>
<function type="NSCalculationError" name="NSDecimalAdd" ovadd="10.0.0">
<arg type="NSDecimal*">result</arg>
<arg type="const NSDecimal*">left</arg>
<arg type="const NSDecimal*">right</arg>
<arg type="NSRoundingMode">mode</arg>
<desc>
Adds two decimals and returns <var>result</var> to
38-digit precision. See the
<ref type="protocol" id="(NSDecimalNumberBehaviors)"><NSDecimalNumberBehaviors></ref>
protocol for a description of <var>mode</var> and
the return value. The <var>result</var> should be
preallocated but can be the same as
<var>left</var> or <var>right</var>.
</desc>
</function>
<function type="void" name="NSDecimalCompact" ovadd="10.0.0">
<arg type="NSDecimal*">number</arg>
<desc>
Tries to reduce memory used to store <var>number</var>
internally.
</desc>
</function>
<function type="NSComparisonResult" name="NSDecimalCompare" ovadd="10.0.0">
<arg type="const NSDecimal*">leftOperand</arg>
<arg type="const NSDecimal*">rightOperand</arg>
<desc>
Returns <code>NSOrderedDescending</code>,
<code>NSOrderedSame</code>, or
<code>NSOrderedAscending</code> depending on whether
<var>leftOperand</var> is greater than, equal to, or
less than <var>rightOperand</var>.
</desc>
</function>
<function type="void" name="NSDecimalCopy" ovadd="10.0.0">
<arg type="NSDecimal*">destination</arg>
<arg type="const NSDecimal*">source</arg>
<desc>
Copies value of decimal number to preallocated
<var>destination</var>.
</desc>
</function>
<function type="NSCalculationError" name="NSDecimalDivide" ovadd="10.0.0">
<arg type="NSDecimal*">result</arg>
<arg type="const NSDecimal*">l</arg>
<arg type="const NSDecimal*">rr</arg>
<arg type="NSRoundingMode">mode</arg>
<desc>
Divides <var>l</var> by <var>rr</var> and returns
<var>result</var> to 38-digit precision. See the
<ref type="protocol" id="(NSDecimalNumberBehaviors)"><NSDecimalNumberBehaviors></ref>
protocol for a description of <var>mode</var> and
the return value. The <var>result</var> should be
preallocated but can be the same as
<var>l</var> or <var>rr</var>.
</desc>
</function>
<function type="double" name="NSDecimalDouble" ovadd="10.0.0">
<arg type="NSDecimal*">number</arg>
<desc>
Give back the value of a NSDecimal as a
<strong>double</strong> in (preallocated) result.
</desc>
</function>
<function type="void" name="NSDecimalFromComponents" ovadd="10.0.0">
<arg type="NSDecimal*">result</arg>
<arg type="unsigned long long int">mantissa</arg>
<arg type="short int">exponent</arg>
<arg type="BOOL">negative</arg>
<desc>
Create a NSDecimal with a <var>mantissa</var>,
<var>exponent</var> and a <var>negative</var> flag in
(preallocated) <var>result</var>.
</desc>
</function>
<function type="void" name="NSDecimalFromString" ovadd="10.0.0">
<arg type="NSDecimal*">result</arg>
<arg type="NSString*">numberValue</arg>
<arg type="NSDictionary*">locale</arg>
<desc>
Create a NSDecimal from a string using the
<var>locale</var>, in (preallocated) <var>result</var>.
</desc>
</function>
<function type="BOOL" name="NSDecimalIsNotANumber" ovadd="10.0.0">
<arg type="const NSDecimal*">decimal</arg>
<desc>
Returns whether <var>decimal</var> represents an
invalid number (i.e., an "NaN" as might result from
an overflow or a division by zero).
</desc>
</function>
<function type="void" name="NSDecimalMax" ovadd="10.0.0">
<arg type="NSDecimal*">result</arg>
<desc>
Give back the biggest NSDecimal in (preallocated)
<var>result</var>.
</desc>
</function>
<function type="void" name="NSDecimalMin" ovadd="10.0.0">
<arg type="NSDecimal*">result</arg>
<desc>
Give back the smallest NSDecimal in (preallocated)
<var>result</var>.
</desc>
</function>
<function type="NSCalculationError" name="NSDecimalMultiply" ovadd="10.0.0">
<arg type="NSDecimal*">result</arg>
<arg type="const NSDecimal*">l</arg>
<arg type="const NSDecimal*">r</arg>
<arg type="NSRoundingMode">mode</arg>
<desc>
Multiplies two decimals and returns
<var>result</var> to 38-digit precision. See the
<ref type="protocol" id="(NSDecimalNumberBehaviors)"><NSDecimalNumberBehaviors></ref>
protocol for a description of <var>mode</var> and
the return value. The <var>result</var> should be
preallocated but can be the same as
<var>l</var> or <var>r</var>.
</desc>
</function>
<function type="NSCalculationError" name="NSDecimalMultiplyByPowerOf10" ovadd="10.0.0">
<arg type="NSDecimal*">result</arg>
<arg type="const NSDecimal*">n</arg>
<arg type="short int">power</arg>
<arg type="NSRoundingMode">mode</arg>
<desc>
Multiplies <var>n</var> by 10^power and returns
<var>result</var> to 38-digit precision. See the
<ref type="protocol" id="(NSDecimalNumberBehaviors)"><NSDecimalNumberBehaviors></ref>
protocol for a description of <var>mode</var> and
the return value. The <var>result</var> should be
preallocated but can be the same as
<var>n</var>.
</desc>
</function>
<function type="NSCalculationError" name="NSDecimalNormalize" ovadd="10.0.0">
<arg type="NSDecimal*">n1</arg>
<arg type="NSDecimal*">n2</arg>
<arg type="NSRoundingMode">mode</arg>
<desc>
Sets the exponents of <var>n1</var> and <var>n2</var>
equal to one another, adjusting mantissas as necessary
to preserve values. This makes certain operations quicker.
</desc>
</function>
<function type="NSCalculationError" name="NSDecimalPower" ovadd="10.0.0">
<arg type="NSDecimal*">result</arg>
<arg type="const NSDecimal*">n</arg>
<arg type="NSUInteger">power</arg>
<arg type="NSRoundingMode">mode</arg>
<desc>
Raises <var>n</var> to <var>power</var> and returns
<var>result</var> to 38-digit precision. See the
<ref type="protocol" id="(NSDecimalNumberBehaviors)"><NSDecimalNumberBehaviors></ref>
protocol for a description of <var>mode</var> and
the return value. The <var>result</var> should be
preallocated but can be the same as
<var>n</var> or <var>power</var>.
</desc>
</function>
<function type="void" name="NSDecimalRound" ovadd="10.0.0">
<arg type="NSDecimal*">result</arg>
<arg type="const NSDecimal*">number</arg>
<arg type="NSInteger">scale</arg>
<arg type="NSRoundingMode">mode</arg>
<desc>
Rounds <var>number</var> to <var>result</var> such
that it has at most <var>scale</var> digits to the right
of its decimal point, according to <var>mode</var> (see
the
<ref type="protocol" id="(NSDecimalNumberBehaviors)"><NSDecimalNumberBehaviors></ref>
protocol). The <var>result</var> should be
preallocated but can be the same as
<var>number</var>.
</desc>
</function>
<function type="NSString*" name="NSDecimalString" ovadd="10.0.0">
<arg type="const NSDecimal*">decimal</arg>
<arg type="NSDictionary*">locale</arg>
<desc>
Returns a string representing the full
<var>decimal</var> value, formatted according to
<var>locale</var> (send <code>nil</code> here for
default <var>locale</var>).
</desc>
</function>
<function type="NSCalculationError" name="NSDecimalSubtract" ovadd="10.0.0">
<arg type="NSDecimal*">result</arg>
<arg type="const NSDecimal*">left</arg>
<arg type="const NSDecimal*">right</arg>
<arg type="NSRoundingMode">mode</arg>
<desc>
Subtracts two decimals and returns
<var>result</var> to 38-digit precision. See the
<ref type="protocol" id="(NSDecimalNumberBehaviors)"><NSDecimalNumberBehaviors></ref>
protocol for a description of <var>mode</var> and
the return value. The <var>result</var> should be
preallocated but can be the same as
<var>left</var> or <var>right</var>.
</desc>
</function>
</chapter>
<!--EndNSDecimalFunctions-->
<!--StartNSExceptionFunctions-->
<chapter>
<heading>NSException functions</heading>
<p></p>
<function type="NSUncaughtExceptionHandler*" name="NSGetUncaughtExceptionHandler" ovadd="1.0.0">
<desc>
Returns the exception handler called when an
exception is generated and not caught by the
programmer (by enclosing in <code>NS_DURING</code>
and <code>NS_HANDLER</code>... <code>NS_ENDHANDLER</code>
). The default prints an error message and exits the
program. You can change this behavior by calling
<ref type="function" id="NSSetUncaughtExceptionHandler">
NSSetUncaughtExceptionHandler()
</ref>
.
</desc>
</function>
<function type="void" name="NSSetUncaughtExceptionHandler" ovadd="1.0.0">
<arg type="NSUncaughtExceptionHandler*">handler</arg>
<desc>
<p>
Sets the exception <var>handler</var> called when an
exception is generated and not caught by the
programmer (by enclosing in
<code>NS_DURING</code> and <code>NS_HANDLER</code>
... <code>NS_ENDHANDLER</code>). The default prints an
error message and exits the program. proc should take
a single argument of type <code>NSException *</code>.
</p>
<p>
NB. If the exception <var>handler</var> set by this
function does not terminate the process, the
process will be terminateed anyway. This is a
safety precaution to ensure that, in the event of an
exception being raised and not handled, the
program does not try to continue running in a
confused state (possibly doing horrible things
like billing customers who shouldn't be billed etc),
but shuts down as cleanly as possible.
</p>
<p>
Process termination is normally accomplished by
calling the standard exit function of the C runtime
library, but if the environment variable
CRASH_ON_ABORT is set to <code>YES</code> or
TRUE or 1 the termination will be accomplished by
calling the abort function instead, which should
cause a core dump to be made for debugging.
</p>
<p>
The value of proc should be a pointer to a function
taking an
<ref type="class" id="NSException">NSException</ref>
instance as an argument.
</p>
</desc>
</function>
<function type="void" name="NSUncaughtExceptionHandler" ovadd="1.0.0">
<arg type="NSException*">exception</arg>
<desc>
This is the type of the <var>exception</var> handler
called when an <var>exception</var> is generated and
not caught by the programmer. See
<ref type="function" id="NSGetUncaughtExceptionHandler">
NSGetUncaughtExceptionHandler()
</ref>
,
<ref type="function" id="NSSetUncaughtExceptionHandler">
NSSetUncaughtExceptionHandler()
</ref>
.
</desc>
</function>
<function type="void" name="_NSAddHandler" ovadd="1.0.0">
<arg type="NSHandler*">handler</arg>
<desc>
Private support routine. Do not call directly.
</desc>
</function>
<function type="void" name="_NSRemoveHandler" ovadd="1.0.0">
<arg type="NSHandler*">handler</arg>
<desc>
Private support routine. Do not call directly.
</desc>
</function>
</chapter>
<!--EndNSExceptionFunctions-->
<!--StartNSGeometryFunctions-->
<chapter>
<heading>NSGeometry functions</heading>
<p></p>
<function type="BOOL" name="NSContainsRect" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<arg type="NSRect">bRect</arg>
<desc>
Returns 'YES' iff <var>aRect</var> totally encloses
<var>bRect</var>. NOTE: For this to be the case,
<var>aRect</var> cannot be empty, nor can any side of
<var>bRect</var> go beyond any side of <var>aRect</var>
. Note that this behavior is different than the original
OpenStep behavior, where the sides of
<var>bRect</var> could not touch <var>aRect</var>.
</desc>
</function>
<function type="void" name="NSDivideRect" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<arg type="NSRect*">slice</arg>
<arg type="NSRect*">remainder</arg>
<arg type="CGFloat">amount</arg>
<arg type="NSRectEdge">edge</arg>
<desc>
Divides <var>aRect</var> into two rectangles (namely
<var>slice</var> and <var>remainder</var>) by "cutting"
aRect---parallel to, and a distance
<var>amount</var> from the given <var>edge</var> of
<var>aRect</var>. You may pass 0 in as either of
<var>slice</var> or <var>remainder</var> to avoid
obtaining either of the created rectangles.
</desc>
</function>
<function type="BOOL" name="NSEdgeInsetsEqual" ovadd="0.0.0">
<arg type="NSEdgeInsets">e1</arg>
<arg type="NSEdgeInsets">e2</arg>
<desc>
Compares two edge insets for equality.
</desc>
</function>
<function type="NSEdgeInsets" name="NSEdgeInsetsMake" ovadd="10.7.0">
<arg type="CGFloat">top</arg>
<arg type="CGFloat">left</arg>
<arg type="CGFloat">bottom</arg>
<arg type="CGFloat">right</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="BOOL" name="NSEqualPoints" ovadd="1.0.0">
<arg type="NSPoint">aPoint</arg>
<arg type="NSPoint">bPoint</arg>
<desc>
Returns 'YES' iff aPoint's and bPoint's x- and
y-coordinates are the same.
</desc>
</function>
<function type="BOOL" name="NSEqualRects" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<arg type="NSRect">bRect</arg>
<desc>
Test geometric relationships... <br /> Returns 'YES' iff
aRect's and bRect's origin and size are the same.
</desc>
</function>
<function type="BOOL" name="NSEqualSizes" ovadd="1.0.0">
<arg type="NSSize">aSize</arg>
<arg type="NSSize">bSize</arg>
<desc>
Returns 'YES' iff aSize's and bSize's width and
height are the same.
</desc>
</function>
<function type="CGFloat" name="NSHeight" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<desc>
Returns aRect's height.
</desc>
</function>
<function type="NSRect" name="NSInsetRect" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<arg type="CGFloat">dX</arg>
<arg type="CGFloat">dY</arg>
<desc>
Returns the rectangle obtained by moving each of
aRect's horizontal sides inward by dy and each of
aRect's vertical sides inward by dx. <br /> NB. For
MacOS-X compatability, this is permitted to return a
rectanglew with nagative width or height, strange
as that seems.
</desc>
</function>
<function type="NSRect" name="NSIntegralRect" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<desc>
Returns a rectangle obtained by expanding
<var>aRect</var> minimally so that all four of its
defining components are integers.
</desc>
</function>
<function type="NSRect" name="NSIntersectionRect" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<arg type="NSRect">bRect</arg>
<desc>
Returns the largest rectangle which lies in both
<var>aRect</var> and <var>bRect</var>. If
<var>aRect</var> and <var>bRect</var> have empty
intersection (or, rather, intersection of
measure zero, since this includes having their
intersection be only a point or a line), then
the empty rectangle is returned.
</desc>
</function>
<function type="BOOL" name="NSIntersectsRect" ovadd="10.0.0">
<arg type="NSRect">aRect</arg>
<arg type="NSRect">bRect</arg>
<desc>
Returns <code>YES</code> if <var>aRect</var> and
<var>bRect</var> have non-zero intersection area
(intersecting at a line or a point doesn't
count).
</desc>
</function>
<function type="BOOL" name="NSIsEmptyRect" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<desc>
Returns 'YES' iff the area of <var>aRect</var> is
zero (i.e., iff either of aRect's width or height is
negative or zero).
</desc>
</function>
<function type="NSPoint" name="NSMakePoint" ovadd="1.0.0">
<arg type="CGFloat">x</arg>
<arg type="CGFloat">y</arg>
<desc>
Returns an NSPoint having x-coordinate X and
y-coordinate Y.
</desc>
</function>
<function type="NSRect" name="NSMakeRect" ovadd="1.0.0">
<arg type="CGFloat">x</arg>
<arg type="CGFloat">y</arg>
<arg type="CGFloat">w</arg>
<arg type="CGFloat">h</arg>
<desc>
Returns an NSRect having point of origin (
<var>x</var>, <var>y</var>) and size {<var>w</var>,
<var>h</var>}.
</desc>
</function>
<function type="NSSize" name="NSMakeSize" ovadd="1.0.0">
<arg type="CGFloat">w</arg>
<arg type="CGFloat">h</arg>
<desc>
Returns an NSSize having width <var>w</var> and
height <var>h</var>.
</desc>
</function>
<function type="CGFloat" name="NSMaxX" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<desc>
Returns the greatest x-coordinate value still inside
<var>aRect</var>.
</desc>
</function>
<function type="CGFloat" name="NSMaxY" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<desc>
Returns the greatest y-coordinate value still inside
<var>aRect</var>.
</desc>
</function>
<function type="CGFloat" name="NSMidX" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<desc>
Returns the x-coordinate of aRect's middle point.
</desc>
</function>
<function type="CGFloat" name="NSMidY" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<desc>
Returns the y-coordinate of aRect's middle point.
</desc>
</function>
<function type="CGFloat" name="NSMinX" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<desc>
Returns the least x-coordinate value still inside
<var>aRect</var>.
</desc>
</function>
<function type="CGFloat" name="NSMinY" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<desc>
Returns the least y-coordinate value still inside
<var>aRect</var>.
</desc>
</function>
<function type="BOOL" name="NSMouseInRect" ovadd="1.0.0">
<arg type="NSPoint">aPoint</arg>
<arg type="NSRect">aRect</arg>
<arg type="BOOL">flipped</arg>
<desc>
Returns 'YES' iff <var>aPoint</var> is inside
<var>aRect</var>.
</desc>
</function>
<function type="NSRect" name="NSOffsetRect" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<arg type="CGFloat">dx</arg>
<arg type="CGFloat">dy</arg>
<desc>
Returns the rectangle obtained by translating
<var>aRect</var> horizontally by <var>dx</var> and
vertically by <var>dy</var>.
</desc>
</function>
<function type="NSPoint" name="NSPointFromString" ovadd="1.0.0">
<arg type="NSString*">string</arg>
<desc>
Parses point from <var>string</var> of form "
<code>{x=a; y=b}</code> ". (0,0) returned if parsing
fails.
</desc>
</function>
<function type="BOOL" name="NSPointInRect" ovadd="1.0.0">
<arg type="NSPoint">aPoint</arg>
<arg type="NSRect">aRect</arg>
<desc>
Just like 'NSMouseInRect(<var>aPoint</var>,
<var>aRect</var>, <code>YES</code>)'.
</desc>
</function>
<function type="NSRect" name="NSRectFromString" ovadd="1.0.0">
<arg type="NSString*">string</arg>
<desc>
Parses point from <var>string</var> of form "
<code>{x=a; y=b; width=c; height=d}</code> ".
Rectangle of 0 size at origin returned if parsing
fails.
</desc>
</function>
<function type="NSSize" name="NSSizeFromString" ovadd="1.0.0">
<arg type="NSString*">string</arg>
<desc>
Parses size from <var>string</var> of form "
<code>{width=a; height=b}</code> ". Size of 0,0
returned if parsing fails.
</desc>
</function>
<function type="NSString*" name="NSStringFromPoint" ovadd="1.0.0">
<arg type="NSPoint">aPoint</arg>
<desc>
Returns an NSString of the form "{x=X; y=Y}", where X
and Y are the x- and y-coordinates of <var>aPoint</var>,
respectively. <br /> Get a String
Representation...
</desc>
</function>
<function type="NSString*" name="NSStringFromRect" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<desc>
Returns an NSString of the form "{x=X; y=Y; width=W;
height=H}", where X, Y, W, and H are the
x-coordinate, y-coordinate, width, and height
of <var>aRect</var>, respectively.
</desc>
</function>
<function type="NSString*" name="NSStringFromSize" ovadd="1.0.0">
<arg type="NSSize">aSize</arg>
<desc>
Returns an NSString of the form "{width=W;
height=H}", where W and H are the width and
height of <var>aSize</var>, respectively.
</desc>
</function>
<function type="NSRect" name="NSUnionRect" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<arg type="NSRect">bRect</arg>
<desc>
Returns the smallest rectangle which contains both
<var>aRect</var> and <var>bRect</var> (modulo a set of
measure zero). If either of <var>aRect</var> or
<var>bRect</var> is an empty rectangle, then the other
rectangle is returned. If both are empty, then the
empty rectangle is returned.
</desc>
</function>
<function type="CGFloat" name="NSWidth" ovadd="1.0.0">
<arg type="NSRect">aRect</arg>
<desc>
Returns aRect's width.
</desc>
</function>
</chapter>
<!--EndNSGeometryFunctions-->
<!--StartNSHashTableFunctions-->
<chapter>
<heading>NSHashTable functions</heading>
<p></p>
<function type="NSArray*" name="NSAllHashTableObjects" ovadd="1.0.0">
<arg type="NSHashTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="BOOL" name="NSCompareHashTables" ovadd="1.0.0">
<arg type="NSHashTable*">table1</arg>
<arg type="NSHashTable*">table2</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSHashTable*" name="NSCopyHashTableWithZone" ovadd="1.0.0">
<arg type="NSHashTable*">table</arg>
<arg type="NSZone*">zone</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSUInteger" name="NSCountHashTable" ovadd="1.0.0">
<arg type="NSHashTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSHashTable*" name="NSCreateHashTable" ovadd="1.0.0">
<arg type="NSHashTableCallBacks">callBacks</arg>
<arg type="NSUInteger">capacity</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSHashTable*" name="NSCreateHashTableWithZone" ovadd="1.0.0">
<arg type="NSHashTableCallBacks">callBacks</arg>
<arg type="NSUInteger">capacity</arg>
<arg type="NSZone*">zone</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void" name="NSEndHashTableEnumeration" ovadd="1.0.0">
<arg type="NSHashEnumerator*">enumerator</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSHashEnumerator" name="NSEnumerateHashTable" ovadd="1.0.0">
<arg type="NSHashTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void" name="NSFreeHashTable" ovadd="1.0.0">
<arg type="NSHashTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void*" name="NSHashGet" ovadd="1.0.0">
<arg type="NSHashTable*">table</arg>
<arg type="const void*">element</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void" name="NSHashInsert" ovadd="1.0.0">
<arg type="NSHashTable*">table</arg>
<arg type="const void*">element</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void*" name="NSHashInsertIfAbsent" ovadd="1.0.0">
<arg type="NSHashTable*">table</arg>
<arg type="const void*">element</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void" name="NSHashInsertKnownAbsent" ovadd="1.0.0">
<arg type="NSHashTable*">table</arg>
<arg type="const void*">element</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void" name="NSHashRemove" ovadd="1.0.0">
<arg type="NSHashTable*">table</arg>
<arg type="const void*">element</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void*" name="NSNextHashEnumeratorItem" ovadd="1.0.0">
<arg type="NSHashEnumerator*">enumerator</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void" name="NSResetHashTable" ovadd="1.0.0">
<arg type="NSHashTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSString*" name="NSStringFromHashTable" ovadd="1.0.0">
<arg type="NSHashTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
</chapter>
<!--EndNSHashTableFunctions-->
<!--StartNSMapTableFunctions-->
<chapter>
<heading>NSMapTable functions</heading>
<p></p>
<function type="NSArray*" name="NSAllMapTableKeys" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSArray*" name="NSAllMapTableValues" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="BOOL" name="NSCompareMapTables" ovadd="1.0.0">
<arg type="NSMapTable*">table1</arg>
<arg type="NSMapTable*">table2</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSMapTable*" name="NSCopyMapTableWithZone" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<arg type="NSZone*">zone</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSUInteger" name="NSCountMapTable" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSMapTable*" name="NSCreateMapTable" ovadd="1.0.0">
<arg type="NSMapTableKeyCallBacks">keyCallBacks</arg>
<arg type="NSMapTableValueCallBacks">valueCallBacks</arg>
<arg type="NSUInteger">capacity</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSMapTable*" name="NSCreateMapTableWithZone" ovadd="1.0.0">
<arg type="NSMapTableKeyCallBacks">keyCallBacks</arg>
<arg type="NSMapTableValueCallBacks">valueCallBacks</arg>
<arg type="NSUInteger">capacity</arg>
<arg type="NSZone*">zone</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void" name="NSEndMapTableEnumeration" ovadd="1.0.0">
<arg type="NSMapEnumerator*">enumerator</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSMapEnumerator" name="NSEnumerateMapTable" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void" name="NSFreeMapTable" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void*" name="NSMapGet" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<arg type="const void*">key</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void" name="NSMapInsert" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<arg type="const void*">key</arg>
<arg type="const void*">value</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void*" name="NSMapInsertIfAbsent" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<arg type="const void*">key</arg>
<arg type="const void*">value</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void" name="NSMapInsertKnownAbsent" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<arg type="const void*">key</arg>
<arg type="const void*">value</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="BOOL" name="NSMapMember" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<arg type="const void*">key</arg>
<arg type="void**">originalKey</arg>
<arg type="void**">value</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void" name="NSMapRemove" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<arg type="const void*">key</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="BOOL" name="NSNextMapEnumeratorPair" ovadd="1.0.0">
<arg type="NSMapEnumerator*">enumerator</arg>
<arg type="void**">key</arg>
<arg type="void**">value</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="void" name="NSResetMapTable" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSString*" name="NSStringFromMapTable" ovadd="1.0.0">
<arg type="NSMapTable*">table</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
</chapter>
<!--EndNSMapTableFunctions-->
<!--StartNSObjCRuntimeFunctions-->
<chapter>
<heading>NSObjCRuntime functions</heading>
<p></p>
<function type="NSRecursiveLock*" name="GSLogLock" ovadd="0.0.0" ovrem="0.0.0">
<desc>
Returns the lock used to protect the GNUstep
<ref type="function" id="NSLogv">
NSLogv()
</ref>
implementation. Use this to protect changes
to
<ref type="variable" id="_NSLogDescriptor">
_NSLogDescriptor
</ref>
and
<ref type="variable" id="_NSLog_printf_handler">
_NSLog_printf_handler
</ref>
</desc>
</function>
<function type="Class" name="NSClassFromString" ovadd="1.0.0">
<arg type="NSString*">aClassName</arg>
<desc>
Returns the class whose name is supplied in the
<var>aClassName</var> argument, or Nil if a
<code>nil</code> string is supplied. If no such class
has been loaded, the function returns Nil.
</desc>
</function>
<function type="const char*" name="NSGetSizeAndAlignment" ovadd="1.0.0">
<arg type="const char*">typePtr</arg>
<arg type="NSUInteger*">sizep</arg>
<arg type="NSUInteger*">alignp</arg>
<desc>
When provided with a C string containing encoded type
information, this method extracts size and
alignment information for the specified type into
the buffers pointed to by <var>sizep</var> and
<var>alignp</var>. <br /> If either <var>sizep</var> or
<var>alignp</var> is a null pointer, the corresponding
data is not extracted. <br /> The function returns a
pointer into the type information C string
immediately after the decoded information.
</desc>
</function>
<function type="void" name="NSLog" ovadd="1.0.0">
<arg type="NSString*">format</arg>
<vararg />
<desc>
<p>
Provides the standard OpenStep logging facility.
For details see the lower level
<ref type="function" id="NSLogv">
NSLogv()
</ref>
function (which this function uses).
</p>
<p>
GNUstep provides powerful alternatives for logging
... see
<ref type="function" id="NSDebugLog">
NSDebugLog()
</ref>
, <ref type="function" id="NSWarnLog">NSWarnLog()</ref>
and <ref type="function" id="GSPrintf">GSPrintf()</ref>
for example. We recommend the use of
<ref type="function" id="NSDebugLog">
NSDebugLog()
</ref>
and its relatives for debug purposes, and
<ref type="function" id="GSPrintf">
GSPrintf()
</ref>
for general log messages, with
<ref type="function" id="NSLog">
NSLog()
</ref>
being reserved for reporting possible/likely errors.
<ref type="function" id="GSPrintf">
GSPrintf()
</ref>
is declared in GSObjCRuntime.h.
</p>
</desc>
</function>
<function type="void" name="NSLog_printf_handler" ovadd="0.0.0" ovrem="0.0.0">
<arg type="NSString*">message</arg>
<desc>
OpenStep spec states that log messages go to stderr,
but just in case someone wants them to go somewhere else,
they can implement a function like this and assign a
pointer to it to _NSLog_printf_handler.
</desc>
</function>
<function type="void" name="NSLogv" ovadd="1.0.0">
<arg type="NSString*">format</arg>
<arg type="va_list">args</arg>
<desc>
The core logging function...
<p>
The function generates a standard log entry by
prepending process ID and date/time information
to your message, and ensuring that a newline is present
at the end of the message.
</p>
<p>
In GNUstep, the GSLogThread user default may be set to
<code>YES</code> in order to instruct this function
to include the name (if any) of the current thread after
the process ID. This can help you to track the behavior
of a multi-threaded program. <br /> Also the GSLogOffset
user default may be set to <code>YES</code> in order
to instruct this function to include the time zone
offset in the timestamp it logs (good when examining
debug logs from systems running in different
countries).
</p>
<p>
The resulting message is then passed to a handler
function to perform actual output. Locking is
performed around the call to the function
actually writing the message out, to ensure that
logging is thread-safe. However, the actual
creation of the message written is only as safe as
the
<ref type="method" id="-description" class="NSObject">
[NSObject -description]
</ref>
methods of the arguments you supply.
</p>
<p>
The function to write the data is pointed to by
<ref type="variable" id="_NSLog_printf_handler">
_NSLog_printf_handler
</ref>
</p>
</desc>
</function>
<function type="Protocol*" name="NSProtocolFromString" ovadd="10.5.0">
<arg type="NSString*">aProtocolName</arg>
<desc>
Returns the protocol whose name is supplied in the
<var>aProtocolName</var> argument, or 0 if a
<code>nil</code> string is supplied.
</desc>
</function>
<function type="SEL" name="NSSelectorFromString" ovadd="1.0.0">
<arg type="NSString*">aSelectorName</arg>
<desc>
Returns (creating if necessary) the selector whose
name is supplied in the <var>aSelectorName</var>
argument, or 0 if a <code>nil</code> string is
supplied.
</desc>
</function>
<function type="NSString*" name="NSStringFromClass" ovadd="1.0.0">
<arg type="Class">aClass</arg>
<desc>
Returns an
<ref type="class" id="NSString">NSString</ref>
object containing the class name for
<var>aClass</var>. If <var>aClass</var> is 0, returns
<code>nil</code>.
</desc>
</function>
<function type="NSString*" name="NSStringFromProtocol" ovadd="10.5.0">
<arg type="Protocol*">aProtocol</arg>
<desc>
Returns a string object containing the name for
<var>aProtocol</var>. If <var>aProtocol</var> is 0,
returns <code>nil</code>.
</desc>
</function>
<function type="NSString*" name="NSStringFromSelector" ovadd="1.0.0">
<arg type="SEL">aSelector</arg>
<desc>
Returns a string object containing the name for
<var>aSelector</var>. If <var>aSelector</var> is 0,
returns <code>nil</code>.
</desc>
</function>
</chapter>
<!--EndNSObjCRuntimeFunctions-->
<!--StartNSObjectFunctions-->
<chapter>
<heading>NSObject functions</heading>
<p></p>
<function type="id" name="NSAllocateObject" ovadd="1.0.0">
<arg type="Class">aClass</arg>
<arg type="NSUInteger">extraBytes</arg>
<arg type="NSZone*">zone</arg>
<desc>
Used to allocate memory to hold an object, and
initialise the class of the object to be
<var>aClass</var> etc. The allocated memory will be
<var>extraBytes</var> larger than the space actually
needed to hold the instance variables of the object.
<br /> This function is used by the
<ref type="method" id="+allocWithZone:" class="NSObject">
[NSObject +allocWithZone:]
</ref>
method.
</desc>
</function>
<function type="NSObject*" name="NSCopyObject" ovadd="1.0.0">
<arg type="NSObject*">anObject</arg>
<arg type="NSUInteger">extraBytes</arg>
<arg type="NSZone*">zone</arg>
<desc>
Used to copy <var>anObject</var>. This makes a bitwise
copy of <var>anObject</var> to memory allocated from
<var>zone</var>. The allocated memory will be
<var>extraBytes</var> longer than that necessary to
actually store the instance variables of the copied
object. <br /> This is used by the NSObject
implementation of the
<ref type="method" id="-copyWithZone:" class="(NSCopying)">
[<NSCopying>-copyWithZone:]
</ref>
method.
</desc>
</function>
<function type="void" name="NSDeallocateObject" ovadd="1.0.0">
<arg type="id">anObject</arg>
<desc>
Used to release the memory used by an object. <br />
This function is used by the
<ref type="method" id="-dealloc" class="NSObject">
[NSObject -dealloc]
</ref>
method.
</desc>
</function>
<function type="BOOL" name="NSDecrementExtraRefCountWasZero" ovadd="1.0.0">
<arg type="id">anObject</arg>
<desc>
Examines the extra reference count for the object
and, if non-zero decrements it, otherwise leaves it
unchanged. <br /> Returns a flag to say whether
the count was zero (and hence whether the extra reference
count was decremented). <br />
</desc>
</function>
<function type="NSUInteger" name="NSExtraRefCount" ovadd="1.0.0">
<arg type="id">anObject</arg>
<desc>
Return the extra reference count of
<var>anObject</var> (a value in the range from 0 to the
maximum <strong>unsigned</strong> integer value minus
one). <br /> The retain count for an object is this
value plus one.
</desc>
</function>
<function type="void" name="NSIncrementExtraRefCount" ovadd="1.0.0">
<arg type="id">anObject</arg>
<desc>
Increments the extra reference count for
<var>anObject</var>. <br /> The GNUstep version raises
an exception if the reference count would be incremented
to too large a value. <br /> This is used by the
<ref type="method" id="-retain" class="NSObject">
[NSObject -retain]
</ref>
method.
</desc>
</function>
<function type="BOOL" name="NSShouldRetainWithZone" ovadd="1.0.0">
<arg type="NSObject*">anObject</arg>
<arg type="NSZone*">requestedZone</arg>
<desc>
Returns a flag to indicate whether
<var>anObject</var> should be retained or copied in
order to make a copy in the specified zone. <br />
Basically, this tests to see if
<var>anObject</var> was allocated from
<var>requestedZone</var> and returns <code>YES</code>
if it was.
</desc>
</function>
</chapter>
<!--EndNSObjectFunctions-->
<!--StartNSPathUtilitiesFunctions-->
<chapter>
<heading>NSPathUtilities functions</heading>
<p></p>
<function type="NSMutableDictionary*" name="GNUstepConfig" ovadd="0.0.0" ovrem="0.0.0">
<arg type="NSDictionary*">newConfig</arg>
<desc>
Returns a mutable copy of the system-wide
configuration used to determine paths to locate
files etc. <br /> If the <var>newConfig</var> argument
is non-nil it is used to set the config overriding any
other version. You should not change the config after
the user defaults system has been initialised as the new
config will not be picked up by the defaults system.
<br /> <br /> A typical sequence of operation might be
to <br /> Call the function with a <code>nil</code>
argument to obtain the configuration information
currently in use (usually obtained from the main
GNUstep configuration file). <br /> Modify the
dictionary contents. <br /> Call the function
again passing back in the modified config. <br />
<br /> If you call this function with a non-nil
argument before the system configuration file has
been read, you will prevent the file from being read.
However, you must take care doing this that creation
of the config dictionary you are going to pass in to the
function does not have any side-effects which would
cause the config file to be read earlier. <br /> If you
want to prevent the user specific config file from being
read, you must set the GNUSTEP_USER_CONFIG_FILE value
in the dictionary to be an empty string.
</desc>
</function>
<function type="void" name="GNUstepUserConfig" ovadd="0.0.0" ovrem="0.0.0">
<arg type="NSMutableDictionary*">config</arg>
<arg type="NSString*">userName</arg>
<desc>
The <var>config</var> dictionary passed to this function
should be a system-wide <var>config</var> as provided
by
<ref type="function" id="GNUstepConfig">
GNUstepConfig()
</ref>
... and this function merges in user specific
configuration file information if such a file
exists and is owned by the user. <br /> NB. If the
GNUSTEP_USER_CONFIG_FILE value in
the system-wide <var>config</var> is an empty string, no
user-specifc <var>config</var> will be read.
</desc>
</function>
<function type="NSString*" name="GSDefaultsRootForUser" ovadd="0.0.0" ovrem="0.0.0">
<arg type="NSString*">userName</arg>
<desc>
Returns the location of the defaults database for the
specified user. This uses the same information you
get from
<ref type="function" id="GNUstepConfig">
GNUstepConfig()
</ref>
and
<ref type="function" id="GNUstepUserConfig">
GNUstepUserConfig()
</ref>
and builds the path to the defaults database fromm it.
<br /> Return the path of the defaults directory for
<var>userName</var>. <br /> This examines the
GNUSTEP_USER_CONFIG_FILE for the
specified user, with settings in it over-riding
those in the main GNUstep.conf.
</desc>
</function>
<function type="void" name="GSSetUserName" ovadd="0.0.0" ovrem="0.0.0">
<arg type="NSString*">aName</arg>
<desc>
This extension permits a change of username from that
specified in the LOGNAME environment variable.
Using it will almost certainly cause trouble if the
process does not posses the file access privileges of
the new name. This is provided primarily for use by
processes that run as system-manager and need to
act as particular users. It uses the [NSUserDefaults
+resetUserDefaults] extension to reset
the defaults system to use the defaults belonging to the
new user.
</desc>
</function>
<function type="NSString*" name="NSFullUserName" ovadd="10.0.0">
<desc>
Returns the full username of the current user. If
unable to determine this, returns the standard user
name.
</desc>
</function>
<function type="NSString*" name="NSHomeDirectory" ovadd="1.0.0">
<desc>
Return the caller's home directory as an NSString
object. Calls
<ref type="function" id="NSHomeDirectoryForUser">
NSHomeDirectoryForUser()
</ref>
to do this.
</desc>
</function>
<function type="NSString*" name="NSHomeDirectoryForUser" ovadd="1.0.0">
<arg type="NSString*">loginName</arg>
<desc>
Returns loginName's home directory as an NSString
object. <br /> On most systems this returns the
directory specified in the system's password file
(ar at least whatever is returned by the standard
operating system API for retrieving password file
records), but on ms-windows this is determined by
examining the HOMEPATH and HOMEDRIVE environment
variables or (if those don't make sense) the
USERPROFILE environment variable.
</desc>
</function>
<function type="NSString*" name="NSOpenStepRootDirectory" ovadd="10.0.0">
<desc>
Returns the location of the <em>root</em> directory
of the file hierarchy. This lets you build paths in a
system independent manner (for instance the root on
unix is '/' but on windows it is 'C:\') by appending
path components to the root. <br /> Don't assume that
/System, /Network etc exist in this path (generally
they don't)! Use other path utility functions such as
<ref type="function" id="NSSearchPathForDirectoriesInDomains">NSSearchPathForDirectoriesInDomains()</ref> to find standard locations for libraries, applications etc. <br /> Refer to the GNUstep File System Hierarchy documentation for more info.
</desc>
</function>
<function type="NSArray*" name="NSSearchPathForDirectoriesInDomains" ovadd="10.0.0">
<arg type="NSSearchPathDirectory">directoryKey</arg>
<arg type="NSSearchPathDomainMask">domainMask</arg>
<arg type="BOOL">expandTilde</arg>
<desc>
Returns an array of search paths to look at for
resources. <br /> The paths are returned in domain
order: USER, LOCAL, NETWORK then SYSTEM. <br /> The
presence of a path in this list does <em>not</em>
mean that the path actually exists in the filesystem.
<br /> If you are wanting to locate an existing
resource, you should normally call this function
with NSAllDomainsMask, but if you wish to find the path
in which you should create a new file, you would generally
specify a particular domain, and then create the path
in the file system if it does not already exist.
</desc>
</function>
<function type="NSArray*" name="NSStandardApplicationPaths" ovadd="10.0.0">
<desc>
Returns the standard paths in which applications are
stored and should be searched for. Calls
<ref type="function" id="NSSearchPathForDirectoriesInDomains">NSSearchPathForDirectoriesInDomains()</ref> <br /> Refer to the GNUstep File System Hierarchy documentation for more info.
</desc>
</function>
<function type="NSArray*" name="NSStandardLibraryPaths" ovadd="10.0.0">
<desc>
Returns the standard paths in which resources are
stored and should be searched for. Calls
<ref type="function" id="NSSearchPathForDirectoriesInDomains">NSSearchPathForDirectoriesInDomains()</ref> <br /> Refer to the GNUstep File System Hierarchy documentation for more info.
</desc>
</function>
<function type="NSString*" name="NSTemporaryDirectory" ovadd="10.0.0">
<desc>
Returns the name of a directory in which temporary
files can be stored. Under GNUstep this is a location
which is not readable by other users. <br /> If a
suitable directory can't be found or created, this
function raises an NSGenericException.
</desc>
</function>
<function type="NSString*" name="NSUserName" ovadd="1.0.0">
<desc>
Return the caller's login name as an NSString object.
<br /> Under unix-like systems, the name associated
with the current effective user ID is used. <br /> Under
ms-windows, the 'LOGNAME' environment is used, or
if that fails, the
<ref type="function" id="GetUserName">
GetUserName()
</ref>
call is used to find the user name. <br /> Raises an
exception on failure.
</desc>
</function>
</chapter>
<!--EndNSPathUtilitiesFunctions-->
<!--StartNSProcessInfoFunctions-->
<chapter>
<heading>NSProcessInfo functions</heading>
<p></p>
<function type="BOOL" name="GSDebugSet" gvadd="0.0.0" gvrem="1.17.0">
<arg type="NSString*">level</arg>
<desc>
Function for rapid testing to see if a debug
<var>level</var> is set. <br /> This is used by the
debugging macros. <br /> If debug logging has been
turned off, this returns <code>NO</code> even if the
specified <var>level</var> exists in the set of
debug levels.
</desc>
</function>
<function type="void" name="GSInitializeProcess" gvadd="0.0.0" gvrem="1.17.0">
<arg type="int">argc</arg>
<arg type="char**">argv</arg>
<arg type="char**">envp</arg>
<desc>
Fallback/override function. <br /> The
developer must call this method to initialize the
NSProcessInfo system if none of the
system-specific hacks to auto-initialize it
are working. <br /> It is also safe to call this function
to override the effects of the automatic initialisation,
which some applications may need to do when using
GNUstep libraries embedded within other frameworks.
</desc>
</function>
</chapter>
<!--EndNSProcessInfoFunctions-->
<!--StartNSRangeFunctions-->
<chapter>
<heading>NSRange functions</heading>
<p></p>
<function type="BOOL" name="NSEqualRanges" ovadd="1.0.0">
<arg type="NSRange">range1</arg>
<arg type="NSRange">range2</arg>
<desc>
Returns whether <var>range1</var> and
<var>range2</var> have same location and length.
</desc>
</function>
<function type="NSRange" name="NSIntersectionRange" ovadd="1.0.0">
<arg type="NSRange">aRange</arg>
<arg type="NSRange">bRange</arg>
<desc>
Returns range containing indices existing in both
<var>aRange</var> and <var>bRange</var>. If the
returned length is 0, the location is undefined and
should be ignored.
</desc>
</function>
<function type="BOOL" name="NSLocationInRange" ovadd="1.0.0">
<arg type="NSUInteger">location</arg>
<arg type="NSRange">range</arg>
<desc>
Returns whether <var>location</var> is greater than
or equal to range's <var>location</var> and less than its
max.
</desc>
</function>
<function type="NSRange" name="NSMakeRange" ovadd="1.0.0">
<arg type="NSUInteger">location</arg>
<arg type="NSUInteger">length</arg>
<desc>
Creates new range starting at <var>location</var> and
of given <var>length</var>.
</desc>
</function>
<function type="NSUInteger" name="NSMaxRange" ovadd="1.0.0">
<arg type="NSRange">range</arg>
<desc>
Returns top end of <var>range</var> (location +
length).
</desc>
</function>
<function type="NSRange" name="NSRangeFromString" ovadd="1.0.0">
<arg type="NSString*">aString</arg>
<desc>
Parses range from string of form {location=a,
length=b}; returns range with 0 location and
length if this fails.
</desc>
</function>
<function type="NSString*" name="NSStringFromRange" ovadd="1.0.0">
<arg type="NSRange">range</arg>
<desc>
Returns string of form {location=a, length=b}.
</desc>
</function>
<function type="NSRange" name="NSUnionRange" ovadd="1.0.0">
<arg type="NSRange">aRange</arg>
<arg type="NSRange">bRange</arg>
<desc>
Returns range going from minimum of aRange's and
bRange's locations to maximum of their two max's.
</desc>
</function>
<function type="void" name="_NSRangeExceptionRaise" ovadd="1.0.0">
<desc>
Convenience method for raising an
NSRangeException.
</desc>
</function>
</chapter>
<!--EndNSRangeFunctions-->
<!--StartNSSetFunctions-->
<chapter>
<heading>NSSet functions</heading>
<p></p>
<function type="void" name="GSUPurge" ovadd="0.0.0" ovrem="0.0.0">
<arg type="NSUInteger">count</arg>
<desc>
This function purges the global
<ref type="class" id="NSCountedSet">NSCountedSet</ref>
object used for uniquing. It handles locking as
necessary. It can be used to purge the set even
when uniquing is turned off.
</desc>
</function>
<function type="id" name="GSUSet" ovadd="0.0.0" ovrem="0.0.0">
<arg type="id">anObject</arg>
<arg type="NSUInteger">count</arg>
<desc>
This function sets the <var>count</var> for the
specified object. If the <var>count</var> for the
object is set to zero then the object is removed from
the global uniquing set. The object is added to the set
if necessary. The object returned is the one stored in the
set. The function handles locking as necessary. It can
be used to alter the set even when uniquing is turned off.
</desc>
</function>
<function type="id" name="GSUnique" ovadd="0.0.0" ovrem="0.0.0">
<arg type="id">anObject</arg>
<desc>
This function <em>uniques</em> the supplied argument,
returning the result. It works by using the
<ref type="method" id="-unique:">
[-unique:]
</ref>
method of a global NSCountedSet object. It handles
locking as necessary. If uniquing is turned off, it
simply returns its argument.
</desc>
</function>
<function type="void" name="GSUniquing" ovadd="0.0.0" ovrem="0.0.0">
<arg type="BOOL">flag</arg>
<desc>
This function sets the state of a <var>flag</var> that
determines the behavior of the
<ref type="function" id="GSUnique">
GSUnique()
</ref>
function. If the <var>flag</var> is on, uniquing is
performed, if it is off the function has no
effect. The default is for uniquing to be turned off.
</desc>
</function>
</chapter>
<!--EndNSSetFunctions-->
<!--StartNSThreadFunctions-->
<chapter>
<heading>NSThread functions</heading>
<p></p>
<function type="BOOL" name="GSRegisterCurrentThread" gvadd="0.0.0" gvrem="0.0.0">
<desc>
<p>
This function is provided to let threads started by
some other software library register themselves to be
used with the GNUstep system. All such threads should
call this function before attempting to use any
GNUstep objects.
</p>
<p>
Returns <code>YES</code> if the thread can be
registered, <code>NO</code> if it is already
registered.
</p>
<p>
Sends out a
<code>NSWillBecomeMultiThreadedNotification</code>
if the process was not already multithreaded.
</p>
</desc>
</function>
<function type="void" name="GSUnregisterCurrentThread" gvadd="0.0.0" gvrem="0.0.0">
<desc>
<p>
This function is provided to let threads started by
some other software library unregister themselves from
the GNUstep threading system.
</p>
<p>
Calling this function causes a
<code>NSThreadWillExitNotification</code> to be sent
out, and destroys the GNUstep NSThread object
associated with the thread (like
<ref type="method" id="+exit" class="NSThread">
[NSThread +exit]
</ref>
) but does not exit the underlying thread.
</p>
</desc>
</function>
</chapter>
<!--EndNSThreadFunctions-->
<!--StartNSZoneFunctions-->
<chapter>
<heading>NSZone functions</heading>
<p></p>
<function type="BOOL" name="GSAssignZeroingWeakPointer" ovadd="0.0.0" ovrem="0.0.0">
<arg type="void**">destination</arg>
<arg type="void*">source</arg>
<desc>
This function must be used to assign a value to a
zeroing weak pointer. <br /> A zeroing weak pointer
is one where, when the garbage collector collects the
object pointed to, it also clears the weak pointer.
<br /> Assigning zero (<code>nil</code>) will always
succeed and has the effect of telling the garbage
collector that it no longer needs to track the
previously assigned object. Apart from that case,
a <var>source</var> needs to be garbage collectable for
this function to work, and using a non-garbage
collectable value will cause the function to
return <code>NO</code>. <br /> If the
<var>destination</var> object (the weak pointer
watching the <var>source</var> object) belongs to a
chunk of memory which may be collected before the
<var>source</var> object is collected, it is important
that it is finalised and the finalisation code assigns
zero to the pointer. <br /> If garbage collection is not
in use, this function performs a simple assignment
returning <code>YES</code>, unless
<var>destination</var> is null in which case it returns
<code>NO</code>.
</desc>
</function>
<function type="void" name="GSMakeWeakPointer" ovadd="0.0.0" ovrem="0.0.0">
<arg type="Class">theClass</arg>
<arg type="const char*">iVarName</arg>
<desc>
Called during
<ref type="method" id="+initialize">
+initialize
</ref>
to tell the class that instances created in future should
have the specified instance variable as a weak pointer
for garbage collection. <br /> NB. making a pointer weak
does not mean that it is automatically zeroed when the
object it points to is garbage collected. To get that
behavior you must asign values to the pointer using
the
<ref type="function" id="GSAssignZeroingWeakPointer">
GSAssignZeroingWeakPointer()
</ref>
function. <br /> This function has no effect if the
system is not built for garbage collection.
</desc>
</function>
<function type="void*" name="GSOutOfMemory" ovadd="0.0.0" ovrem="0.0.0">
<arg type="NSUInteger">size</arg>
<arg type="BOOL">retry</arg>
<desc>
Try to get more memory - the normal process has failed.
If we can't do anything, just return a null pointer. Try
to do some logging if possible.
</desc>
</function>
<function type="void*" name="NSAllocateCollectable" ovadd="10.4.0" ovrem="0.0.0">
<arg type="NSUInteger">size</arg>
<arg type="NSUInteger">options</arg>
<desc>
Allocate memory. If garbage collection is not
enabled this uses the default malloc zone and the
<var>options</var> are ignored. <br /> If garbage
collection is enabled, the allocate memory is
normally not scanned for pointers but is itsself
garbage collectable. The <var>options</var> argument
is a bitmask in which NSScannedOption sets the memory to
be scanned for pointers by the garbage collector, and
NSCollectorDisabledOption causes
the memory to be excempt from being garbage collected
itsself. <br /> In any case the memory returned is
zero'ed.
</desc>
</function>
<function type="void*" name="NSAllocateMemoryPages" ovadd="1.0.0">
<arg type="NSUInteger">bytes</arg>
<desc>
Allocate memory for this process and return a
pointer to it (or a null pointer on failure). The
allocated memory is page aligned and the actual
size of memory allocated is a multiple of the page size.
</desc>
</function>
<function type="void" name="NSCopyMemoryPages" ovadd="1.0.0">
<arg type="const void*">src</arg>
<arg type="void*">dest</arg>
<arg type="NSUInteger">bytes</arg>
<desc>
Perform an efficient large scale copy of data from
<var>src</var> to <var>dest</var>. The value
<var>bytes</var> specifies the length of the data
copied.
</desc>
</function>
<function type="NSZone*" name="NSCreateZone" ovadd="1.0.0">
<arg type="NSUInteger">start</arg>
<arg type="NSUInteger">gran</arg>
<arg type="BOOL">canFree</arg>
<desc>
Creates a new zone of <var>start</var> bytes, which
will grow and shrink by granularity bytes. If
<var>canFree</var> is 0, memory in zone is allocated
but never freed, meaning allocation will be very fast.
The whole zone can still be freed with
<ref type="function" id="NSRecycleZone">
NSRecycleZone()
</ref>
, and you should still call NSZoneFree on memory in the
zone that is no longer needed, since a count of
allocated pointers is kept and must reach zero
before freeing the zone. <br /> If Garbage Collection
is enabled, this function does nothing other than log a
warning and return the same value as the
<ref type="function" id="NSDefaultMallocZone">
NSDefaultMallocZone()
</ref>
function.
</desc>
</function>
<function type="void" name="NSDeallocateMemoryPages" ovadd="1.0.0">
<arg type="void*">ptr</arg>
<arg type="NSUInteger">bytes</arg>
<desc>
Deallocate memory which was previously allocated
using the
<ref type="function" id="NSAllocateMemoryPages">
NSAllocateMemoryPages()
</ref>
function. <br /> The <var>bytes</var> argument
should be the same as the value passed to the
<ref type="function" id="NSAllocateMemoryPages">
NSAllocateMemoryPages()
</ref>
function.
</desc>
</function>
<function type="NSZone*" name="NSDefaultMallocZone" ovadd="1.0.0">
<desc>
Returns the default zone for memory allocation.
Memory created in this zone is the same as memory
allocates using the system
<ref type="function" id="malloc">
malloc()
</ref>
function.
</desc>
</function>
<function type="NSUInteger" name="NSLogPageSize" ovadd="1.0.0">
<desc>
Return log base 2 of the number of bytes in a memory
page.
</desc>
</function>
<function type="id" name="NSMakeCollectable" ovadd="1.0.0">
<arg type="const void*">cf</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
</function>
<function type="NSUInteger" name="NSPageSize" ovadd="1.0.0">
<desc>
Return the number of bytes in a memory page.
</desc>
</function>
<function type="NSUInteger" name="NSRealMemoryAvailable" ovadd="1.0.0">
<desc>
Return the number of bytes of real (physical) memory
available.
</desc>
</function>
<function type="void*" name="NSReallocateCollectable" ovadd="10.4.0" ovrem="0.0.0">
<arg type="void*">ptr</arg>
<arg type="NSUInteger">size</arg>
<arg type="NSUInteger">options</arg>
<desc>
Reallocate memory to be of a different
<var>size</var> and/or to have different
<var>options</var> settings. The behavior of
<var>options</var> is as for the
<ref type="function" id="NSAllocateCollectable">
NSAllocateCollectable()
</ref>
function.
</desc>
</function>
<function type="void" name="NSRecycleZone" ovadd="1.0.0">
<arg type="NSZone*">zone</arg>
<desc>
Return memory for an entire <var>zone</var> to system.
In fact, this will not be done unless all memory in the
<var>zone</var> has been explicitly freed (by calls to
NSZoneFree()). For "non-freeable" zones, the
number of
<ref type="function" id="NSZoneFree">
NSZoneFree()
</ref>
calls must simply equal the number of allocation calls.
The default <var>zone</var>, on the other hand, cannot be
recycled. <br /> If Garbage Collection is enabled,
this function has not effect.
</desc>
</function>
<function type="NSUInteger" name="NSRoundDownToMultipleOfPageSize" ovadd="1.0.0">
<arg type="NSUInteger">bytes</arg>
<desc>
Round <var>bytes</var> down to the nearest multiple of
the memory page size, and return it.
</desc>
</function>
<function type="NSUInteger" name="NSRoundUpToMultipleOfPageSize" ovadd="1.0.0">
<arg type="NSUInteger">bytes</arg>
<desc>
Round <var>bytes</var> up to the nearest multiple of
the memory page size, and return it.
</desc>
</function>
<function type="void" name="NSSetZoneName" ovadd="1.0.0">
<arg type="NSZone*">zone</arg>
<arg type="NSString*">name</arg>
<desc>
Sets <var>name</var> of the given <var>zone</var>
(useful for debugging and logging).
</desc>
</function>
<function type="void*" name="NSZoneCalloc" ovadd="1.0.0">
<arg type="NSZone*">zone</arg>
<arg type="NSUInteger">elems</arg>
<arg type="NSUInteger">bytes</arg>
<desc>
Allocates and returns cleared memory for
<var>elems</var> items of size <var>bytes</var>, in the
given <var>zone</var>. Returns NULL if allocation of
size 0 requested. Raises <code>NSMallocException</code>
if not enough free memory in <var>zone</var> to allocate
and no more can be obtained from system, unless using the
default <var>zone</var>, in which case NULL is
returned. <br /> If Garbage Collection is enabled,
this function always allocates non-scanned,
non-collectable memory in the
<ref type="function" id="NSDefaultMallocZone">
NSDefaultMallocZone()
</ref>
and the <var>zone</var> argument is ignored.
</desc>
</function>
<function type="BOOL" name="NSZoneCheck" ovadd="0.0.0" ovrem="0.0.0">
<arg type="NSZone*">zone</arg>
<desc>
Deprecated... <br /> Checks integrity of a
<var>zone</var>. Not defined by OpenStep or OS X.
</desc>
</function>
<function type="void" name="NSZoneFree" ovadd="1.0.0">
<arg type="NSZone*">zone</arg>
<arg type="void*">ptr</arg>
<desc>
Frees memory pointed to by <var>ptr</var> (which should
have been allocated by a previous call to
<ref type="function" id="NSZoneMalloc">
NSZoneMalloc()
</ref>
,
<ref type="function" id="NSZoneCalloc">
NSZoneCalloc()
</ref>
, or NSZoneRealloc()) and returns it to <var>zone</var>.
Note, if this is a nonfreeable <var>zone</var>, the
memory is not actually freed, but the count of number
of free()s is updated. <br /> If Garbage Collection is
enabled, the <var>zone</var> argument is ignored and
this function causes <var>ptr</var> to be deallocated
immediately.
</desc>
</function>
<function type="NSZone*" name="NSZoneFromPointer" ovadd="1.0.0">
<arg type="void*">ptr</arg>
<desc>
Searches and finds the zone <var>ptr</var> was
allocated from. The speed depends upon the number
of zones and their size. <br /> If Garbage Collection is
enabled, this function always returns the same as
the
<ref type="function" id="NSDefaultMallocZone">
NSDefaultMallocZone()
</ref>
function.
</desc>
</function>
<function type="void*" name="NSZoneMalloc" ovadd="1.0.0">
<arg type="NSZone*">zone</arg>
<arg type="NSUInteger">size</arg>
<desc>
Allocates and returns memory for elems items of
<var>size</var> bytes, in the given <var>zone</var>.
Returns NULL if allocation of <var>size</var> 0
requested. Raises <code>NSMallocException</code>
if not enough free memory in <var>zone</var> to allocate
and no more can be obtained from system, unless using the
default <var>zone</var>, in which case NULL is
returned. <br /> If Garbage Collection is enabled,
this function always allocates non-scanned,
non-collectable memory in the
<ref type="function" id="NSDefaultMallocZone">
NSDefaultMallocZone()
</ref>
and the <var>zone</var> argument is ignored.
</desc>
</function>
<function type="NSString*" name="NSZoneName" ovadd="1.0.0">
<arg type="NSZone*">zone</arg>
<desc>
Returns the name of the given <var>zone</var> (useful
for debugging and logging).
</desc>
</function>
<function type="void*" name="NSZoneRealloc" ovadd="1.0.0">
<arg type="NSZone*">zone</arg>
<arg type="void*">ptr</arg>
<arg type="NSUInteger">size</arg>
<desc>
Reallocates the chunk of memory in
<var>zone</var> pointed to by <var>ptr</var> to a new
one of <var>size</var> bytes. Existing contents in
<var>ptr</var> are copied over. Raises an
<code>NSMallocException</code> if insufficient memory
is available in the <var>zone</var> and no more memory can
be obtained from the system, unless using the default
<var>zone</var>, in which case NULL is returned. <br />
If Garbage Collection is enabled, the <var>zone</var>
argument is ignored.
</desc>
</function>
<function type="struct NSZoneStats" name="NSZoneStats" ovadd="0.0.0" ovrem="0.0.0">
<arg type="NSZone*">zone</arg>
<desc>
Deprecated... <br /> Obtain statistics about the
<var>zone</var>. Implementation emphasis is on
correctness, not speed. Not defined by OpenStep
or OS X.
</desc>
</function>
</chapter>
<!--EndNSZoneFunctions-->
<!--EndFunctions-->
</body>
</gsdoc>
|