![]() |
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_DELIVERERRECEPTACLEREGISTRY_HPP 00014 #define WNS_LDK_DELIVERERRECEPTACLEREGISTRY_HPP 00015 00016 #include <WNS/ldk/IDelivererReceptacle.hpp> 00017 00018 #include <WNS/container/Registry.hpp> 00019 00020 #include <string> 00021 00022 namespace wns { namespace ldk { 00023 00024 class DelivererReceptacleRegistry 00025 { 00026 public: 00027 DelivererReceptacleRegistry() 00028 : theRegistry_() 00029 {} 00030 00031 DelivererReceptacleRegistry(const DelivererReceptacleRegistry&) 00032 : theRegistry_() 00033 {} 00034 00035 virtual 00036 ~DelivererReceptacleRegistry() 00037 {} 00038 00039 IDelivererReceptacle* 00040 getFromDelivererReceptacleRegistry(std::string portname) const 00041 { 00042 return theRegistry_.find(portname); 00043 } 00044 00045 std::list<std::string> 00046 getKeysFromDelivererReceptacleRegistry() const 00047 { 00048 return theRegistry_.keys(); 00049 } 00050 00051 protected: 00052 void 00053 updateDelivererReceptacleRegistry(const std::string portname, IDelivererReceptacle* cr) 00054 { 00055 theRegistry_.update(portname, cr); 00056 } 00057 00058 void 00059 addToDelivererReceptacleRegistry(std::string portname, IDelivererReceptacle* cr) 00060 { 00061 theRegistry_.insert(portname, cr); 00062 } 00063 00064 private: 00065 container::Registry<std::string, IDelivererReceptacle*> theRegistry_; 00066 }; 00067 } // ldk 00068 } // wns 00069 00070 #endif // WNS_LDK_DELIVERERRECEPTACLEREGISTRY_HPP
1.5.5