From: Foster B. <fos...@us...> - 2006-02-03 18:21:21
|
Update of /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/documentation/sources/examples Modified Files: enum_ops_example.cpp enum_ops_example_fail.cpp namespace.cpp namespace_fail.cpp specialization.cpp Log Message: asl 1.0.13 Index: enum_ops_example_fail.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/examples/enum_ops_example_fail.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** enum_ops_example_fail.cpp 6 Oct 2005 20:43:16 -0000 1.1 --- enum_ops_example_fail.cpp 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2001 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2001 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 27,46 **** enum Foo ! { ! foo_4 = 1 << 2, ! foo_8 = 1 << 3 ! }; enum Bar ! { ! bar_4 = 1 << 2, ! bar_8 = 1 << 3 ! }; enum Baz ! { ! baz_4 = 1 << 2, ! baz_8 = 1 << 3 ! }; ADOBE_DEFINE_ARITHMETIC_OPS(Baz) --- 27,46 ---- enum Foo ! { ! foo_4 = 1 << 2, ! foo_8 = 1 << 3 ! }; enum Bar ! { ! bar_4 = 1 << 2, ! bar_8 = 1 << 3 ! }; enum Baz ! { ! baz_4 = 1 << 2, ! baz_8 = 1 << 3 ! }; ADOBE_DEFINE_ARITHMETIC_OPS(Baz) *************** *** 49,66 **** int main() ! { ! Foo a(foo_4); ! Bar b(bar_8); ! Foo c(a + b); // error! a and b are different enum types, so result is integral ! Baz d(baz_4); ! Baz e(baz_8); ! Baz f(d + e); // Ok, ADOBE_DEFINE_ARITHMETIC_OPS(Baz) is defined, so d + e has type Baz ! BOOST_TEST(c); ! BOOST_TEST(f); ! return boost::report_errors(); ! } // end_of_example --- 49,66 ---- int main() ! { ! Foo a(foo_4); ! Bar b(bar_8); ! Foo c(a + b); // error! a and b are different enum types, so result is integral ! Baz d(baz_4); ! Baz e(baz_8); ! Baz f(d + e); // Ok, ADOBE_DEFINE_ARITHMETIC_OPS(Baz) is defined, so d + e has type Baz ! BOOST_TEST(c); ! BOOST_TEST(f); ! return boost::report_errors(); ! } // end_of_example Index: enum_ops_example.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/examples/enum_ops_example.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** enum_ops_example.cpp 6 Oct 2005 20:43:16 -0000 1.1 --- enum_ops_example.cpp 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2001 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2001 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 27,49 **** enum Foo ! { ! foo_4 = 1 << 2, ! foo_8 = 1 << 3 ! }; ADOBE_DEFINE_BITSET_OPS(Foo) int main() ! { ! Foo a(foo_4); ! Foo b(foo_8); ! Foo c(a | b); ! BOOST_TEST(a == 4L); ! BOOST_TEST(b == 8L); ! BOOST_TEST(c == 12L); ! return boost::report_errors(); ! } // end_of_example --- 27,49 ---- enum Foo ! { ! foo_4 = 1 << 2, ! foo_8 = 1 << 3 ! }; ADOBE_DEFINE_BITSET_OPS(Foo) int main() ! { ! Foo a(foo_4); ! Foo b(foo_8); ! Foo c(a | b); ! BOOST_TEST(a == 4L); ! BOOST_TEST(b == 8L); ! BOOST_TEST(c == 12L); ! return boost::report_errors(); ! } // end_of_example Index: specialization.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/examples/specialization.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** specialization.cpp 3 May 2005 23:50:24 -0000 1.1 --- specialization.cpp 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2004 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2004 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 38,42 **** // ... }; ! } // my_namespace --- 38,42 ---- // ... }; ! } // my_namespace *************** *** 46,50 **** my_namespace::my_iterator std::find(my_namespace::my_iterator, my_namespace::my_iterator) { ! // do special find } --- 46,50 ---- my_namespace::my_iterator std::find(my_namespace::my_iterator, my_namespace::my_iterator) { ! // do special find } *************** *** 54,65 **** struct ptr_traits<my_namespace::my_class> { ! typedef my_namespace::my_class element_type; ! typedef element_type* pointer_type; ! typedef const element_type* const_pointer_type ! ! template <class U> struct rebind { typedef adobe::ptr_traits<U> other; }; ! enum { is_array = false }; ! ! static void delete_ptr(pointer_type x) throw() { delete x; } }; --- 54,65 ---- struct ptr_traits<my_namespace::my_class> { ! typedef my_namespace::my_class element_type; ! typedef element_type* pointer_type; ! typedef const element_type* const_pointer_type ! ! template <class U> struct rebind { typedef adobe::ptr_traits<U> other; }; ! enum { is_array = false }; ! ! static void delete_ptr(pointer_type x) throw() { delete x; } }; Index: namespace.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/examples/namespace.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** namespace.cpp 3 May 2005 23:50:24 -0000 1.1 --- namespace.cpp 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2004 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2004 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 31,37 **** // Correct usage of namespace qualifiers ! adobe::forest<int> my_forest; ! ! adobe::find(my_forest, 5); } --- 31,37 ---- // Correct usage of namespace qualifiers ! adobe::forest<int> my_forest; ! ! adobe::find(my_forest, 5); } *************** *** 41,49 **** // Accepted usage of namespace qualifiers ! namespace asl = adobe; ! ! asl::forest<int> my_forest; ! ! asl::find(my_forest, 5); } --- 41,49 ---- // Accepted usage of namespace qualifiers ! namespace asl = adobe; ! ! asl::forest<int> my_forest; ! ! asl::find(my_forest, 5); } *************** *** 53,62 **** // This works - but is not recommended ! using namespace std; ! ! bool my_predicate(int); ! adobe::forest<int> my_forest; ! ! find_if(my_forest.begin(), my_forest.end(), &my_predicate); // calls std::find_if() } --- 53,62 ---- // This works - but is not recommended ! using namespace std; ! ! bool my_predicate(int); ! adobe::forest<int> my_forest; ! ! find_if(my_forest.begin(), my_forest.end(), &my_predicate); // calls std::find_if() } Index: namespace_fail.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/examples/namespace_fail.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** namespace_fail.cpp 3 May 2005 23:50:24 -0000 1.1 --- namespace_fail.cpp 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2004 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2004 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 32,41 **** // This results in an ambiguity and won't compile ! using namespace adobe; ! ! bool my_predicate(int); ! std::vector<int> my_vector; ! ! find_if(my_vector.begin(), my_vector.end(), &my_predicate); // adobe or std? } --- 32,41 ---- // This results in an ambiguity and won't compile ! using namespace adobe; ! ! bool my_predicate(int); ! std::vector<int> my_vector; ! ! find_if(my_vector.begin(), my_vector.end(), &my_predicate); // adobe or std? } |