00001 /* categoryList.h 00002 */ 00003 #ifndef _CATEGORYLIST_H 00004 #define _CATEGORYLIST_H 00005 00006 #include "osl/category/categoryConcept.h" 00007 00008 namespace osl 00009 { 00010 namespace category 00011 { 00012 class NullCategory{}; 00013 00014 template <class L,class R> 00015 struct CategoryList; 00016 00017 template <class T> 00018 struct IsCategoryList 00019 { 00020 static const bool isCategoryList=false; 00021 }; 00022 template<> 00023 struct IsCategoryList<NullCategory> 00024 { 00025 static const bool isCategoryList=true; 00026 }; 00027 template<class L, class R> 00028 struct IsCategoryList<CategoryList<L,R> >{ 00029 static const bool isCategoryList=true; 00030 }; 00031 00037 template <class L, class R=NullCategory> 00038 struct CategoryList 00039 { 00040 BOOST_CLASS_REQUIRE(L,osl::category,CategoryConcept); 00041 BOOST_STATIC_ASSERT(category::IsCategoryList<R>::isCategoryList); 00042 }; 00043 } // namespace category 00044 using category::CategoryList; 00045 using category::NullCategory; 00046 00047 } // namespace osl 00048 00049 00050 #endif /* _CATEGORYLIST_H */ 00051 // ;;; Local Variables: 00052 // ;;; mode:c++ 00053 // ;;; c-basic-offset:2 00054 // ;;; End: