/usr/share/pyshared/dballe/dballe.py is in python-dballe 5.18-1.
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 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.4
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_dballe', [dirname(__file__)])
except ImportError:
import _dballe
return _dballe
if fp is not None:
try:
_mod = imp.load_module('_dballe', fp, pathname, description)
finally:
fp.close()
return _mod
_dballe = swig_import_helper()
del swig_import_helper
else:
import _dballe
del version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "thisown"): return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
if (name == "thisown"): return self.this.own()
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError(name)
def _swig_repr(self):
try: strthis = "proxy of " + self.this.__repr__()
except: strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
class SwigPyIterator(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_destroy__ = _dballe.delete_SwigPyIterator
__del__ = lambda self : None;
def value(self): return _dballe.SwigPyIterator_value(self)
def incr(self, n = 1): return _dballe.SwigPyIterator_incr(self, n)
def decr(self, n = 1): return _dballe.SwigPyIterator_decr(self, n)
def distance(self, *args): return _dballe.SwigPyIterator_distance(self, *args)
def equal(self, *args): return _dballe.SwigPyIterator_equal(self, *args)
def copy(self): return _dballe.SwigPyIterator_copy(self)
def next(self): return _dballe.SwigPyIterator_next(self)
def __next__(self): return _dballe.SwigPyIterator___next__(self)
def previous(self): return _dballe.SwigPyIterator_previous(self)
def advance(self, *args): return _dballe.SwigPyIterator_advance(self, *args)
def __eq__(self, *args): return _dballe.SwigPyIterator___eq__(self, *args)
def __ne__(self, *args): return _dballe.SwigPyIterator___ne__(self, *args)
def __iadd__(self, *args): return _dballe.SwigPyIterator___iadd__(self, *args)
def __isub__(self, *args): return _dballe.SwigPyIterator___isub__(self, *args)
def __add__(self, *args): return _dballe.SwigPyIterator___add__(self, *args)
def __sub__(self, *args): return _dballe.SwigPyIterator___sub__(self, *args)
def __iter__(self): return self
SwigPyIterator_swigregister = _dballe.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)
class VartableBase(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, VartableBase, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, VartableBase, name)
__repr__ = _swig_repr
def iterator(self): return _dballe.VartableBase_iterator(self)
def __iter__(self): return self.iterator()
def __nonzero__(self): return _dballe.VartableBase___nonzero__(self)
def __bool__(self): return _dballe.VartableBase___bool__(self)
def __len__(self): return _dballe.VartableBase___len__(self)
def pop(self): return _dballe.VartableBase_pop(self)
def __getslice__(self, *args): return _dballe.VartableBase___getslice__(self, *args)
def __setslice__(self, *args): return _dballe.VartableBase___setslice__(self, *args)
def __delslice__(self, *args): return _dballe.VartableBase___delslice__(self, *args)
def __delitem__(self, *args): return _dballe.VartableBase___delitem__(self, *args)
def __getitem__(self, *args): return _dballe.VartableBase___getitem__(self, *args)
def __setitem__(self, *args): return _dballe.VartableBase___setitem__(self, *args)
def append(self, *args): return _dballe.VartableBase_append(self, *args)
def empty(self): return _dballe.VartableBase_empty(self)
def size(self): return _dballe.VartableBase_size(self)
def clear(self): return _dballe.VartableBase_clear(self)
def swap(self, *args): return _dballe.VartableBase_swap(self, *args)
def get_allocator(self): return _dballe.VartableBase_get_allocator(self)
def begin(self): return _dballe.VartableBase_begin(self)
def end(self): return _dballe.VartableBase_end(self)
def rbegin(self): return _dballe.VartableBase_rbegin(self)
def rend(self): return _dballe.VartableBase_rend(self)
def pop_back(self): return _dballe.VartableBase_pop_back(self)
def erase(self, *args): return _dballe.VartableBase_erase(self, *args)
def __init__(self, *args):
this = _dballe.new_VartableBase(*args)
try: self.this.append(this)
except: self.this = this
def push_back(self, *args): return _dballe.VartableBase_push_back(self, *args)
def front(self): return _dballe.VartableBase_front(self)
def back(self): return _dballe.VartableBase_back(self)
def assign(self, *args): return _dballe.VartableBase_assign(self, *args)
def resize(self, *args): return _dballe.VartableBase_resize(self, *args)
def insert(self, *args): return _dballe.VartableBase_insert(self, *args)
def reserve(self, *args): return _dballe.VartableBase_reserve(self, *args)
def capacity(self): return _dballe.VartableBase_capacity(self)
__swig_destroy__ = _dballe.delete_VartableBase
__del__ = lambda self : None;
VartableBase_swigregister = _dballe.VartableBase_swigregister
VartableBase_swigregister(VartableBase)
def var(*args):
return _dballe.var(*args)
var = _dballe.var
class VarpVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, VarpVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, VarpVector, name)
__repr__ = _swig_repr
def iterator(self): return _dballe.VarpVector_iterator(self)
def __iter__(self): return self.iterator()
def __nonzero__(self): return _dballe.VarpVector___nonzero__(self)
def __bool__(self): return _dballe.VarpVector___bool__(self)
def __len__(self): return _dballe.VarpVector___len__(self)
def pop(self): return _dballe.VarpVector_pop(self)
def __getslice__(self, *args): return _dballe.VarpVector___getslice__(self, *args)
def __setslice__(self, *args): return _dballe.VarpVector___setslice__(self, *args)
def __delslice__(self, *args): return _dballe.VarpVector___delslice__(self, *args)
def __delitem__(self, *args): return _dballe.VarpVector___delitem__(self, *args)
def __getitem__(self, *args): return _dballe.VarpVector___getitem__(self, *args)
def __setitem__(self, *args): return _dballe.VarpVector___setitem__(self, *args)
def append(self, *args): return _dballe.VarpVector_append(self, *args)
def empty(self): return _dballe.VarpVector_empty(self)
def size(self): return _dballe.VarpVector_size(self)
def clear(self): return _dballe.VarpVector_clear(self)
def swap(self, *args): return _dballe.VarpVector_swap(self, *args)
def get_allocator(self): return _dballe.VarpVector_get_allocator(self)
def begin(self): return _dballe.VarpVector_begin(self)
def end(self): return _dballe.VarpVector_end(self)
def rbegin(self): return _dballe.VarpVector_rbegin(self)
def rend(self): return _dballe.VarpVector_rend(self)
def pop_back(self): return _dballe.VarpVector_pop_back(self)
def erase(self, *args): return _dballe.VarpVector_erase(self, *args)
def __init__(self, *args):
this = _dballe.new_VarpVector(*args)
try: self.this.append(this)
except: self.this = this
def push_back(self, *args): return _dballe.VarpVector_push_back(self, *args)
def front(self): return _dballe.VarpVector_front(self)
def back(self): return _dballe.VarpVector_back(self)
def assign(self, *args): return _dballe.VarpVector_assign(self, *args)
def resize(self, *args): return _dballe.VarpVector_resize(self, *args)
def insert(self, *args): return _dballe.VarpVector_insert(self, *args)
def reserve(self, *args): return _dballe.VarpVector_reserve(self, *args)
def capacity(self): return _dballe.VarpVector_capacity(self)
__swig_destroy__ = _dballe.delete_VarpVector
__del__ = lambda self : None;
VarpVector_swigregister = _dballe.VarpVector_swigregister
VarpVector_swigregister(VarpVector)
def varcode_format(*args):
return _dballe.varcode_format(*args)
varcode_format = _dballe.varcode_format
def descriptor_code(*args):
return _dballe.descriptor_code(*args)
descriptor_code = _dballe.descriptor_code
VARINFO_FLAG_STRING = _dballe.VARINFO_FLAG_STRING
VARINFO_FLAG_BINARY = _dballe.VARINFO_FLAG_BINARY
class _Varinfo(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, _Varinfo, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, _Varinfo, name)
__repr__ = _swig_repr
__swig_setmethods__["var"] = _dballe._Varinfo_var_set
__swig_getmethods__["var"] = _dballe._Varinfo_var_get
if _newclass:var = _swig_property(_dballe._Varinfo_var_get, _dballe._Varinfo_var_set)
__swig_setmethods__["desc"] = _dballe._Varinfo_desc_set
__swig_getmethods__["desc"] = _dballe._Varinfo_desc_get
if _newclass:desc = _swig_property(_dballe._Varinfo_desc_get, _dballe._Varinfo_desc_set)
__swig_setmethods__["unit"] = _dballe._Varinfo_unit_set
__swig_getmethods__["unit"] = _dballe._Varinfo_unit_get
if _newclass:unit = _swig_property(_dballe._Varinfo_unit_get, _dballe._Varinfo_unit_set)
__swig_setmethods__["scale"] = _dballe._Varinfo_scale_set
__swig_getmethods__["scale"] = _dballe._Varinfo_scale_get
if _newclass:scale = _swig_property(_dballe._Varinfo_scale_get, _dballe._Varinfo_scale_set)
__swig_setmethods__["ref"] = _dballe._Varinfo_ref_set
__swig_getmethods__["ref"] = _dballe._Varinfo_ref_get
if _newclass:ref = _swig_property(_dballe._Varinfo_ref_get, _dballe._Varinfo_ref_set)
__swig_setmethods__["len"] = _dballe._Varinfo_len_set
__swig_getmethods__["len"] = _dballe._Varinfo_len_get
if _newclass:len = _swig_property(_dballe._Varinfo_len_get, _dballe._Varinfo_len_set)
__swig_setmethods__["bit_ref"] = _dballe._Varinfo_bit_ref_set
__swig_getmethods__["bit_ref"] = _dballe._Varinfo_bit_ref_get
if _newclass:bit_ref = _swig_property(_dballe._Varinfo_bit_ref_get, _dballe._Varinfo_bit_ref_set)
__swig_setmethods__["bit_len"] = _dballe._Varinfo_bit_len_set
__swig_getmethods__["bit_len"] = _dballe._Varinfo_bit_len_get
if _newclass:bit_len = _swig_property(_dballe._Varinfo_bit_len_get, _dballe._Varinfo_bit_len_set)
__swig_setmethods__["flags"] = _dballe._Varinfo_flags_set
__swig_getmethods__["flags"] = _dballe._Varinfo_flags_get
if _newclass:flags = _swig_property(_dballe._Varinfo_flags_get, _dballe._Varinfo_flags_set)
__swig_setmethods__["imin"] = _dballe._Varinfo_imin_set
__swig_getmethods__["imin"] = _dballe._Varinfo_imin_get
if _newclass:imin = _swig_property(_dballe._Varinfo_imin_get, _dballe._Varinfo_imin_set)
__swig_setmethods__["imax"] = _dballe._Varinfo_imax_set
__swig_getmethods__["imax"] = _dballe._Varinfo_imax_get
if _newclass:imax = _swig_property(_dballe._Varinfo_imax_get, _dballe._Varinfo_imax_set)
__swig_setmethods__["dmin"] = _dballe._Varinfo_dmin_set
__swig_getmethods__["dmin"] = _dballe._Varinfo_dmin_get
if _newclass:dmin = _swig_property(_dballe._Varinfo_dmin_get, _dballe._Varinfo_dmin_set)
__swig_setmethods__["dmax"] = _dballe._Varinfo_dmax_set
__swig_getmethods__["dmax"] = _dballe._Varinfo_dmax_get
if _newclass:dmax = _swig_property(_dballe._Varinfo_dmax_get, _dballe._Varinfo_dmax_set)
__swig_setmethods__["alteration"] = _dballe._Varinfo_alteration_set
__swig_getmethods__["alteration"] = _dballe._Varinfo_alteration_get
if _newclass:alteration = _swig_property(_dballe._Varinfo_alteration_get, _dballe._Varinfo_alteration_set)
__swig_setmethods__["alterations"] = _dballe._Varinfo_alterations_set
__swig_getmethods__["alterations"] = _dballe._Varinfo_alterations_get
if _newclass:alterations = _swig_property(_dballe._Varinfo_alterations_get, _dballe._Varinfo_alterations_set)
__swig_setmethods__["bufr_unit"] = _dballe._Varinfo_bufr_unit_set
__swig_getmethods__["bufr_unit"] = _dballe._Varinfo_bufr_unit_get
if _newclass:bufr_unit = _swig_property(_dballe._Varinfo_bufr_unit_get, _dballe._Varinfo_bufr_unit_set)
__swig_setmethods__["bufr_scale"] = _dballe._Varinfo_bufr_scale_set
__swig_getmethods__["bufr_scale"] = _dballe._Varinfo_bufr_scale_get
if _newclass:bufr_scale = _swig_property(_dballe._Varinfo_bufr_scale_get, _dballe._Varinfo_bufr_scale_set)
__swig_setmethods__["_ref"] = _dballe._Varinfo__ref_set
__swig_getmethods__["_ref"] = _dballe._Varinfo__ref_get
if _newclass:_ref = _swig_property(_dballe._Varinfo__ref_get, _dballe._Varinfo__ref_set)
def __init__(self):
this = _dballe.new__Varinfo()
try: self.this.append(this)
except: self.this = this
def do_ref(self): return _dballe._Varinfo_do_ref(self)
def do_unref(self): return _dballe._Varinfo_do_unref(self)
def is_string(self): return _dballe._Varinfo_is_string(self)
def is_binary(self): return _dballe._Varinfo_is_binary(self)
def encode_int(self, *args): return _dballe._Varinfo_encode_int(self, *args)
def encode_bit_int(self, *args): return _dballe._Varinfo_encode_bit_int(self, *args)
def decode_int(self, *args): return _dballe._Varinfo_decode_int(self, *args)
def bufr_decode_int(self, *args): return _dballe._Varinfo_bufr_decode_int(self, *args)
def reset(self): return _dballe._Varinfo_reset(self)
def set(self, *args): return _dballe._Varinfo_set(self, *args)
def set_string(self, *args): return _dballe._Varinfo_set_string(self, *args)
def compute_range(self): return _dballe._Varinfo_compute_range(self)
__swig_destroy__ = _dballe.delete__Varinfo
__del__ = lambda self : None;
_Varinfo_swigregister = _dballe._Varinfo_swigregister
_Varinfo_swigregister(_Varinfo)
class MutableVarinfo(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, MutableVarinfo, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, MutableVarinfo, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _dballe.new_MutableVarinfo(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _dballe.delete_MutableVarinfo
__del__ = lambda self : None;
def __deref__(self): return _dballe.MutableVarinfo___deref__(self)
def __ref__(self): return _dballe.MutableVarinfo___ref__(self)
def impl(self): return _dballe.MutableVarinfo_impl(self)
__swig_getmethods__["create_singleuse"] = lambda x: _dballe.MutableVarinfo_create_singleuse
if _newclass:create_singleuse = staticmethod(_dballe.MutableVarinfo_create_singleuse)
__swig_setmethods__["var"] = _dballe.MutableVarinfo_var_set
__swig_getmethods__["var"] = _dballe.MutableVarinfo_var_get
if _newclass:var = _swig_property(_dballe.MutableVarinfo_var_get, _dballe.MutableVarinfo_var_set)
__swig_setmethods__["desc"] = _dballe.MutableVarinfo_desc_set
__swig_getmethods__["desc"] = _dballe.MutableVarinfo_desc_get
if _newclass:desc = _swig_property(_dballe.MutableVarinfo_desc_get, _dballe.MutableVarinfo_desc_set)
__swig_setmethods__["unit"] = _dballe.MutableVarinfo_unit_set
__swig_getmethods__["unit"] = _dballe.MutableVarinfo_unit_get
if _newclass:unit = _swig_property(_dballe.MutableVarinfo_unit_get, _dballe.MutableVarinfo_unit_set)
__swig_setmethods__["scale"] = _dballe.MutableVarinfo_scale_set
__swig_getmethods__["scale"] = _dballe.MutableVarinfo_scale_get
if _newclass:scale = _swig_property(_dballe.MutableVarinfo_scale_get, _dballe.MutableVarinfo_scale_set)
__swig_setmethods__["ref"] = _dballe.MutableVarinfo_ref_set
__swig_getmethods__["ref"] = _dballe.MutableVarinfo_ref_get
if _newclass:ref = _swig_property(_dballe.MutableVarinfo_ref_get, _dballe.MutableVarinfo_ref_set)
__swig_setmethods__["len"] = _dballe.MutableVarinfo_len_set
__swig_getmethods__["len"] = _dballe.MutableVarinfo_len_get
if _newclass:len = _swig_property(_dballe.MutableVarinfo_len_get, _dballe.MutableVarinfo_len_set)
__swig_setmethods__["bit_ref"] = _dballe.MutableVarinfo_bit_ref_set
__swig_getmethods__["bit_ref"] = _dballe.MutableVarinfo_bit_ref_get
if _newclass:bit_ref = _swig_property(_dballe.MutableVarinfo_bit_ref_get, _dballe.MutableVarinfo_bit_ref_set)
__swig_setmethods__["bit_len"] = _dballe.MutableVarinfo_bit_len_set
__swig_getmethods__["bit_len"] = _dballe.MutableVarinfo_bit_len_get
if _newclass:bit_len = _swig_property(_dballe.MutableVarinfo_bit_len_get, _dballe.MutableVarinfo_bit_len_set)
__swig_setmethods__["flags"] = _dballe.MutableVarinfo_flags_set
__swig_getmethods__["flags"] = _dballe.MutableVarinfo_flags_get
if _newclass:flags = _swig_property(_dballe.MutableVarinfo_flags_get, _dballe.MutableVarinfo_flags_set)
__swig_setmethods__["imin"] = _dballe.MutableVarinfo_imin_set
__swig_getmethods__["imin"] = _dballe.MutableVarinfo_imin_get
if _newclass:imin = _swig_property(_dballe.MutableVarinfo_imin_get, _dballe.MutableVarinfo_imin_set)
__swig_setmethods__["imax"] = _dballe.MutableVarinfo_imax_set
__swig_getmethods__["imax"] = _dballe.MutableVarinfo_imax_get
if _newclass:imax = _swig_property(_dballe.MutableVarinfo_imax_get, _dballe.MutableVarinfo_imax_set)
__swig_setmethods__["dmin"] = _dballe.MutableVarinfo_dmin_set
__swig_getmethods__["dmin"] = _dballe.MutableVarinfo_dmin_get
if _newclass:dmin = _swig_property(_dballe.MutableVarinfo_dmin_get, _dballe.MutableVarinfo_dmin_set)
__swig_setmethods__["dmax"] = _dballe.MutableVarinfo_dmax_set
__swig_getmethods__["dmax"] = _dballe.MutableVarinfo_dmax_get
if _newclass:dmax = _swig_property(_dballe.MutableVarinfo_dmax_get, _dballe.MutableVarinfo_dmax_set)
__swig_setmethods__["alteration"] = _dballe.MutableVarinfo_alteration_set
__swig_getmethods__["alteration"] = _dballe.MutableVarinfo_alteration_get
if _newclass:alteration = _swig_property(_dballe.MutableVarinfo_alteration_get, _dballe.MutableVarinfo_alteration_set)
__swig_setmethods__["alterations"] = _dballe.MutableVarinfo_alterations_set
__swig_getmethods__["alterations"] = _dballe.MutableVarinfo_alterations_get
if _newclass:alterations = _swig_property(_dballe.MutableVarinfo_alterations_get, _dballe.MutableVarinfo_alterations_set)
__swig_setmethods__["bufr_unit"] = _dballe.MutableVarinfo_bufr_unit_set
__swig_getmethods__["bufr_unit"] = _dballe.MutableVarinfo_bufr_unit_get
if _newclass:bufr_unit = _swig_property(_dballe.MutableVarinfo_bufr_unit_get, _dballe.MutableVarinfo_bufr_unit_set)
__swig_setmethods__["bufr_scale"] = _dballe.MutableVarinfo_bufr_scale_set
__swig_getmethods__["bufr_scale"] = _dballe.MutableVarinfo_bufr_scale_get
if _newclass:bufr_scale = _swig_property(_dballe.MutableVarinfo_bufr_scale_get, _dballe.MutableVarinfo_bufr_scale_set)
__swig_setmethods__["_ref"] = _dballe.MutableVarinfo__ref_set
__swig_getmethods__["_ref"] = _dballe.MutableVarinfo__ref_get
if _newclass:_ref = _swig_property(_dballe.MutableVarinfo__ref_get, _dballe.MutableVarinfo__ref_set)
def do_ref(self): return _dballe.MutableVarinfo_do_ref(self)
def do_unref(self): return _dballe.MutableVarinfo_do_unref(self)
def is_string(self): return _dballe.MutableVarinfo_is_string(self)
def is_binary(self): return _dballe.MutableVarinfo_is_binary(self)
def encode_int(self, *args): return _dballe.MutableVarinfo_encode_int(self, *args)
def encode_bit_int(self, *args): return _dballe.MutableVarinfo_encode_bit_int(self, *args)
def decode_int(self, *args): return _dballe.MutableVarinfo_decode_int(self, *args)
def bufr_decode_int(self, *args): return _dballe.MutableVarinfo_bufr_decode_int(self, *args)
def reset(self): return _dballe.MutableVarinfo_reset(self)
def set(self, *args): return _dballe.MutableVarinfo_set(self, *args)
def set_string(self, *args): return _dballe.MutableVarinfo_set_string(self, *args)
def compute_range(self): return _dballe.MutableVarinfo_compute_range(self)
MutableVarinfo_swigregister = _dballe.MutableVarinfo_swigregister
MutableVarinfo_swigregister(MutableVarinfo)
def MutableVarinfo_create_singleuse():
return _dballe.MutableVarinfo_create_singleuse()
MutableVarinfo_create_singleuse = _dballe.MutableVarinfo_create_singleuse
class Varinfo(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Varinfo, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Varinfo, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _dballe.new_Varinfo(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _dballe.delete_Varinfo
__del__ = lambda self : None;
def __ref__(self): return _dballe.Varinfo___ref__(self)
def __deref__(self): return _dballe.Varinfo___deref__(self)
def impl(self): return _dballe.Varinfo_impl(self)
def __str__(self):
return "%s %s" % (self.var, self.desc)
def __repr__(self):
return "<Varinfo %s,%s,%s,scale %d,len %d,string %s,irange %d..%d,frange: %f..%f>" % (
self.var, self.unit, self.desc, self.scale, self.len,
str(self.is_string()), self.imin, self.imax, self.dmin, self.dmax)
__swig_getmethods__["var"] = _dballe.Varinfo_var_get
if _newclass:var = _swig_property(_dballe.Varinfo_var_get)
__swig_getmethods__["desc"] = _dballe.Varinfo_desc_get
if _newclass:desc = _swig_property(_dballe.Varinfo_desc_get)
__swig_getmethods__["unit"] = _dballe.Varinfo_unit_get
if _newclass:unit = _swig_property(_dballe.Varinfo_unit_get)
__swig_getmethods__["scale"] = _dballe.Varinfo_scale_get
if _newclass:scale = _swig_property(_dballe.Varinfo_scale_get)
__swig_getmethods__["ref"] = _dballe.Varinfo_ref_get
if _newclass:ref = _swig_property(_dballe.Varinfo_ref_get)
__swig_getmethods__["len"] = _dballe.Varinfo_len_get
if _newclass:len = _swig_property(_dballe.Varinfo_len_get)
__swig_getmethods__["bit_ref"] = _dballe.Varinfo_bit_ref_get
if _newclass:bit_ref = _swig_property(_dballe.Varinfo_bit_ref_get)
__swig_getmethods__["bit_len"] = _dballe.Varinfo_bit_len_get
if _newclass:bit_len = _swig_property(_dballe.Varinfo_bit_len_get)
__swig_getmethods__["flags"] = _dballe.Varinfo_flags_get
if _newclass:flags = _swig_property(_dballe.Varinfo_flags_get)
__swig_getmethods__["imin"] = _dballe.Varinfo_imin_get
if _newclass:imin = _swig_property(_dballe.Varinfo_imin_get)
__swig_getmethods__["imax"] = _dballe.Varinfo_imax_get
if _newclass:imax = _swig_property(_dballe.Varinfo_imax_get)
__swig_getmethods__["dmin"] = _dballe.Varinfo_dmin_get
if _newclass:dmin = _swig_property(_dballe.Varinfo_dmin_get)
__swig_getmethods__["dmax"] = _dballe.Varinfo_dmax_get
if _newclass:dmax = _swig_property(_dballe.Varinfo_dmax_get)
__swig_getmethods__["alteration"] = _dballe.Varinfo_alteration_get
if _newclass:alteration = _swig_property(_dballe.Varinfo_alteration_get)
__swig_getmethods__["alterations"] = _dballe.Varinfo_alterations_get
if _newclass:alterations = _swig_property(_dballe.Varinfo_alterations_get)
__swig_getmethods__["bufr_unit"] = _dballe.Varinfo_bufr_unit_get
if _newclass:bufr_unit = _swig_property(_dballe.Varinfo_bufr_unit_get)
__swig_getmethods__["bufr_scale"] = _dballe.Varinfo_bufr_scale_get
if _newclass:bufr_scale = _swig_property(_dballe.Varinfo_bufr_scale_get)
__swig_getmethods__["_ref"] = _dballe.Varinfo__ref_get
if _newclass:_ref = _swig_property(_dballe.Varinfo__ref_get)
def do_ref(self): return _dballe.Varinfo_do_ref(self)
def do_unref(self): return _dballe.Varinfo_do_unref(self)
def is_string(self): return _dballe.Varinfo_is_string(self)
def is_binary(self): return _dballe.Varinfo_is_binary(self)
def encode_int(self, *args): return _dballe.Varinfo_encode_int(self, *args)
def encode_bit_int(self, *args): return _dballe.Varinfo_encode_bit_int(self, *args)
def decode_int(self, *args): return _dballe.Varinfo_decode_int(self, *args)
def bufr_decode_int(self, *args): return _dballe.Varinfo_bufr_decode_int(self, *args)
Varinfo_swigregister = _dballe.Varinfo_swigregister
Varinfo_swigregister(Varinfo)
class Vartable(VartableBase):
__swig_setmethods__ = {}
for _s in [VartableBase]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Vartable, name, value)
__swig_getmethods__ = {}
for _s in [VartableBase]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, Vartable, name)
__repr__ = _swig_repr
def __init__(self):
this = _dballe.new_Vartable()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _dballe.delete_Vartable
__del__ = lambda self : None;
def id(self): return _dballe.Vartable_id(self)
def loaded(self): return _dballe.Vartable_loaded(self)
def load(self, *args): return _dballe.Vartable_load(self, *args)
def query(self, *args): return _dballe.Vartable_query(self, *args)
def contains(self, *args): return _dballe.Vartable_contains(self, *args)
def query_altered(self, *args): return _dballe.Vartable_query_altered(self, *args)
__swig_getmethods__["get"] = lambda x: _dballe.Vartable_get
if _newclass:get = staticmethod(_dballe.Vartable_get)
__swig_getmethods__["find_table"] = lambda x: _dballe.Vartable_find_table
if _newclass:find_table = staticmethod(_dballe.Vartable_find_table)
Vartable_swigregister = _dballe.Vartable_swigregister
Vartable_swigregister(Vartable)
def Vartable_get(*args):
return _dballe.Vartable_get(*args)
Vartable_get = _dballe.Vartable_get
def Vartable_find_table(*args):
return _dballe.Vartable_find_table(*args)
Vartable_find_table = _dballe.Vartable_find_table
class Var(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Var, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Var, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _dballe.new_Var(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _dballe.delete_Var
__del__ = lambda self : None;
def equals(self, *args): return _dballe.Var_equals(self, *args)
def __ne__(self, *args): return _dballe.Var___ne__(self, *args)
def code(self): return _dballe.Var_code(self)
def info(self): return _dballe.Var_info(self)
def value(self): return _dballe.Var_value(self)
def isset(self): return _dballe.Var_isset(self)
def enqi(self): return _dballe.Var_enqi(self)
def enqd(self): return _dballe.Var_enqd(self)
def enqc(self): return _dballe.Var_enqc(self)
def seti(self, *args): return _dballe.Var_seti(self, *args)
def setd(self, *args): return _dballe.Var_setd(self, *args)
def setc(self, *args): return _dballe.Var_setc(self, *args)
def set_binary(self, *args): return _dballe.Var_set_binary(self, *args)
def setc_truncate(self, *args): return _dballe.Var_setc_truncate(self, *args)
def set_from_formatted(self, *args): return _dballe.Var_set_from_formatted(self, *args)
def set(self, *args): return _dballe.Var_set(self, *args)
def unset(self): return _dballe.Var_unset(self)
def clear_attrs(self): return _dballe.Var_clear_attrs(self)
def enqa(self, *args): return _dballe.Var_enqa(self, *args)
def enqa_by_associated_field_significance(self, *args): return _dballe.Var_enqa_by_associated_field_significance(self, *args)
def seta(self, *args): return _dballe.Var_seta(self, *args)
def unseta(self, *args): return _dballe.Var_unseta(self, *args)
def next_attr(self): return _dballe.Var_next_attr(self)
def copy_val(self, *args): return _dballe.Var_copy_val(self, *args)
def copy_val_only(self, *args): return _dballe.Var_copy_val_only(self, *args)
def copy_attrs(self, *args): return _dballe.Var_copy_attrs(self, *args)
def copy_attrs_if_defined(self, *args): return _dballe.Var_copy_attrs_if_defined(self, *args)
def format(self, ifundef = "(undef)"): return _dballe.Var_format(self, ifundef)
def _print(self, *args): return _dballe.Var__print(self, *args)
def print_without_attrs(self, *args): return _dballe.Var_print_without_attrs(self, *args)
def diff(self, *args): return _dballe.Var_diff(self, *args)
def lua_push(self, *args): return _dballe.Var_lua_push(self, *args)
__swig_getmethods__["lua_check"] = lambda x: _dballe.Var_lua_check
if _newclass:lua_check = staticmethod(_dballe.Var_lua_check)
def __eq__(self, var):
if var is None:
return False
elif not isinstance(var, Var):
return self.enq() == var
else:
return self.equals(var)
def __cmp__(self, other):
if other == None:
return 1
codea = self.code()
codeb = self.code()
if codea != codeb:
return cmp(codea, codeb)
isstra = self.info().is_string()
isstrb = other.info().is_string()
if isstra and isstrb:
return cmp(self.enqc(), other.enqc())
elif isstra and not isstrb:
return 1
elif not isstra and isstrb:
return -1
else:
return cmp(self.enqi(), other.enqi())
def __str__(self):
return self.format("None")
def __repr__(self):
return "<Var %s, %s>" % (self.code(), self.format("None"))
def enq(self):
if self.info().is_string():
return self.enqc()
elif self.info().scale == 0:
return self.enqi()
else:
return self.enqd()
Var_swigregister = _dballe.Var_swigregister
Var_swigregister(Var)
def Var_lua_check(*args):
return _dballe.Var_lua_check(*args)
Var_lua_check = _dballe.Var_lua_check
def varinfo(*args):
return _dballe.varinfo(*args)
varinfo = _dballe.varinfo
def map_code_to_dballe(*args):
return _dballe.map_code_to_dballe(*args)
map_code_to_dballe = _dballe.map_code_to_dballe
DBA_KEY_ERROR = _dballe.DBA_KEY_ERROR
DBA_KEY_PRIORITY = _dballe.DBA_KEY_PRIORITY
DBA_KEY_PRIOMAX = _dballe.DBA_KEY_PRIOMAX
DBA_KEY_PRIOMIN = _dballe.DBA_KEY_PRIOMIN
DBA_KEY_REP_COD = _dballe.DBA_KEY_REP_COD
DBA_KEY_REP_MEMO = _dballe.DBA_KEY_REP_MEMO
DBA_KEY_ANA_ID = _dballe.DBA_KEY_ANA_ID
DBA_KEY_MOBILE = _dballe.DBA_KEY_MOBILE
DBA_KEY_IDENT = _dballe.DBA_KEY_IDENT
DBA_KEY_LAT = _dballe.DBA_KEY_LAT
DBA_KEY_LON = _dballe.DBA_KEY_LON
DBA_KEY_LATMAX = _dballe.DBA_KEY_LATMAX
DBA_KEY_LATMIN = _dballe.DBA_KEY_LATMIN
DBA_KEY_LONMAX = _dballe.DBA_KEY_LONMAX
DBA_KEY_LONMIN = _dballe.DBA_KEY_LONMIN
DBA_KEY_YEAR = _dballe.DBA_KEY_YEAR
DBA_KEY_MONTH = _dballe.DBA_KEY_MONTH
DBA_KEY_DAY = _dballe.DBA_KEY_DAY
DBA_KEY_HOUR = _dballe.DBA_KEY_HOUR
DBA_KEY_MIN = _dballe.DBA_KEY_MIN
DBA_KEY_SEC = _dballe.DBA_KEY_SEC
DBA_KEY_YEARMAX = _dballe.DBA_KEY_YEARMAX
DBA_KEY_YEARMIN = _dballe.DBA_KEY_YEARMIN
DBA_KEY_MONTHMAX = _dballe.DBA_KEY_MONTHMAX
DBA_KEY_MONTHMIN = _dballe.DBA_KEY_MONTHMIN
DBA_KEY_DAYMAX = _dballe.DBA_KEY_DAYMAX
DBA_KEY_DAYMIN = _dballe.DBA_KEY_DAYMIN
DBA_KEY_HOURMAX = _dballe.DBA_KEY_HOURMAX
DBA_KEY_HOURMIN = _dballe.DBA_KEY_HOURMIN
DBA_KEY_MINUMAX = _dballe.DBA_KEY_MINUMAX
DBA_KEY_MINUMIN = _dballe.DBA_KEY_MINUMIN
DBA_KEY_SECMAX = _dballe.DBA_KEY_SECMAX
DBA_KEY_SECMIN = _dballe.DBA_KEY_SECMIN
DBA_KEY_LEVELTYPE1 = _dballe.DBA_KEY_LEVELTYPE1
DBA_KEY_L1 = _dballe.DBA_KEY_L1
DBA_KEY_LEVELTYPE2 = _dballe.DBA_KEY_LEVELTYPE2
DBA_KEY_L2 = _dballe.DBA_KEY_L2
DBA_KEY_PINDICATOR = _dballe.DBA_KEY_PINDICATOR
DBA_KEY_P1 = _dballe.DBA_KEY_P1
DBA_KEY_P2 = _dballe.DBA_KEY_P2
DBA_KEY_VAR = _dballe.DBA_KEY_VAR
DBA_KEY_VARLIST = _dballe.DBA_KEY_VARLIST
DBA_KEY_CONTEXT_ID = _dballe.DBA_KEY_CONTEXT_ID
DBA_KEY_QUERY = _dballe.DBA_KEY_QUERY
DBA_KEY_ANA_FILTER = _dballe.DBA_KEY_ANA_FILTER
DBA_KEY_DATA_FILTER = _dballe.DBA_KEY_DATA_FILTER
DBA_KEY_ATTR_FILTER = _dballe.DBA_KEY_ATTR_FILTER
DBA_KEY_LIMIT = _dballe.DBA_KEY_LIMIT
DBA_KEY_VAR_RELATED = _dballe.DBA_KEY_VAR_RELATED
DBA_KEY_COUNT = _dballe.DBA_KEY_COUNT
class Record(_object):
"""
DB-All.E record.
A Record is a container for one observation of meteorological values,
that includes anagraphical informations, physical location of the
observation in time and space, and all the observed variables.
C++ includes: record.h
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Record, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Record, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""dballe::Record::Record(const Record &rec) """
this = _dballe.new_Record(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _dballe.delete_Record
__del__ = lambda self : None;
def equals(self, *args): return _dballe.Record_equals(self, *args)
def __ne__(self, *args): return _dballe.Record___ne__(self, *args)
def clear(self):
"""
void
dballe::Record::clear()
Remove all data from the record.
"""
return _dballe.Record_clear(self)
def clear_vars(self):
"""
void
dballe::Record::clear_vars()
Remove all variables from the record, leaving the keywords intact.
"""
return _dballe.Record_clear_vars(self)
def add(self, *args):
"""
void
dballe::Record::add(const Record &source)
Copy all data from the record source into dest.
At the end of the function, dest will contain its previous values,
plus the values in source. If a value is present both in source and in
dest, the one in dest will be overwritten.
Parameters:
source: The record to copy data from.
"""
return _dballe.Record_add(self, *args)
def contains(self, *args):
"""
bool
dballe::Record::contains(const Record &subset) const
Return true if all elements of subset are present in this record, with
the same value.
"""
return _dballe.Record_contains(self, *args)
def set_to_difference(self, *args):
"""
void
dballe::Record::set_to_difference(const Record &source1, const Record
&source2)
Set the record to contain only those fields that change source1 into
source2.
If a field has been deleted from source1 to source2, it will not be
copied in dest.
Parameters:
source1: The original record to compute the changes from.
source2: The new record that has changes over source1.
"""
return _dballe.Record_set_to_difference(self, *args)
def peek(self, *args):
"""
const wreport::Var*
dballe::Record::peek(wreport::Varcode code) const throw () Shortcut
for var_peek.
"""
return _dballe.Record_peek(self, *args)
def peek_value(self, *args):
"""
const char*
dballe::Record::peek_value(wreport::Varcode code) const throw ()
Shortcut for var_peek_value.
"""
return _dballe.Record_peek_value(self, *args)
def getvar(self, *args): return _dballe.Record_getvar(self, *args)
def unset(self, *args): return _dballe.Record_unset(self, *args)
def set_ana_context(self):
"""
void
dballe::Record::set_ana_context()
Set the date, level and timerange values to match the anagraphical
context.
"""
return _dballe.Record_set_ana_context(self)
def vars(self):
"""
const
std::vector<wreport::Var*>& dballe::Record::vars() const
Return the vector with the variables.
"""
return _dballe.Record_vars(self)
def parse_date_extremes(self):
"""
void
dballe::Record::parse_date_extremes(int *minvalues, int *maxvalues)
const
Parse the date extremes set in Record.
This function will examine the values yearmin, monthmin, daymin,
hourmin, minumin, secmin, yearmax, monthmax, daymax, hourmax, minumax,
secmax, year, month, day, hour, min and sec, and will compute the two
datetime extremes that bound the interval they represent.
Parameters:
minvalues: An array of 6 integers that will be filled with the
minimum year, month, day, hour, minute and seconds.
maxvalues: An array of 6 integers that will be filled with the
maximum year, month, day, hour, minute and seconds.
"""
return _dballe.Record_parse_date_extremes(self)
def parse_date(self, *args):
"""
void
dballe::Record::parse_date(int *values) const
Parse the date set in the Record.
This function will examine the values year, month, day, hour, min and
sec, and will compute the lower bound of the datetime they represent.
Parameters:
values: An array of 6 integers that will be filled with the minimum
year, month, day, hour, minute and seconds.
"""
return _dballe.Record_parse_date(self, *args)
def set_from_string(self, *args):
"""
void
dballe::Record::set_from_string(const char *str)
Set a value in the record according to an assignment encoded in a
string.
String can use keywords, aliases and varcodes. Examples: ana_id=3,
name=Bologna, B12012=32.4
Parameters:
rec: The record where the value is to be set.
str: The string containing the assignment.
The error indicator for the function.
"""
return _dballe.Record_set_from_string(self, *args)
def _print(self, *args):
"""
void
dballe::Record::print(FILE *out) const
Print the contents of this record to the given file descriptor.
Parameters:
out: The output file descriptor
"""
return _dballe.Record__print(self, *args)
__swig_getmethods__["keyword_name"] = lambda x: _dballe.Record_keyword_name
if _newclass:keyword_name = staticmethod(_dballe.Record_keyword_name)
__swig_getmethods__["keyword_info"] = lambda x: _dballe.Record_keyword_info
if _newclass:keyword_info = staticmethod(_dballe.Record_keyword_info)
__swig_getmethods__["keyword_byname"] = lambda x: _dballe.Record_keyword_byname
if _newclass:keyword_byname = staticmethod(_dballe.Record_keyword_byname)
__swig_getmethods__["keyword_byname_len"] = lambda x: _dballe.Record_keyword_byname_len
if _newclass:keyword_byname_len = staticmethod(_dballe.Record_keyword_byname_len)
def __eq__(self, rec):
if rec is None:
return False
elif not isinstance(rec, Record):
return False
else:
return self.equals(record)
def _format_keys(self): return _dballe.Record__format_keys(self)
def copy(self):
return Record(self)
def update(self, pairs):
if isinstance(pairs, dict):
for k, v in pairs.iteritems():
self[k] = v
elif isinstance(pairs, Var):
self[pairs.code()] = pairs.enq()
else:
for k, v in pairs:
self[k] = v
def _get_iter(self, *args):
found = False
vals = []
for x in args:
vals.append(self.get(x, None))
if vals[-1] is not None:
found = True
if found:
return tuple(vals)
else:
return None
def _get_dt(self, *args):
res = []
for idx, x in enumerate(args):
if x in self:
res.append(self.getvar(x).enq())
elif idx < 3:
return None
else:
res.append(0)
import datetime
return datetime.datetime(*res)
KEYS_DATE = ("year", "month", "day", "hour", "min", "sec")
KEYS_DATEMIN = ("yearmin", "monthmin", "daymin", "hourmin", "minumin", "secmin")
KEYS_DATEMAX = ("yearmax", "monthmax", "daymax", "hourmax", "minumax", "secmax")
KEYS_LEVEL = ("leveltype1", "l1", "leveltype2", "l2")
KEYS_TRANGE = ("pindicator", "p1", "p2")
def _macro_get_date(self):
return self._get_dt(*self.KEYS_DATE)
def _macro_get_datemin(self):
return self._get_dt(*self.KEYS_DATEMIN)
def _macro_get_datemax(self):
return self._get_dt(*self.KEYS_DATEMAX)
def _macro_get_level(self):
return self._get_iter(*self.KEYS_LEVEL)
def _macro_get_trange(self):
return self._get_iter(*self.KEYS_TRANGE)
_macro_get_timerange = _macro_get_trange
def __getitem__(self, key):
"Query one value by name"
macro = getattr(self, "_macro_get_" + key, None)
if macro:
res = macro()
if res is None:
raise KeyError(key)
return res
else:
var = self.getvar(key)
if not var.isset():
raise KeyError(key)
return var.enq()
def _macro_set_date(self, dt):
for kd, kr in zip(("year", "month", "day", "hour", "minute", "second"), self.KEYS_DATE):
self.getvar(kr).set(getattr(dt, kd))
def _macro_set_datemin(self, dt):
for kd, kr in zip(("year", "month", "day", "hour", "minute", "second"), self.KEYS_DATEMIN):
self.getvar(kr).set(getattr(dt, kd))
def _macro_set_datemax(self, dt):
for kd, kr in zip(("year", "month", "day", "hour", "minute", "second"), self.KEYS_DATEMAX):
self.getvar(kr).set(getattr(dt, kd))
def _macro_set_level(self, tu):
for idx, key in enumerate(self.KEYS_LEVEL):
if tu is None or idx >= len(tu) or tu[idx] is None:
self.unset(key)
else:
self.getvar(key).set(tu[idx])
def _macro_set_trange(self, tu):
for idx, key in enumerate(self.KEYS_TRANGE):
if tu is None or idx >= len(tu) or tu[idx] is None:
self.unset(key)
else:
self.getvar(key).set(tu[idx])
_macro_set_timerange = _macro_set_trange
def __setitem__(self, key, val):
"Set one value by name"
if val is None:
del self[key]
else:
macro = getattr(self, "_macro_set_" + key, None)
if macro:
return macro(val)
else:
self.getvar(key).set(val)
def _macro_del_date(self):
for k in self.KEYS_DATE:
self.unset(k)
def _macro_del_datemin(self):
for k in self.KEYS_DATEMIN:
self.unset(k)
def _macro_del_datemax(self):
for k in self.KEYS_DATEMAX:
self.unset(k)
def _macro_del_level(self):
for k in self.KEYS_LEVEL:
self.unset(k)
def _macro_del_trange(self):
for k in self.KEYS_TRANGE:
self.unset(k)
_macro_del_timerange = _macro_del_trange
def __delitem__(self, key):
"Unset one value by name"
macro = getattr(self, "_macro_del_" + key, None)
if macro:
return macro()
else:
self.unset(key)
def _macro_has_date(self):
return all([self.peek_value(k) != None for k in self.KEYS_DATE[:3]])
def _macro_has_datemin(self):
return all([self.peek_value(k) != None for k in self.KEYS_DATEMIN[:3]])
def _macro_has_datemax(self):
return all([self.peek_value(k) != None for k in self.KEYS_DATEMAX[:3]])
def _macro_has_level(self):
return True
def _macro_has_trange(self):
return True
_macro_has_timerange = _macro_has_trange
def __contains__(self, key):
"Check if a value is set"
macro = getattr(self, "_macro_has_" + key, None)
if macro:
return macro()
else:
return self.peek_value(key) != None
def __iter__(self):
"Iterate all the variables of the record"
for v in self.vars():
yield v
def __len__(self):
"Number of variables in the record"
return len(self.vars())
def keys(self):
"List of names of variables in the record"
return [x.code() for x in self.vars()]
def iterkeys(self):
"List of names of variables in the record"
return (x.code() for x in self.vars())
def values(self):
"List of names of variables in the record"
return [x.enq() for x in self.vars()]
def itervalues(self):
"List of names of variables in the record"
return (x.enq() for x in self.vars())
def items(self):
"List of names of variables in the record"
return [(x.code(), x.enq()) for x in self.vars()]
def iteritems(self):
"List of names of variables in the record"
return ((x.code(), x.enq()) for x in self.vars())
def itervars(self):
"Iterate all the variables in the record"
return (x for x in self.vars())
def __str__(self):
keys = self._format_keys()
items = ", ".join(("%s: %s" % (a, b) for a, b in self.iteritems()))
return "{" + ", ".join((keys, items)) + "}"
def __repr__(self):
return "<Record %s>" % self.__str__()
def get(self, key, *args):
try:
return self[key]
except KeyError:
if not args: raise
return args[0]
def pop(self, key, *args):
try:
res = self[key]
del self[key]
return res
except KeyError:
if not args: raise
return args[0]
Record_swigregister = _dballe.Record_swigregister
Record_swigregister(Record)
def format_code(*args):
return _dballe.format_code(*args)
format_code = _dballe.format_code
def Record_keyword_name(*args):
return _dballe.Record_keyword_name(*args)
Record_keyword_name = _dballe.Record_keyword_name
def Record_keyword_info(*args):
return _dballe.Record_keyword_info(*args)
Record_keyword_info = _dballe.Record_keyword_info
def Record_keyword_byname(*args):
return _dballe.Record_keyword_byname(*args)
Record_keyword_byname = _dballe.Record_keyword_byname
def Record_keyword_byname_len(*args):
return _dballe.Record_keyword_byname_len(*args)
Record_keyword_byname_len = _dballe.Record_keyword_byname_len
class MatchedRecord(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, MatchedRecord, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, MatchedRecord, name)
__repr__ = _swig_repr
__swig_getmethods__["r"] = _dballe.MatchedRecord_r_get
if _newclass:r = _swig_property(_dballe.MatchedRecord_r_get)
def __init__(self, *args):
"""dballe::MatchedRecord::MatchedRecord(const Record &r) """
this = _dballe.new_MatchedRecord(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _dballe.delete_MatchedRecord
__del__ = lambda self : None;
def match_var_id(self, *args):
"""
virtual
matcher::Result dballe::MatchedRecord::match_var_id(int val) const
Match variable ID.
This corresponds to B33195
"""
return _dballe.MatchedRecord_match_var_id(self, *args)
def match_station_id(self, *args):
"""
virtual matcher::Result dballe::MatchedRecord::match_station_id(int
val) const
Match station ID.
This corresponds to DBA_KEY_ANA_ID
"""
return _dballe.MatchedRecord_match_station_id(self, *args)
def match_station_wmo(self, *args):
"""
virtual matcher::Result dballe::MatchedRecord::match_station_wmo(int
block, int station=-1) const
Match station WMO code.
If station is -1, only match the block.
"""
return _dballe.MatchedRecord_match_station_wmo(self, *args)
def match_date(self, *args):
"""
virtual
matcher::Result dballe::MatchedRecord::match_date(const int *min,
const int *max) const
Match date.
min and max are arrays of 6 ints (from year to second), and either of
them can have -1 as the first element to indicate an open bound.
"""
return _dballe.MatchedRecord_match_date(self, *args)
def match_coords(self, *args):
"""
virtual
matcher::Result dballe::MatchedRecord::match_coords(int latmin, int
latmax, int lonmin, int lonmax) const
Match coordinates, with bounds in 1/100000 of degree.
Any value can be set to MISSING_INT if not applicable or to represent
an open bound
"""
return _dballe.MatchedRecord_match_coords(self, *args)
def match_rep_memo(self, *args):
"""
virtual
matcher::Result dballe::MatchedRecord::match_rep_memo(const char
*memo) const
Match rep_memo.
the memo value that is passed is always lowercase
"""
return _dballe.MatchedRecord_match_rep_memo(self, *args)
MatchedRecord_swigregister = _dballe.MatchedRecord_swigregister
MatchedRecord_swigregister(MatchedRecord)
class Rawmsg(_object):
"""
Annotated string buffer for encoded messages.
C++ includes: rawmsg.h
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Rawmsg, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Rawmsg, name)
__repr__ = _swig_repr
__swig_setmethods__["file"] = _dballe.Rawmsg_file_set
__swig_getmethods__["file"] = _dballe.Rawmsg_file_get
if _newclass:file = _swig_property(_dballe.Rawmsg_file_get, _dballe.Rawmsg_file_set)
__swig_setmethods__["offset"] = _dballe.Rawmsg_offset_set
__swig_getmethods__["offset"] = _dballe.Rawmsg_offset_get
if _newclass:offset = _swig_property(_dballe.Rawmsg_offset_get, _dballe.Rawmsg_offset_set)
__swig_setmethods__["index"] = _dballe.Rawmsg_index_set
__swig_getmethods__["index"] = _dballe.Rawmsg_index_get
if _newclass:index = _swig_property(_dballe.Rawmsg_index_get, _dballe.Rawmsg_index_set)
__swig_setmethods__["encoding"] = _dballe.Rawmsg_encoding_set
__swig_getmethods__["encoding"] = _dballe.Rawmsg_encoding_get
if _newclass:encoding = _swig_property(_dballe.Rawmsg_encoding_get, _dballe.Rawmsg_encoding_set)
def __init__(self):
"""dballe::Rawmsg::Rawmsg() """
this = _dballe.new_Rawmsg()
try: self.this.append(this)
except: self.this = this
def clear(self):
"""
void
dballe::Rawmsg::clear() throw ()
"""
return _dballe.Rawmsg_clear(self)
__swig_destroy__ = _dballe.delete_Rawmsg
__del__ = lambda self : None;
Rawmsg_swigregister = _dballe.Rawmsg_swigregister
Rawmsg_swigregister(Rawmsg)
BUFR = _dballe.BUFR
CREX = _dballe.CREX
AOF = _dballe.AOF
def encoding_name(*args):
return _dballe.encoding_name(*args)
encoding_name = _dballe.encoding_name
class Level(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Level, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Level, name)
__repr__ = _swig_repr
__swig_setmethods__["ltype1"] = _dballe.Level_ltype1_set
__swig_getmethods__["ltype1"] = _dballe.Level_ltype1_get
if _newclass:ltype1 = _swig_property(_dballe.Level_ltype1_get, _dballe.Level_ltype1_set)
__swig_setmethods__["l1"] = _dballe.Level_l1_set
__swig_getmethods__["l1"] = _dballe.Level_l1_get
if _newclass:l1 = _swig_property(_dballe.Level_l1_get, _dballe.Level_l1_set)
__swig_setmethods__["ltype2"] = _dballe.Level_ltype2_set
__swig_getmethods__["ltype2"] = _dballe.Level_ltype2_get
if _newclass:ltype2 = _swig_property(_dballe.Level_ltype2_get, _dballe.Level_ltype2_set)
__swig_setmethods__["l2"] = _dballe.Level_l2_set
__swig_getmethods__["l2"] = _dballe.Level_l2_get
if _newclass:l2 = _swig_property(_dballe.Level_l2_get, _dballe.Level_l2_set)
def __init__(self, *args):
"""
dballe::Level::Level(const char *ltype1, const char *l1=NULL, const
char *ltype2=NULL, const char *l2=NULL)
"""
this = _dballe.new_Level(*args)
try: self.this.append(this)
except: self.this = this
def __eq__(self, *args): return _dballe.Level___eq__(self, *args)
def __ne__(self, *args): return _dballe.Level___ne__(self, *args)
def compare(self, *args):
"""
int
dballe::Level::compare(const Level &l) const
Compare two Level strutures, for use in sorting.
-1 if *this < l, 0 if *this == l, 1 if *this > l
"""
return _dballe.Level_compare(self, *args)
def describe(self):
"""
std::string
dballe::Level::describe() const
Return a string description of this level.
"""
return _dballe.Level_describe(self)
def format(self, *args):
"""
void
dballe::Level::format(std::ostream &out, const char *undef="-")
const
"""
return _dballe.Level_format(self, *args)
__swig_getmethods__["cloud"] = lambda x: _dballe.Level_cloud
if _newclass:cloud = staticmethod(_dballe.Level_cloud)
__swig_getmethods__["ana"] = lambda x: _dballe.Level_ana
if _newclass:ana = staticmethod(_dballe.Level_ana)
__swig_destroy__ = _dballe.delete_Level
__del__ = lambda self : None;
Level_swigregister = _dballe.Level_swigregister
Level_swigregister(Level)
cvar = _dballe.cvar
MISSING_INT = cvar.MISSING_INT
def Level_cloud(*args):
return _dballe.Level_cloud(*args)
Level_cloud = _dballe.Level_cloud
def Level_ana():
return _dballe.Level_ana()
Level_ana = _dballe.Level_ana
class Trange(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Trange, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Trange, name)
__repr__ = _swig_repr
__swig_setmethods__["pind"] = _dballe.Trange_pind_set
__swig_getmethods__["pind"] = _dballe.Trange_pind_get
if _newclass:pind = _swig_property(_dballe.Trange_pind_get, _dballe.Trange_pind_set)
__swig_setmethods__["p1"] = _dballe.Trange_p1_set
__swig_getmethods__["p1"] = _dballe.Trange_p1_get
if _newclass:p1 = _swig_property(_dballe.Trange_p1_get, _dballe.Trange_p1_set)
__swig_setmethods__["p2"] = _dballe.Trange_p2_set
__swig_getmethods__["p2"] = _dballe.Trange_p2_get
if _newclass:p2 = _swig_property(_dballe.Trange_p2_get, _dballe.Trange_p2_set)
def __init__(self, *args):
"""
dballe::Trange::Trange(const char *pind, const char *p1=NULL, const
char *p2=NULL)
"""
this = _dballe.new_Trange(*args)
try: self.this.append(this)
except: self.this = this
def __eq__(self, *args): return _dballe.Trange___eq__(self, *args)
def __ne__(self, *args): return _dballe.Trange___ne__(self, *args)
def compare(self, *args):
"""
int
dballe::Trange::compare(const Trange &t) const
Compare two Trange strutures, for use in sorting.
-1 if *this < t, 0 if *this == t, 1 if *this > t
"""
return _dballe.Trange_compare(self, *args)
def describe(self):
"""
std::string
dballe::Trange::describe() const
Return a string description of this time range.
"""
return _dballe.Trange_describe(self)
def format(self, *args):
"""
void
dballe::Trange::format(std::ostream &out, const char *undef="-")
const
"""
return _dballe.Trange_format(self, *args)
__swig_getmethods__["instant"] = lambda x: _dballe.Trange_instant
if _newclass:instant = staticmethod(_dballe.Trange_instant)
__swig_getmethods__["ana"] = lambda x: _dballe.Trange_ana
if _newclass:ana = staticmethod(_dballe.Trange_ana)
__swig_destroy__ = _dballe.delete_Trange
__del__ = lambda self : None;
Trange_swigregister = _dballe.Trange_swigregister
Trange_swigregister(Trange)
def Trange_instant():
return _dballe.Trange_instant()
Trange_instant = _dballe.Trange_instant
def Trange_ana():
return _dballe.Trange_ana()
Trange_ana = _dballe.Trange_ana
class Subset(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Subset, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Subset, name)
__repr__ = _swig_repr
__swig_setmethods__["btable"] = _dballe.Subset_btable_set
__swig_getmethods__["btable"] = _dballe.Subset_btable_get
if _newclass:btable = _swig_property(_dballe.Subset_btable_get, _dballe.Subset_btable_set)
def __init__(self, *args):
this = _dballe.new_Subset(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _dballe.delete_Subset
__del__ = lambda self : None;
def store_variable(self, *args): return _dballe.Subset_store_variable(self, *args)
def store_variable_i(self, *args): return _dballe.Subset_store_variable_i(self, *args)
def store_variable_d(self, *args): return _dballe.Subset_store_variable_d(self, *args)
def store_variable_c(self, *args): return _dballe.Subset_store_variable_c(self, *args)
def store_variable_undef(self, *args): return _dballe.Subset_store_variable_undef(self, *args)
def append_dpb(self, *args): return _dballe.Subset_append_dpb(self, *args)
def append_fixed_dpb(self, *args): return _dballe.Subset_append_fixed_dpb(self, *args)
def _print(self, *args): return _dballe.Subset__print(self, *args)
def diff(self, *args): return _dballe.Subset_diff(self, *args)
Subset_swigregister = _dballe.Subset_swigregister
Subset_swigregister(Subset)
def __lshift__(*args):
return _dballe.__lshift__(*args)
__lshift__ = _dballe.__lshift__
class Bulletin(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Bulletin, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Bulletin, name)
def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_setmethods__["fname"] = _dballe.Bulletin_fname_set
__swig_getmethods__["fname"] = _dballe.Bulletin_fname_get
if _newclass:fname = _swig_property(_dballe.Bulletin_fname_get, _dballe.Bulletin_fname_set)
__swig_setmethods__["offset"] = _dballe.Bulletin_offset_set
__swig_getmethods__["offset"] = _dballe.Bulletin_offset_get
if _newclass:offset = _swig_property(_dballe.Bulletin_offset_get, _dballe.Bulletin_offset_set)
__swig_setmethods__["type"] = _dballe.Bulletin_type_set
__swig_getmethods__["type"] = _dballe.Bulletin_type_get
if _newclass:type = _swig_property(_dballe.Bulletin_type_get, _dballe.Bulletin_type_set)
__swig_setmethods__["subtype"] = _dballe.Bulletin_subtype_set
__swig_getmethods__["subtype"] = _dballe.Bulletin_subtype_get
if _newclass:subtype = _swig_property(_dballe.Bulletin_subtype_get, _dballe.Bulletin_subtype_set)
__swig_setmethods__["localsubtype"] = _dballe.Bulletin_localsubtype_set
__swig_getmethods__["localsubtype"] = _dballe.Bulletin_localsubtype_get
if _newclass:localsubtype = _swig_property(_dballe.Bulletin_localsubtype_get, _dballe.Bulletin_localsubtype_set)
__swig_setmethods__["edition"] = _dballe.Bulletin_edition_set
__swig_getmethods__["edition"] = _dballe.Bulletin_edition_get
if _newclass:edition = _swig_property(_dballe.Bulletin_edition_get, _dballe.Bulletin_edition_set)
__swig_setmethods__["master_table_number"] = _dballe.Bulletin_master_table_number_set
__swig_getmethods__["master_table_number"] = _dballe.Bulletin_master_table_number_get
if _newclass:master_table_number = _swig_property(_dballe.Bulletin_master_table_number_get, _dballe.Bulletin_master_table_number_set)
__swig_setmethods__["rep_year"] = _dballe.Bulletin_rep_year_set
__swig_getmethods__["rep_year"] = _dballe.Bulletin_rep_year_get
if _newclass:rep_year = _swig_property(_dballe.Bulletin_rep_year_get, _dballe.Bulletin_rep_year_set)
__swig_setmethods__["rep_month"] = _dballe.Bulletin_rep_month_set
__swig_getmethods__["rep_month"] = _dballe.Bulletin_rep_month_get
if _newclass:rep_month = _swig_property(_dballe.Bulletin_rep_month_get, _dballe.Bulletin_rep_month_set)
__swig_setmethods__["rep_day"] = _dballe.Bulletin_rep_day_set
__swig_getmethods__["rep_day"] = _dballe.Bulletin_rep_day_get
if _newclass:rep_day = _swig_property(_dballe.Bulletin_rep_day_get, _dballe.Bulletin_rep_day_set)
__swig_setmethods__["rep_hour"] = _dballe.Bulletin_rep_hour_set
__swig_getmethods__["rep_hour"] = _dballe.Bulletin_rep_hour_get
if _newclass:rep_hour = _swig_property(_dballe.Bulletin_rep_hour_get, _dballe.Bulletin_rep_hour_set)
__swig_setmethods__["rep_minute"] = _dballe.Bulletin_rep_minute_set
__swig_getmethods__["rep_minute"] = _dballe.Bulletin_rep_minute_get
if _newclass:rep_minute = _swig_property(_dballe.Bulletin_rep_minute_get, _dballe.Bulletin_rep_minute_set)
__swig_setmethods__["rep_second"] = _dballe.Bulletin_rep_second_set
__swig_getmethods__["rep_second"] = _dballe.Bulletin_rep_second_get
if _newclass:rep_second = _swig_property(_dballe.Bulletin_rep_second_get, _dballe.Bulletin_rep_second_set)
__swig_setmethods__["btable"] = _dballe.Bulletin_btable_set
__swig_getmethods__["btable"] = _dballe.Bulletin_btable_get
if _newclass:btable = _swig_property(_dballe.Bulletin_btable_get, _dballe.Bulletin_btable_set)
__swig_setmethods__["dtable"] = _dballe.Bulletin_dtable_set
__swig_getmethods__["dtable"] = _dballe.Bulletin_dtable_get
if _newclass:dtable = _swig_property(_dballe.Bulletin_dtable_get, _dballe.Bulletin_dtable_set)
__swig_setmethods__["datadesc"] = _dballe.Bulletin_datadesc_set
__swig_getmethods__["datadesc"] = _dballe.Bulletin_datadesc_get
if _newclass:datadesc = _swig_property(_dballe.Bulletin_datadesc_get, _dballe.Bulletin_datadesc_set)
__swig_setmethods__["subsets"] = _dballe.Bulletin_subsets_set
__swig_getmethods__["subsets"] = _dballe.Bulletin_subsets_get
if _newclass:subsets = _swig_property(_dballe.Bulletin_subsets_get, _dballe.Bulletin_subsets_set)
__swig_destroy__ = _dballe.delete_Bulletin
__del__ = lambda self : None;
def clear(self): return _dballe.Bulletin_clear(self)
def encoding_name(self): return _dballe.Bulletin_encoding_name(self)
def obtain_subset(self, *args): return _dballe.Bulletin_obtain_subset(self, *args)
def subset(self, *args): return _dballe.Bulletin_subset(self, *args)
def load_tables(self): return _dballe.Bulletin_load_tables(self)
def decode_header(self, *args): return _dballe.Bulletin_decode_header(self, *args)
def decode(self, *args): return _dballe.Bulletin_decode(self, *args)
def visit_datadesc(self, *args): return _dballe.Bulletin_visit_datadesc(self, *args)
def visit(self, *args): return _dballe.Bulletin_visit(self, *args)
def _print(self, *args): return _dballe.Bulletin__print(self, *args)
def print_structured(self, *args): return _dballe.Bulletin_print_structured(self, *args)
def print_details(self, *args): return _dballe.Bulletin_print_details(self, *args)
def print_datadesc(self, *args): return _dballe.Bulletin_print_datadesc(self, *args)
def diff(self, *args): return _dballe.Bulletin_diff(self, *args)
def diff_details(self, *args): return _dballe.Bulletin_diff_details(self, *args)
def datadesc_append(self, *args): return _dballe.Bulletin_datadesc_append(self, *args)
def encode(self, *args): return _dballe.Bulletin_encode(self, *args)
def subsets_clear(self): return _dballe.Bulletin_subsets_clear(self)
def subsets_size(self): return _dballe.Bulletin_subsets_size(self)
Bulletin_swigregister = _dballe.Bulletin_swigregister
Bulletin_swigregister(Bulletin)
class BufrCodecOptions(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, BufrCodecOptions, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, BufrCodecOptions, name)
__repr__ = _swig_repr
__swig_setmethods__["decode_adds_undef_attrs"] = _dballe.BufrCodecOptions_decode_adds_undef_attrs_set
__swig_getmethods__["decode_adds_undef_attrs"] = _dballe.BufrCodecOptions_decode_adds_undef_attrs_get
if _newclass:decode_adds_undef_attrs = _swig_property(_dballe.BufrCodecOptions_decode_adds_undef_attrs_get, _dballe.BufrCodecOptions_decode_adds_undef_attrs_set)
def __init__(self):
this = _dballe.new_BufrCodecOptions()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _dballe.delete_BufrCodecOptions
__del__ = lambda self : None;
BufrCodecOptions_swigregister = _dballe.BufrCodecOptions_swigregister
BufrCodecOptions_swigregister(BufrCodecOptions)
class BufrBulletin(Bulletin):
__swig_setmethods__ = {}
for _s in [Bulletin]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, BufrBulletin, name, value)
__swig_getmethods__ = {}
for _s in [Bulletin]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, BufrBulletin, name)
__repr__ = _swig_repr
__swig_setmethods__["centre"] = _dballe.BufrBulletin_centre_set
__swig_getmethods__["centre"] = _dballe.BufrBulletin_centre_get
if _newclass:centre = _swig_property(_dballe.BufrBulletin_centre_get, _dballe.BufrBulletin_centre_set)
__swig_setmethods__["subcentre"] = _dballe.BufrBulletin_subcentre_set
__swig_getmethods__["subcentre"] = _dballe.BufrBulletin_subcentre_get
if _newclass:subcentre = _swig_property(_dballe.BufrBulletin_subcentre_get, _dballe.BufrBulletin_subcentre_set)
__swig_setmethods__["master_table"] = _dballe.BufrBulletin_master_table_set
__swig_getmethods__["master_table"] = _dballe.BufrBulletin_master_table_get
if _newclass:master_table = _swig_property(_dballe.BufrBulletin_master_table_get, _dballe.BufrBulletin_master_table_set)
__swig_setmethods__["local_table"] = _dballe.BufrBulletin_local_table_set
__swig_getmethods__["local_table"] = _dballe.BufrBulletin_local_table_get
if _newclass:local_table = _swig_property(_dballe.BufrBulletin_local_table_get, _dballe.BufrBulletin_local_table_set)
__swig_setmethods__["compression"] = _dballe.BufrBulletin_compression_set
__swig_getmethods__["compression"] = _dballe.BufrBulletin_compression_get
if _newclass:compression = _swig_property(_dballe.BufrBulletin_compression_get, _dballe.BufrBulletin_compression_set)
__swig_setmethods__["update_sequence_number"] = _dballe.BufrBulletin_update_sequence_number_set
__swig_getmethods__["update_sequence_number"] = _dballe.BufrBulletin_update_sequence_number_get
if _newclass:update_sequence_number = _swig_property(_dballe.BufrBulletin_update_sequence_number_get, _dballe.BufrBulletin_update_sequence_number_set)
__swig_setmethods__["optional_section_length"] = _dballe.BufrBulletin_optional_section_length_set
__swig_getmethods__["optional_section_length"] = _dballe.BufrBulletin_optional_section_length_get
if _newclass:optional_section_length = _swig_property(_dballe.BufrBulletin_optional_section_length_get, _dballe.BufrBulletin_optional_section_length_set)
__swig_setmethods__["optional_section"] = _dballe.BufrBulletin_optional_section_set
__swig_getmethods__["optional_section"] = _dballe.BufrBulletin_optional_section_get
if _newclass:optional_section = _swig_property(_dballe.BufrBulletin_optional_section_get, _dballe.BufrBulletin_optional_section_set)
__swig_setmethods__["raw_details"] = _dballe.BufrBulletin_raw_details_set
__swig_getmethods__["raw_details"] = _dballe.BufrBulletin_raw_details_get
if _newclass:raw_details = _swig_property(_dballe.BufrBulletin_raw_details_get, _dballe.BufrBulletin_raw_details_set)
__swig_setmethods__["codec_options"] = _dballe.BufrBulletin_codec_options_set
__swig_getmethods__["codec_options"] = _dballe.BufrBulletin_codec_options_get
if _newclass:codec_options = _swig_property(_dballe.BufrBulletin_codec_options_get, _dballe.BufrBulletin_codec_options_set)
__swig_destroy__ = _dballe.delete_BufrBulletin
__del__ = lambda self : None;
def clear(self): return _dballe.BufrBulletin_clear(self)
def encoding_name(self): return _dballe.BufrBulletin_encoding_name(self)
def load_tables(self): return _dballe.BufrBulletin_load_tables(self)
def decode_header(self, *args): return _dballe.BufrBulletin_decode_header(self, *args)
def decode(self, *args): return _dballe.BufrBulletin_decode(self, *args)
def print_details(self, *args): return _dballe.BufrBulletin_print_details(self, *args)
def diff_details(self, *args): return _dballe.BufrBulletin_diff_details(self, *args)
def reset_raw_details(self, *args): return _dballe.BufrBulletin_reset_raw_details(self, *args)
__swig_getmethods__["read"] = lambda x: _dballe.BufrBulletin_read
if _newclass:read = staticmethod(_dballe.BufrBulletin_read)
__swig_getmethods__["write"] = lambda x: _dballe.BufrBulletin_write
if _newclass:write = staticmethod(_dballe.BufrBulletin_write)
def __init__(self):
this = _dballe.new_BufrBulletin()
try: self.this.append(this)
except: self.this = this
def encode(self, *args): return _dballe.BufrBulletin_encode(self, *args)
def subsets_clear(self): return _dballe.BufrBulletin_subsets_clear(self)
def subsets_size(self): return _dballe.BufrBulletin_subsets_size(self)
BufrBulletin_swigregister = _dballe.BufrBulletin_swigregister
BufrBulletin_swigregister(BufrBulletin)
def BufrBulletin_read(*args):
return _dballe.BufrBulletin_read(*args)
BufrBulletin_read = _dballe.BufrBulletin_read
def BufrBulletin_write(*args):
return _dballe.BufrBulletin_write(*args)
BufrBulletin_write = _dballe.BufrBulletin_write
class CrexBulletin(Bulletin):
__swig_setmethods__ = {}
for _s in [Bulletin]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, CrexBulletin, name, value)
__swig_getmethods__ = {}
for _s in [Bulletin]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, CrexBulletin, name)
__repr__ = _swig_repr
__swig_setmethods__["table"] = _dballe.CrexBulletin_table_set
__swig_getmethods__["table"] = _dballe.CrexBulletin_table_get
if _newclass:table = _swig_property(_dballe.CrexBulletin_table_get, _dballe.CrexBulletin_table_set)
__swig_setmethods__["has_check_digit"] = _dballe.CrexBulletin_has_check_digit_set
__swig_getmethods__["has_check_digit"] = _dballe.CrexBulletin_has_check_digit_get
if _newclass:has_check_digit = _swig_property(_dballe.CrexBulletin_has_check_digit_get, _dballe.CrexBulletin_has_check_digit_set)
def clear(self): return _dballe.CrexBulletin_clear(self)
def encoding_name(self): return _dballe.CrexBulletin_encoding_name(self)
def load_tables(self): return _dballe.CrexBulletin_load_tables(self)
def decode_header(self, *args): return _dballe.CrexBulletin_decode_header(self, *args)
def decode(self, *args): return _dballe.CrexBulletin_decode(self, *args)
def print_details(self, *args): return _dballe.CrexBulletin_print_details(self, *args)
def diff_details(self, *args): return _dballe.CrexBulletin_diff_details(self, *args)
__swig_getmethods__["read"] = lambda x: _dballe.CrexBulletin_read
if _newclass:read = staticmethod(_dballe.CrexBulletin_read)
__swig_getmethods__["write"] = lambda x: _dballe.CrexBulletin_write
if _newclass:write = staticmethod(_dballe.CrexBulletin_write)
def __init__(self):
this = _dballe.new_CrexBulletin()
try: self.this.append(this)
except: self.this = this
def encode(self, *args): return _dballe.CrexBulletin_encode(self, *args)
def subsets_clear(self): return _dballe.CrexBulletin_subsets_clear(self)
def subsets_size(self): return _dballe.CrexBulletin_subsets_size(self)
__swig_destroy__ = _dballe.delete_CrexBulletin
__del__ = lambda self : None;
CrexBulletin_swigregister = _dballe.CrexBulletin_swigregister
CrexBulletin_swigregister(CrexBulletin)
def CrexBulletin_read(*args):
return _dballe.CrexBulletin_read(*args)
CrexBulletin_read = _dballe.CrexBulletin_read
def CrexBulletin_write(*args):
return _dballe.CrexBulletin_write(*args)
CrexBulletin_write = _dballe.CrexBulletin_write
DBA_IMPORT_ATTRS = _dballe.DBA_IMPORT_ATTRS
DBA_IMPORT_FULL_PSEUDOANA = _dballe.DBA_IMPORT_FULL_PSEUDOANA
DBA_IMPORT_DATETIME_ATTRS = _dballe.DBA_IMPORT_DATETIME_ATTRS
DBA_IMPORT_OVERWRITE = _dballe.DBA_IMPORT_OVERWRITE
DBA_IMPORT_NO_TRANSACTIONS = _dballe.DBA_IMPORT_NO_TRANSACTIONS
DBA_DB_WANT_COORDS = _dballe.DBA_DB_WANT_COORDS
DBA_DB_WANT_IDENT = _dballe.DBA_DB_WANT_IDENT
DBA_DB_WANT_LEVEL = _dballe.DBA_DB_WANT_LEVEL
DBA_DB_WANT_TIMERANGE = _dballe.DBA_DB_WANT_TIMERANGE
DBA_DB_WANT_DATETIME = _dballe.DBA_DB_WANT_DATETIME
DBA_DB_WANT_VAR_NAME = _dballe.DBA_DB_WANT_VAR_NAME
DBA_DB_WANT_VAR_VALUE = _dballe.DBA_DB_WANT_VAR_VALUE
DBA_DB_WANT_REPCOD = _dballe.DBA_DB_WANT_REPCOD
DBA_DB_WANT_ANA_ID = _dballe.DBA_DB_WANT_ANA_ID
DBA_DB_WANT_CONTEXT_ID = _dballe.DBA_DB_WANT_CONTEXT_ID
DBA_DB_MODIFIER_BEST = _dballe.DBA_DB_MODIFIER_BEST
DBA_DB_MODIFIER_BIGANA = _dballe.DBA_DB_MODIFIER_BIGANA
DBA_DB_MODIFIER_DISTINCT = _dballe.DBA_DB_MODIFIER_DISTINCT
DBA_DB_MODIFIER_ANAEXTRA = _dballe.DBA_DB_MODIFIER_ANAEXTRA
DBA_DB_MODIFIER_NOANAEXTRA = _dballe.DBA_DB_MODIFIER_NOANAEXTRA
DBA_DB_MODIFIER_UNSORTED = _dballe.DBA_DB_MODIFIER_UNSORTED
DBA_DB_MODIFIER_STREAM = _dballe.DBA_DB_MODIFIER_STREAM
DBA_DB_MODIFIER_SORT_FOR_EXPORT = _dballe.DBA_DB_MODIFIER_SORT_FOR_EXPORT
class DB(_object):
"""
DB-ALLe database connection.
C++ includes: db.h
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, DB, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, DB, name)
__repr__ = _swig_repr
__swig_setmethods__["conn"] = _dballe.DB_conn_set
__swig_getmethods__["conn"] = _dballe.DB_conn_get
if _newclass:conn = _swig_property(_dballe.DB_conn_get, _dballe.DB_conn_set)
def __init__(self):
"""dballe::DB::DB() """
this = _dballe.new_DB()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _dballe.delete_DB
__del__ = lambda self : None;
def connect(self, *args):
"""
void
dballe::DB::connect(const char *dsn, const char *user, const char
*password)
Start a session with DB-All.e.
Parameters:
dsn: The ODBC DSN of the database to use
user: The user name to use to connect to the DSN
password: The password to use to connect to the DSN. To specify an
empty password, pass "" or NULL
Parameters:
db: The dba_db handle returned by the function
The error indicator for the function (See error::h)
"""
return _dballe.DB_connect(self, *args)
def connect_generic(self, *args):
"""
void
dballe::DB::connect_generic(const char *config)
Start a session with DB-All.e.
Parameters:
config: The string with the configuration to use to start the
connection. This is passed as is to SQLDriverConnect, so see ODBC
documentation for its format.
"""
return _dballe.DB_connect_generic(self, *args)
def connect_from_file(self, *args):
"""
void
dballe::DB::connect_from_file(const char *pathname)
Create from a SQLite file pathname.
Parameters:
pathname: The pathname to a SQLite file
"""
return _dballe.DB_connect_from_file(self, *args)
def connect_from_url(self, *args):
"""
void
dballe::DB::connect_from_url(const char *url)
Create from an url-like specification, that can be:
sqlite:[//]foo.sqlite odbc://[user[:pass]@]dsn test:[//]
Parameters:
url: The url-like connection descriptor
"""
return _dballe.DB_connect_from_url(self, *args)
def connect_test(self):
"""
void
dballe::DB::connect_test()
Start a test session with DB-All.e.
Take information from the environment ( See: dba_db_create_from_env)
and default to ./test.sqlite if nothing is specified.
"""
return _dballe.DB_connect_test(self)
__swig_getmethods__["is_url"] = lambda x: _dballe.DB_is_url
if _newclass:is_url = staticmethod(_dballe.DB_is_url)
def repinfo(self):
"""
db::Repinfo&
dballe::DB::repinfo()
Access the repinfo table.
"""
return _dballe.DB_repinfo(self)
def station(self):
"""
db::Station&
dballe::DB::station()
Access the station table.
"""
return _dballe.DB_station(self)
def context(self):
"""
db::Context&
dballe::DB::context()
Access the context table.
"""
return _dballe.DB_context(self)
def data(self):
"""
db::Data& dballe::DB::data()
Access the data table.
"""
return _dballe.DB_data(self)
def attr(self):
"""
db::Attr& dballe::DB::attr()
Access the data table.
"""
return _dballe.DB_attr(self)
def reset(self, repinfo_file = None):
"""
void
dballe::DB::reset(const char *repinfo_file=0)
Reset the database, removing all existing DBALLE tables and re-
creating them empty.
Parameters:
repinfo_file: The name of the CSV file with the report type
information data to load. The file is in CSV format with 6 columns:
report code, mnemonic id, description, priority, descriptor, table A
category. If repinfo_file is NULL, then the default of
/etc/dballe/repinfo.csv is used.
"""
return _dballe.DB_reset(self, repinfo_file)
def delete_tables(self):
"""
void
dballe::DB::delete_tables()
Delete all the DB-ALLe tables from the database.
"""
return _dballe.DB_delete_tables(self)
def update_repinfo(self, *args):
"""
void
dballe::DB::update_repinfo(const char *repinfo_file, int *added, int
*deleted, int *updated)
Update the repinfo table in the database, with the data found in the
given file.
Parameters:
repinfo_file: The name of the CSV file with the report type
information data to load. The file is in CSV format with 6 columns:
report code, mnemonic id, description, priority, descriptor, table A
category. If repinfo_file is NULL, then the default of
/etc/dballe/repinfo.csv is used.
Parameters:
added: The number of repinfo entryes that have been added
deleted: The number of repinfo entryes that have been deleted
updated: The number of repinfo entryes that have been updated
"""
return _dballe.DB_update_repinfo(self, *args)
def rep_cod_from_memo(self, *args):
"""
int
dballe::DB::rep_cod_from_memo(const char *memo)
Get the report code from a report mnemonic.
"""
return _dballe.DB_rep_cod_from_memo(self, *args)
def rep_memo_from_cod(self, *args):
"""
const
std::string& dballe::DB::rep_memo_from_cod(int rep_cod)
Get the report mnemonic from a report code.
"""
return _dballe.DB_rep_memo_from_cod(self, *args)
def check_rep_cod(self, *args):
"""
bool
dballe::DB::check_rep_cod(int rep_cod)
Verify that a rep_cod is supported by the database.
Parameters:
rep_cod: The report code to verify
true if the report code is supported, false if not
"""
return _dballe.DB_check_rep_cod(self, *args)
def last_station_insert_id(self):
"""
int
dballe::DB::last_station_insert_id()
Return the ID of the last inserted station.
"""
return _dballe.DB_last_station_insert_id(self)
def last_context_insert_id(self):
"""
int
dballe::DB::last_context_insert_id()
Return the ID of the last inserted context.
"""
return _dballe.DB_last_context_insert_id(self)
def get_rep_cod(self, *args):
"""
int
dballe::DB::get_rep_cod(Record &rec)
Get the report id from this record.
If rep_memo is specified instead, the corresponding report id is
queried in the database and set as "rep_cod" in the record.
"""
return _dballe.DB_get_rep_cod(self, *args)
def obtain_station(self, *args):
"""
int
dballe::DB::obtain_station(Record &rec, bool can_add=true)
"""
return _dballe.DB_obtain_station(self, *args)
def obtain_context(self, *args):
"""
int
dballe::DB::obtain_context(Record &rec)
"""
return _dballe.DB_obtain_context(self, *args)
def insert(self, *args):
"""
void
dballe::DB::insert(Record &rec, bool can_replace, bool
station_can_add)
Insert a record into the database.
In a record with the same phisical situation already exists, the
function fails.
ana_id and context_id will be set in the record at the end of this
function.
Parameters:
rec: The record to insert.
can_replace: If true, then existing data can be rewritten, else data
can only be added.
station_can_add: If true, then it is allowed to add new station
records to the database. Otherwise, data can be added only by reusing
existing ones.
"""
return _dballe.DB_insert(self, *args)
def remove(self, *args):
"""
void
dballe::DB::remove(const Record &rec)
Remove data from the database.
Parameters:
rec: The record with the query data (see technical specifications,
par. 1.6.4 "parameter output/input") to select the items to be
deleted
"""
return _dballe.DB_remove(self, *args)
def remove_orphans(self):
"""
void
dballe::DB::remove_orphans()
Remove orphan values from the database.
Orphan values are currently: context values for which no data exists
station values for which no context exists Depending on database
size, this routine can take a few minutes to execute.
"""
return _dballe.DB_remove_orphans(self)
def query_attrs(self, *args):
"""
unsigned
dballe::DB::query_attrs(int id_context, wreport::Varcode id_var, const
db::AttrList &qcs, Record &attrs)
Query attributes.
Parameters:
id_context: The database id of the context related to the attributes
to retrieve
id_var: The varcode of the variable related to the attributes to
retrieve. See vartable::h
qcs: The WMO codes of the QC values requested. If it is empty, then
all values are returned.
attrs: The Record that will hold the resulting attributes
Number of attributes returned in attrs
"""
return _dballe.DB_query_attrs(self, *args)
def attr_insert_or_replace(self, *args):
"""
void
dballe::DB::attr_insert_or_replace(int id_context, wreport::Varcode
id_var, const Record &attrs, bool can_replace)
Insert new attributes into the database.
Parameters:
id_context: The database id of the context related to the attributes
to insert
id_var: The varcode of the variable related to the attributes to add.
See vartable::h
attrs: The record with the attributes to be added
can_replace: If true, then existing data can be rewritten, else data
can only be added.
"""
return _dballe.DB_attr_insert_or_replace(self, *args)
def attr_insert(self, *args):
"""
void
dballe::DB::attr_insert(int id_context, wreport::Varcode id_var, const
Record &attrs)
Insert new attributes into the database.
If the same attribute exists for the same data, it is overwritten
Parameters:
id_context: The database id of the context related to the attributes
to insert
id_var: The varcode of the variable related to the attributes to add.
See vartable::h
attrs: The record with the attributes to be added
"""
return _dballe.DB_attr_insert(self, *args)
def attr_insert_new(self, *args):
"""
void
dballe::DB::attr_insert_new(int id_context, wreport::Varcode id_var,
const Record &attrs)
Insert new attributes into the database.
If the same attribute exists for the same data, the function fails.
Parameters:
id_context: The database id of the context related to the attributes
to insert
id_var: The varcode of the variable related to the attributes to add.
See vartable::h
attrs: The record with the attributes to be added
"""
return _dballe.DB_attr_insert_new(self, *args)
def attr_remove(self, *args):
"""
void
dballe::DB::attr_remove(int id_context, wreport::Varcode id_var, const
db::AttrList &qcs)
Delete QC data for the variable `var' in record `rec' (coming from a
previous dba_query)
Parameters:
id_context: The database id of the context related to the attributes
to remove
id_var: The varcode of the variable related to the attributes to
remove. See vartable::h
qcs: Array of WMO codes of the attributes to delete. If empty, all
attributes associated to id_data will be deleted.
"""
return _dballe.DB_attr_remove(self, *args)
def import_msg(self, *args):
"""
void
dballe::DB::import_msg(const Msg &msg, const char *repmemo, int flags)
Import a Msg message into the DB-All.e database.
Parameters:
db: The DB-All.e database to write the data into
msg: The Msg containing the data to import
repmemo: Report mnemonic to which imported data belong. If NULL is
passed, then it will be chosen automatically based on the message
type.
flags: Customise different aspects of the import process. It is a
bitmask of the various DBA_IMPORT_* macros.
"""
return _dballe.DB_import_msg(self, *args)
def import_msgs(self, *args):
"""
void
dballe::DB::import_msgs(const Msgs &msgs, const char *repmemo, int
flags)
Import Msgs messages into the DB-All.e database.
Parameters:
db: The DB-All.e database to write the data into
msgs: The Msgs containing the data to import
repmemo: Report mnemonic to which imported data belong. If NULL is
passed, then it will be chosen automatically based on the message
type.
flags: Customise different aspects of the import process. It is a
bitmask of the various DBA_IMPORT_* macros.
"""
return _dballe.DB_import_msgs(self, *args)
def export_msgs(self, *args):
"""
void
dballe::DB::export_msgs(const Record &query, MsgConsumer &cons)
Perform the query in `query', and return the results as a NULL-
terminated array of dba_msg.
Parameters:
query: The query to perform
cons: The MsgsConsumer that will handle the resulting messages
"""
return _dballe.DB_export_msgs(self, *args)
def dump(self, *args):
"""
void dballe::DB::dump(FILE
*out)
Dump the entire contents of the database to an output stream.
"""
return _dballe.DB_dump(self, *args)
def _query(self, *args): return _dballe.DB__query(self, *args)
def _query_stations(self, *args): return _dballe.DB__query_stations(self, *args)
def _query_data(self, *args): return _dballe.DB__query_data(self, *args)
def query(self, *args): return self._query(*args)
def query_stations(self, *args): return self._query_stations(*args)
def query_data(self, *args): return self._query_data(*args)
def query_station_summary(self, *args): return _dballe.DB_query_station_summary(self, *args)
def query_levels(self, *args): return _dballe.DB_query_levels(self, *args)
def query_tranges(self, *args): return _dballe.DB_query_tranges(self, *args)
def query_levels_tranges(self, *args): return _dballe.DB_query_levels_tranges(self, *args)
def query_datetimes(self, *args): return _dballe.DB_query_datetimes(self, *args)
def query_reports(self, *args): return _dballe.DB_query_reports(self, *args)
def query_idents(self, *args): return _dballe.DB_query_idents(self, *args)
def query_variable_types(self, *args): return _dballe.DB_query_variable_types(self, *args)
def export_results(self, *args): return _dballe.DB_export_results(self, *args)
def export_results_as_generic(self, *args): return _dballe.DB_export_results_as_generic(self, *args)
DB_swigregister = _dballe.DB_swigregister
DB_swigregister(DB)
def DB_is_url(*args):
return _dballe.DB_is_url(*args)
DB_is_url = _dballe.DB_is_url
class Cursor(_object):
"""
Structure used to build and execute a query, and to iterate through
the results.
C++ includes: cursor.h
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Cursor, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Cursor, name)
__repr__ = _swig_repr
__swig_setmethods__["db"] = _dballe.Cursor_db_set
__swig_getmethods__["db"] = _dballe.Cursor_db_get
if _newclass:db = _swig_property(_dballe.Cursor_db_get, _dballe.Cursor_db_set)
__swig_setmethods__["stm"] = _dballe.Cursor_stm_set
__swig_getmethods__["stm"] = _dballe.Cursor_stm_get
if _newclass:stm = _swig_property(_dballe.Cursor_stm_get, _dballe.Cursor_stm_set)
__swig_setmethods__["wanted"] = _dballe.Cursor_wanted_set
__swig_getmethods__["wanted"] = _dballe.Cursor_wanted_get
if _newclass:wanted = _swig_property(_dballe.Cursor_wanted_get, _dballe.Cursor_wanted_set)
__swig_setmethods__["modifiers"] = _dballe.Cursor_modifiers_set
__swig_getmethods__["modifiers"] = _dballe.Cursor_modifiers_get
if _newclass:modifiers = _swig_property(_dballe.Cursor_modifiers_get, _dballe.Cursor_modifiers_set)
__swig_setmethods__["from_wanted"] = _dballe.Cursor_from_wanted_set
__swig_getmethods__["from_wanted"] = _dballe.Cursor_from_wanted_get
if _newclass:from_wanted = _swig_property(_dballe.Cursor_from_wanted_get, _dballe.Cursor_from_wanted_set)
__swig_setmethods__["out_lat"] = _dballe.Cursor_out_lat_set
__swig_getmethods__["out_lat"] = _dballe.Cursor_out_lat_get
if _newclass:out_lat = _swig_property(_dballe.Cursor_out_lat_get, _dballe.Cursor_out_lat_set)
__swig_setmethods__["out_lon"] = _dballe.Cursor_out_lon_set
__swig_getmethods__["out_lon"] = _dballe.Cursor_out_lon_get
if _newclass:out_lon = _swig_property(_dballe.Cursor_out_lon_get, _dballe.Cursor_out_lon_set)
__swig_setmethods__["out_ident"] = _dballe.Cursor_out_ident_set
__swig_getmethods__["out_ident"] = _dballe.Cursor_out_ident_get
if _newclass:out_ident = _swig_property(_dballe.Cursor_out_ident_get, _dballe.Cursor_out_ident_set)
__swig_setmethods__["out_ident_ind"] = _dballe.Cursor_out_ident_ind_set
__swig_getmethods__["out_ident_ind"] = _dballe.Cursor_out_ident_ind_get
if _newclass:out_ident_ind = _swig_property(_dballe.Cursor_out_ident_ind_get, _dballe.Cursor_out_ident_ind_set)
__swig_setmethods__["out_ltype1"] = _dballe.Cursor_out_ltype1_set
__swig_getmethods__["out_ltype1"] = _dballe.Cursor_out_ltype1_get
if _newclass:out_ltype1 = _swig_property(_dballe.Cursor_out_ltype1_get, _dballe.Cursor_out_ltype1_set)
__swig_setmethods__["out_l1"] = _dballe.Cursor_out_l1_set
__swig_getmethods__["out_l1"] = _dballe.Cursor_out_l1_get
if _newclass:out_l1 = _swig_property(_dballe.Cursor_out_l1_get, _dballe.Cursor_out_l1_set)
__swig_setmethods__["out_ltype2"] = _dballe.Cursor_out_ltype2_set
__swig_getmethods__["out_ltype2"] = _dballe.Cursor_out_ltype2_get
if _newclass:out_ltype2 = _swig_property(_dballe.Cursor_out_ltype2_get, _dballe.Cursor_out_ltype2_set)
__swig_setmethods__["out_l2"] = _dballe.Cursor_out_l2_set
__swig_getmethods__["out_l2"] = _dballe.Cursor_out_l2_get
if _newclass:out_l2 = _swig_property(_dballe.Cursor_out_l2_get, _dballe.Cursor_out_l2_set)
__swig_setmethods__["out_pind"] = _dballe.Cursor_out_pind_set
__swig_getmethods__["out_pind"] = _dballe.Cursor_out_pind_get
if _newclass:out_pind = _swig_property(_dballe.Cursor_out_pind_get, _dballe.Cursor_out_pind_set)
__swig_setmethods__["out_p1"] = _dballe.Cursor_out_p1_set
__swig_getmethods__["out_p1"] = _dballe.Cursor_out_p1_get
if _newclass:out_p1 = _swig_property(_dballe.Cursor_out_p1_get, _dballe.Cursor_out_p1_set)
__swig_setmethods__["out_p2"] = _dballe.Cursor_out_p2_set
__swig_getmethods__["out_p2"] = _dballe.Cursor_out_p2_get
if _newclass:out_p2 = _swig_property(_dballe.Cursor_out_p2_get, _dballe.Cursor_out_p2_set)
__swig_setmethods__["out_varcode"] = _dballe.Cursor_out_varcode_set
__swig_getmethods__["out_varcode"] = _dballe.Cursor_out_varcode_get
if _newclass:out_varcode = _swig_property(_dballe.Cursor_out_varcode_get, _dballe.Cursor_out_varcode_set)
__swig_setmethods__["out_datetime"] = _dballe.Cursor_out_datetime_set
__swig_getmethods__["out_datetime"] = _dballe.Cursor_out_datetime_get
if _newclass:out_datetime = _swig_property(_dballe.Cursor_out_datetime_get, _dballe.Cursor_out_datetime_set)
__swig_setmethods__["out_value"] = _dballe.Cursor_out_value_set
__swig_getmethods__["out_value"] = _dballe.Cursor_out_value_get
if _newclass:out_value = _swig_property(_dballe.Cursor_out_value_get, _dballe.Cursor_out_value_set)
__swig_setmethods__["out_rep_cod"] = _dballe.Cursor_out_rep_cod_set
__swig_getmethods__["out_rep_cod"] = _dballe.Cursor_out_rep_cod_get
if _newclass:out_rep_cod = _swig_property(_dballe.Cursor_out_rep_cod_get, _dballe.Cursor_out_rep_cod_set)
__swig_setmethods__["out_ana_id"] = _dballe.Cursor_out_ana_id_set
__swig_getmethods__["out_ana_id"] = _dballe.Cursor_out_ana_id_get
if _newclass:out_ana_id = _swig_property(_dballe.Cursor_out_ana_id_get, _dballe.Cursor_out_ana_id_set)
__swig_setmethods__["out_context_id"] = _dballe.Cursor_out_context_id_set
__swig_getmethods__["out_context_id"] = _dballe.Cursor_out_context_id_get
if _newclass:out_context_id = _swig_property(_dballe.Cursor_out_context_id_get, _dballe.Cursor_out_context_id_set)
__swig_setmethods__["out_priority"] = _dballe.Cursor_out_priority_set
__swig_getmethods__["out_priority"] = _dballe.Cursor_out_priority_get
if _newclass:out_priority = _swig_property(_dballe.Cursor_out_priority_get, _dballe.Cursor_out_priority_set)
__swig_setmethods__["count"] = _dballe.Cursor_count_set
__swig_getmethods__["count"] = _dballe.Cursor_count_get
if _newclass:count = _swig_property(_dballe.Cursor_count_get, _dballe.Cursor_count_set)
def __init__(self, *args):
"""dballe::db::Cursor::Cursor(DB &db) """
this = _dballe.new_Cursor(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _dballe.delete_Cursor
__del__ = lambda self : None;
def query(self, *args):
"""
int
dballe::db::Cursor::query(const Record &query, unsigned int wanted,
unsigned int modifiers)
Create and execute a database query.
The results are retrieved by iterating the cursor.
Parameters:
query: The record with the query data (see technical specifications,
par. 1.6.4 "parameter output/input"
wanted: The values wanted in output
modifiers: Optional modifiers to ask for special query behaviours
The count of items in the results
"""
return _dballe.Cursor_query(self, *args)
def remaining(self):
"""
int
dballe::db::Cursor::remaining() const
Get the number of rows still to be fetched.
The number of rows still to be queried. The value is undefined if no
query has been successfully peformed yet using this cursor.
"""
return _dballe.Cursor_remaining(self)
def next(self):
"""
bool
dballe::db::Cursor::next()
Get a new item from the results of a query.
true if a new record has been read, false if there is no more data to
read
"""
return _dballe.Cursor_next(self)
def discard_rest(self):
"""
void
dballe::db::Cursor::discard_rest()
Discard the results that have not been read yet.
"""
return _dballe.Cursor_discard_rest(self)
def to_record(self, *args):
"""
void
dballe::db::Cursor::to_record(Record &rec)
Fill in a record with the contents of a dba_db_cursor.
Parameters:
rec: The record where to store the values
"""
return _dballe.Cursor_to_record(self, *args)
def query_attrs(self, *args):
"""
unsigned
dballe::db::Cursor::query_attrs(const AttrList &qcs, Record &attrs)
Query attributes for the current variable.
"""
return _dballe.Cursor_query_attrs(self, *args)
def __iter__(self):
record = Record()
while self.next():
self.to_record(record)
yield record
def attributes(self, *args):
"""
Read the attributes for the variable pointed by this record.
If a rec argument is provided, it will write the
attributes in that record and return the number of
attributes read. If rec is None, it will return a
tuple (Record, count) with a newly created Record.
"""
if len(args) == 0:
# attributes()
rec = Record()
count = self.attributes_orig(rec)
return rec, count
elif len(args) == 1:
if isinstance(args[0], Record):
# attributes(rec)
return self.attributes_orig(args[0])
else:
# attributes(seq)
rec = Record()
count = self.attributes_orig(args[0], rec)
return rec, count
elif len(args) == 2:
# attributes(seq, rec)
return self.attributes_orig(args[0], args[1])
Cursor_swigregister = _dballe.Cursor_swigregister
Cursor_swigregister(Cursor)
# This file is compatible with both classic and new-style classes.
|