Revision: 234
Author: roman_yakovenko
Date: 2006-06-19 13:10:30 -0700 (Mon, 19 Jun 2006)
ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=234&view=rev
Log Message:
-----------
adding map_indexing_suite to generated code
Modified Paths:
--------------
pygccxml_dev/pygccxml/declarations/__init__.py
pygccxml_dev/pygccxml/declarations/container_traits.py
pygccxml_dev/unittests/data/core_cache.hpp
pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py
pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml
pyplusplus_dev/pyplusplus/code_creators/__init__.py
pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py
pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py
pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite.py
pyplusplus_dev/pyplusplus/module_creator/creator.py
pyplusplus_dev/pyplusplus/module_creator/types_database.py
Modified: pygccxml_dev/pygccxml/declarations/__init__.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/__init__.py 2006-06-19 14:31:22 UTC (rev 233)
+++ pygccxml_dev/pygccxml/declarations/__init__.py 2006-06-19 20:10:30 UTC (rev 234)
@@ -147,8 +147,11 @@
from type_traits import smart_pointer_traits
from container_traits import vector_traits
+from container_traits import map_traits
+from container_traits import multimap_traits
+from container_traits import hash_map_traits
+from container_traits import hash_multimap_traits
-
import templates
Modified: pygccxml_dev/pygccxml/declarations/container_traits.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/container_traits.py 2006-06-19 14:31:22 UTC (rev 233)
+++ pygccxml_dev/pygccxml/declarations/container_traits.py 2006-06-19 20:10:30 UTC (rev 234)
@@ -10,6 +10,7 @@
import calldef
import cpptypes
import namespace
+import templates
import class_declaration
import type_traits
Modified: pygccxml_dev/unittests/data/core_cache.hpp
===================================================================
--- pygccxml_dev/unittests/data/core_cache.hpp 2006-06-19 14:31:22 UTC (rev 233)
+++ pygccxml_dev/unittests/data/core_cache.hpp 2006-06-19 20:10:30 UTC (rev 234)
@@ -22,4 +22,4 @@
#endif//__core_cache_hpp__
-//touch
\ No newline at end of file
+//touch//touch
\ No newline at end of file
Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py
===================================================================
--- pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py 2006-06-19 14:31:22 UTC (rev 233)
+++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py 2006-06-19 20:10:30 UTC (rev 234)
@@ -141,7 +141,7 @@
def beautify_code( self, mb ):
def is_vector_of_strings( decl ):
- if not declarations.vector_traits.is_vector( decl ):
+ if not declarations.vector_traits.is_my_case( decl ):
return False
return declarations.is_std_string( declarations.vector_traits.value_type(decl) )
Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml
===================================================================
--- pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml 2006-06-19 14:31:22 UTC (rev 233)
+++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml 2006-06-19 20:10:30 UTC (rev 234)
@@ -2,8 +2,8 @@
<GCC_XML cvs_revision="1.112">
<Namespace id="_1" name="::" members="_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 _482 _483 _484 _485 _486 _487 _488 _489 _490 _491 _492 _493 _494 _495 _496 _497 _498 _499 _501 _502 _503 _504 _505 _506 _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 _621 _622 _623 _624 _625 _626 _627 _628 _629 _630 _631 _632 _633 _634 _635 _636 _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 _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 _819 _820 _821 _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 _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 _1106 _1108 _1110 _1111 _1112 _1113 _1114 _1115 _1116 _1117 _1118 _1119 _1120 _1121 _1122 _1123 _1124 _1125 _1126 _1127 _1128 _1129 _1130 _1131 _1132 _1133 _1135 _1134 _1137 _1139 _1141 _1143 _1144 _1145 _1146 _1147 _1148 _1149 _1150 _1151 _1152 _1153 _1155 _1156 _1157 _1158 _1160 _1161 _1163 _1164 _1166 _1167 _1169 _1171 _1173 _1175 _1177 _1179 _1181 _1183 _1185 _1186 _1187 _1188 _1189 _1190 _1191 _1105 _1107 _765 _1192 _1194 _1195 _1193 _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 _1241 _1242 _1243 _1244 _1245 _1247 _1249 _1250 _1251 _1252 _1253 _1255 _1256 _1257 _1258 _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 _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 _1491 _1490 _1492 _1493 _818 _1494 _1495 _1496 _1497 _1499 _1498 _1501 _1502 _1503 _1504 _1505 _1506 _1507 _1508 _1509 _1510 _1512 _1513 _1514 _1515 _1516 _1517 _1518 _1519 _1520 _1521 _1522 _1523 _1525 _1524 _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 _1562 _1563 _1564 _1565 _1566 _1567 _1568 _1569 _1570 _1571 _1573 _1574 _1575 _1576 _1577 _1578 _1579 _1580 _1581 _1582 _1583 _1584 _1585 _1586 _1587 _1588 _1589 _1590 _1591 _1592 _1593 _1594 _1561 _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 " mangled="_Z2::" demangled="::"/>
<Namespace id="_2" name="std" context="_1" members="_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 _1906 _1907 _1912 _1913 _1926 _1927 _1932 _1933 _1938 _1939 _1940 _1941 _1942 _1943 _1944 _1945 _1946 _1947 _1948 _1962 _1963 _1964 _1965 _1966 _1967 _1968 _1969 _1970 _1971 _1974 _1979 _1980 _1981 _1982 _1987 _1988 _1989 _1990 _1993 _1994 _1995 _1996 _1997 _1998 _1999 _2000 _2001 _2002 _2003 _2012 _2013 _2014 _2045 _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 _2106 _2107 _2148 _2149 _2150 _2168 _2169 _2209 _2211 _2212 _2213 _2274 _2287 _2296 _2313 _2314 _2319 _2321 _2322 _2323 _2330 _2331 _2332 _2455 _2456 _2457 _2458 _2459 _2460 _2461 _2462 _2463 _2465 _2467 _2469 _2471 _2473 _2475 _2477 _2479 _2481 _2483 _2485 _2487 _2489 _2491 _2493 _2495 _2497 _2499 _2501 _2503 _2505 _2507 _2509 _2511 _2513 _2515 _2516 _2521 _2522 _2523 _2524 _2525 _2526 _2527 _2528 _2529 _2530 _2531 _2532 _2533 _2534 _2536 _2537 _2538 _2539 _2540 _2541 _2542 _2543 _2544 _2546 _2548 _2567 _2568 _2569 _2570 _2571 _2572 _2573 _2574 _2575 _2638 _2639 _2640 _2641 _2642 _2643 _2644 _2653 _2654 _2655 " mangled="_Z3std" demangled="std"/>
- <Function id="_3" name="_GLOBAL__D__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hpp5J35cd" returns="_1154" context="_1" location="f0:131" file="f0" line="131" endline="131"/>
- <Function id="_4" name="_GLOBAL__I__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hpp5J35cd" returns="_1154" context="_1" location="f0:131" file="f0" line="131" endline="131"/>
+ <Function id="_3" name="_GLOBAL__D__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hppEAQ8Wa" returns="_1154" context="_1" location="f0:131" file="f0" line="131" endline="131"/>
+ <Function id="_4" name="_GLOBAL__I__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hppEAQ8Wa" returns="_1154" context="_1" location="f0:131" file="f0" line="131" endline="131"/>
<Variable id="_5" name="_ZGVN5boost9date_time10date_facetINS_9gregorian4dateEcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE" type="_1248" context="_1" location="f1:372" file="f1" line="372" artificial="1"/>
<Function id="_6" name="__static_initialization_and_destruction_0" returns="_1154" context="_1" mangled="_Z41__static_initialization_and_destruction_0ii" demangled="__static_initialization_and_destruction_0(int, int)" location="f0:131" file="f0" line="131" endline="76">
<Argument name="__initialize_p" type="_500" location="f0:131" file="f0" line="131"/>
Modified: pyplusplus_dev/pyplusplus/code_creators/__init__.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/__init__.py 2006-06-19 14:31:22 UTC (rev 233)
+++ pyplusplus_dev/pyplusplus/code_creators/__init__.py 2006-06-19 20:10:30 UTC (rev 234)
@@ -106,4 +106,5 @@
from array_1_registrator import array_1_registrator_t
-from indexing_suites import vector_indexing_suite_t
\ No newline at end of file
+from indexing_suites import vector_indexing_suite_t
+from indexing_suites import map_indexing_suite_t
\ No newline at end of file
Modified: pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py 2006-06-19 14:31:22 UTC (rev 233)
+++ pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py 2006-06-19 20:10:30 UTC (rev 234)
@@ -10,8 +10,9 @@
from pygccxml import declarations
class indexing_suite_t( code_creator.code_creator_t ):
- def __init__(self, parent=None ):
+ def __init__(self, suite_name, parent=None ):
code_creator.code_creator_t.__init__( self, parent=parent )
+ self.__suite_name = suite_name
def _get_configuration( self ):
return self.parent.declaration.indexing_suite
@@ -20,20 +21,9 @@
def _get_container( self ):
return self.parent.declaration
container = property( _get_container )
-
-class vector_indexing_suite_t( indexing_suite_t ):
- """
- Creates boost.python code that needed to export a vector of some class
- """
- #class_< std::vector<X> >("XVec")
- # .def(vector_indexing_suite<std::vector<X> >())
- #;
- def __init__(self, parent=None ):
- indexing_suite_t.__init__( self, parent=parent )
-
- def _create_indexing_suite_declaration( self ):
- vector_indexing_suite = algorithm.create_identifier( self, 'boost::python::vector_indexing_suite' )
+ def _create_suite_declaration( self ):
+ suite_identifier = algorithm.create_identifier( self, self.__suite_name )
args = [ self.container.decl_string ]
if self.configuration.derived_policies:
if self.configuration.no_proxy:
@@ -44,9 +34,31 @@
else:
if self.configuration.no_proxy:
args.append( 'true' )
- return declarations.templates.join( vector_indexing_suite, args )
+ return declarations.templates.join( suite_identifier, args )
def _create_impl(self):
- return "def( %s() )" % self._create_indexing_suite_declaration()
+ return "def( %s() )" % self._create_suite_declaration()
-
\ No newline at end of file
+class vector_indexing_suite_t( indexing_suite_t ):
+ """
+ Creates boost.python code that needed to export a vector of some class
+ """
+ #class_< std::vector<X> >("XVec")
+ # .def(vector_indexing_suite<std::vector<X> >())
+ #;
+
+ def __init__(self, parent=None ):
+ indexing_suite_t.__init__( self, 'boost::python::vector_indexing_suite', parent=parent )
+
+class map_indexing_suite_t( indexing_suite_t ):
+ """
+ Creates boost.python code that needed to export a vector of some class
+ """
+ #class_< std::vector<X> >("XVec")
+ # .def(vector_indexing_suite<std::vector<X> >())
+ #;
+
+ def __init__(self, parent=None ):
+ indexing_suite_t.__init__( self, 'boost::python::map_indexing_suite', parent=parent )
+
+
\ No newline at end of file
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2006-06-19 14:31:22 UTC (rev 233)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2006-06-19 20:10:30 UTC (rev 234)
@@ -13,6 +13,9 @@
def guess_indexing_suite( class_ ):
if declarations.vector_traits.is_my_case( class_ ):
return container_suites.vector_suite_t( class_ )
+ if declarations.map_traits.is_my_case( class_ ) \
+ or declarations.hash_map_traits.is_my_case( class_ ):
+ return container_suites.map_suite_t( class_ )
#this will only be exported if indexing suite is not None and only when needed
class class_declaration_t(decl_wrapper.decl_wrapper_t, declarations.class_declaration_t):
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite.py 2006-06-19 14:31:22 UTC (rev 233)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite.py 2006-06-19 20:10:30 UTC (rev 234)
@@ -61,3 +61,13 @@
def value_type( self ):
return declarations.vector_traits.value_type( self.container_class )
+
+class map_suite_t( indexing_suite_t ):
+ def __init__( self, cls ):
+ indexing_suite_t.__init__( self, cls )
+ self.__traits = declarations.map_traits
+ if declarations.hash_map_traits.is_my_case( self.container_class ):
+ self.__traits = declarations.hash_map_traits
+
+ def value_type( self ):
+ return self.__traits.value_type( self.container_class )
Modified: pyplusplus_dev/pyplusplus/module_creator/creator.py
===================================================================
--- pyplusplus_dev/pyplusplus/module_creator/creator.py 2006-06-19 14:31:22 UTC (rev 233)
+++ pyplusplus_dev/pyplusplus/module_creator/creator.py 2006-06-19 20:10:30 UTC (rev 234)
@@ -353,19 +353,29 @@
pass
def _treat_indexing_suite( self ):
+ def create_cls_cc( cls ):
+ if isinstance( cls, declarations.class_t ):
+ return code_creators.class_t( class_inst=cls )
+ else:
+ return code_creators.class_declaration_t( class_inst=cls )
+
if self.__types_db.used_vectors:
header = "boost/python/suite/indexing/vector_indexing_suite.hpp"
self.__extmodule.add_system_header( header )
self.__extmodule.add_include( header=header )
for cls in self.__types_db.used_vectors:
- cls_creator = None
- if isinstance( cls, declarations.class_t ):
- cls_creator = code_creators.class_t( class_inst=cls )
- else:
- cls_creator = code_creators.class_declaration_t( class_inst=cls )
+ cls_creator = create_cls_cc( cls )
cls_creator.adopt_creator( code_creators.vector_indexing_suite_t() )
self.__module_body.adopt_creator( cls_creator )
-
+ if self.__types_db.used_maps:
+ header = "boost/python/suite/indexing/map_indexing_suite.hpp"
+ self.__extmodule.add_system_header( header )
+ self.__extmodule.add_include( header=header )
+ for cls in self.__types_db.used_maps:
+ cls_creator = create_cls_cc( cls )
+ cls_creator.adopt_creator( code_creators.map_indexing_suite_t() )
+ self.__module_body.adopt_creator( cls_creator )
+
def create(self, decl_headers=None):
"""Create and return the module for the extension.
Modified: pyplusplus_dev/pyplusplus/module_creator/types_database.py
===================================================================
--- pyplusplus_dev/pyplusplus/module_creator/types_database.py 2006-06-19 14:31:22 UTC (rev 233)
+++ pyplusplus_dev/pyplusplus/module_creator/types_database.py 2006-06-19 20:10:30 UTC (rev 234)
@@ -19,6 +19,7 @@
self.__fundamental_strs = declarations.FUNDAMENTAL_TYPES.keys()
self.__normalize_data = [ ',', '<', '>', '*', '&', '(', ')', '::' ]
self.__used_vectors = set()
+ self.__used_maps = set()
def update( self, decl ):
if isinstance( decl, declarations.calldef_t ):
@@ -54,18 +55,28 @@
type = declarations.remove_alias( type )
type = declarations.remove_pointer( type )
type = declarations.remove_reference( type )
- if declarations.vector_traits.is_my_case( type ):
- vector = declarations.vector_traits.class_declaration( type )
- try:
+ try:
+ if declarations.vector_traits.is_my_case( type ):
+ vector = declarations.vector_traits.class_declaration( type )
declarations.vector_traits.value_type( vector )
self.__used_vectors.add( vector )
return True
- except RuntimeError, error:
- msg = 'WARNING: pyplusplus found std::vector instantiation declaration, '
- msg = msg + 'but can not find out value type!'
- msg = msg + os.linesep + 'This class will not be exported!'
- msg = msg + os.linesep + 'std::vector instantiation is: ' + vector.decl_string
- _logging_.logger.warn( msg )
+ if declarations.map_traits.is_my_case( type ):
+ map_ = declarations.map_traits.class_declaration( type )
+ declarations.map_traits.value_type( map_ )
+ self.__used_maps.add( map_ )
+ return True
+ if declarations.hash_map_traits.is_my_case( type ):
+ map_ = declarations.hash_map_traits.class_declaration( type )
+ declarations.hash_map_traits.value_type( map_ )
+ self.__used_maps.add( map_ )
+ return True
+ except RuntimeError, error:
+ msg = 'WARNING: pyplusplus found std::vector instantiation declaration, '
+ msg = msg + 'but can not find out value type!'
+ msg = msg + os.linesep + 'This class will not be exported!'
+ msg = msg + os.linesep + 'std::vector instantiation is: ' + vector.decl_string
+ _logging_.logger.warn( msg )
return False
def _update_db( self, db, type_ ):
@@ -166,3 +177,6 @@
return self.__used_vectors
used_vectors = property( _get_used_vectors )
+ def _get_used_maps( self ):
+ return self.__used_maps
+ used_maps = property( _get_used_maps )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|