![]() |
User Manual, Developers Guide and API Documentation |
![]() |
00001 /****************************************************************************** 00002 * WNS (Wireless Network Simulator) * 00003 * __________________________________________________________________________ * 00004 * * 00005 * Copyright (C) 2004-2008 * 00006 * Chair of Communication Networks (ComNets) * 00007 * Kopernikusstr. 1, D-52074 Aachen, Germany * 00008 * phone: ++49-241-80-27910 (phone), fax: ++49-241-80-22242 * 00009 * email: wns@comnets.rwth-aachen.de * 00010 * www: http://wns.comnets.rwth-aachen.de * 00011 ******************************************************************************/ 00012 00013 #ifndef WNS_LDK_SINGLECONNECTION_HPP 00014 #define WNS_LDK_SINGLECONNECTION_HPP 00015 00016 #include <WNS/ldk/HasConnector.hpp> 00017 #include <WNS/ldk/SingleConnector.hpp> 00018 00019 namespace wns { namespace ldk { 00020 00025 namespace hasconnector 00026 { 00031 typedef SingleConnector DefaultConnectorStrategy; 00032 } // hasconnector 00033 00034 template <typename T = hasconnector::DefaultConnectorStrategy> 00035 class SingleConnection 00036 : public HasConnector 00037 { 00038 public: 00039 typedef T ConnectorType; 00040 00041 SingleConnection() : 00042 HasConnector(), 00043 lower_() 00044 { 00045 } 00046 00047 virtual 00048 ~SingleConnection() 00049 { 00050 } 00051 00052 template <> 00053 ConnectorInterface* 00054 getConnector<>() const 00055 { 00056 return &lower_; 00057 } 00058 00059 private: 00060 ConnectorType lower_; 00061 00062 }; 00063 00064 } //ldk 00065 } //wns 00066 00067 #endif // NOT defined WNS_LDK_SINGLECONNECTION_HPP 00068
1.5.5