Wiselib
|
00001 // vim: set noexpandtab ts=4 sw=4: 00002 00003 #ifndef IPHONE_FACET_PROVIDER_H 00004 #define IPHONE_FACET_PROVIDER_H 00005 00006 #include "external_interface/facet_provider.h" 00007 #include "external_interface/iphone/iphone_os_model.h" 00008 00009 namespace wiselib { 00010 template<typename Facet_P> 00011 class FacetProvider<iPhoneOsModel, Facet_P> { 00012 public: 00013 typedef iPhoneOsModel OsModel; 00014 typedef Facet_P Facet; 00015 00016 static Facet& get_facet(typename OsModel::System& system) { 00017 if(!facet_) { 00018 facet_ = new Facet(system); 00019 } 00020 return *facet_; 00021 } 00022 00023 private: 00024 static Facet *facet_; 00025 }; 00026 00027 template<typename Facet_P> 00028 typename FacetProvider<iPhoneOsModel, Facet_P>::Facet* FacetProvider<iPhoneOsModel, Facet_P>::facet_ = 0; 00029 } 00030 00031 #endif // IPHONE_FACET_PROVIDER_H