Changeset 1456:5289afbdb720 in lemon0.x for lemon
 Timestamp:
 06/09/05 11:46:34 (15 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1936
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/maps.h
r1439 r1456 147 147 148 148 public: 149 ///\e 149 150 typedef K Key; 151 ///\e 150 152 typedef T Value; 153 ///\e 151 154 typedef T& Reference; 155 ///\e 152 156 typedef const T& ConstReference; 153 157 … … 227 231 typedef True NeedCopy; 228 232 233 ///\e 229 234 typedef typename M::Key Key; 235 ///\e 230 236 typedef T Value; 231 237 … … 272 278 typedef True NeedCopy; 273 279 280 ///\e 274 281 typedef typename M1::Key Key; 282 ///\e 275 283 typedef typename M1::Value Value; 276 284 … … 319 327 320 328 typedef True NeedCopy; 329 ///\e 321 330 typedef typename M::Key Key; 331 ///\e 322 332 typedef typename M::Value Value; 323 333 … … 357 367 358 368 typedef True NeedCopy; 369 ///\e 359 370 typedef typename M1::Key Key; 371 ///\e 360 372 typedef typename M1::Value Value; 361 373 … … 395 407 396 408 typedef True NeedCopy; 409 ///\e 397 410 typedef typename M1::Key Key; 411 ///\e 398 412 typedef typename M1::Value Value; 399 413 … … 439 453 440 454 typedef True NeedCopy; 455 ///\e 441 456 typedef typename M::Key Key; 457 ///\e 442 458 typedef typename M::Value Value; 443 459 … … 477 493 478 494 typedef True NeedCopy; 495 ///\e 479 496 typedef typename M1::Key Key; 497 ///\e 480 498 typedef typename M1::Value Value; 481 499 … … 523 541 524 542 typedef True NeedCopy; 543 ///\e 525 544 typedef typename M2::Key Key; 545 ///\e 526 546 typedef typename M1::Value Value; 527 547 … … 576 596 577 597 typedef True NeedCopy; 598 ///\e 578 599 typedef typename M1::Key Key; 600 ///\e 579 601 typedef V Value; 580 602 … … 625 647 626 648 typedef True NeedCopy; 649 ///\e 627 650 typedef typename M::Key Key; 651 ///\e 628 652 typedef typename M::Value Value; 629 653 … … 677 701 678 702 typedef True NeedCopy; 703 ///\e 679 704 typedef typename M::Key Key; 705 ///\e 680 706 typedef typename M::Value Value; 681 707 … … 718 744 719 745 typedef True NeedCopy; 746 ///\e 720 747 typedef K Key; 748 ///\e 721 749 typedef V Value; 722 750 … … 757 785 758 786 typedef True NeedCopy; 787 ///\e 759 788 typedef typename M::Key argument_type; 789 ///\e 760 790 typedef typename M::Value result_type; 791 ///\e 761 792 typedef typename M::Key Key; 793 ///\e 762 794 typedef typename M::Value Value; 763 795 … … 807 839 808 840 typedef True NeedCopy; 841 ///\e 809 842 typedef typename M1::Key Key; 843 ///\e 810 844 typedef typename M1::Value Value; 811 845 … … 832 866 } 833 867 868 869 870 /* ************* BOOL MAPS ******************* */ 871 872 ///Logical 'not' of a map 873 874 ///This bool \ref concept::ReadMap "read only map" returns the 875 ///logical negation of 876 ///value returned by the 877 ///given map. Its \c Key and will be inherited from \c M, 878 ///its Value is <tt>bool</tt>. 879 880 template<class M> 881 class NotMap 882 { 883 typename SmartConstReference<M>::Type m; 884 public: 885 886 typedef True NeedCopy; 887 ///\e 888 typedef typename M::Key Key; 889 ///\e 890 typedef bool Value; 891 892 ///Constructor 893 894 ///\e 895 /// 896 NotMap(const M &_m) : m(_m) {}; 897 Value operator[](Key k) const {return !m[k];} 898 }; 899 900 ///Returns a \ref NotMap class 901 902 ///This function just returns a \ref NotMap class. 903 ///\relates NotMap 904 template<class M> 905 inline NotMap<M> notMap(const M &m) 906 { 907 return NotMap<M>(m); 908 } 909 910 911 912 913 914 915 916 917 918 919 834 920 /// @} 835 836 921 } 837 922 838 839 923 #endif // LEMON_MAPS_H
Note: See TracChangeset
for help on using the changeset viewer.