00001 // $Id: EUI64Parser.hh 1755 2011-01-05 14:54:24Z tho $ 00002 // 00003 // Copyright (C) 2010 00004 // Fraunhofer (FOKUS) 00005 // Competence Center NETwork research (NET), St. Augustin, GERMANY 00006 // Thorsten Horstmann <tho@berlios.de> 00007 // 00008 // This program is free software; you can redistribute it and/or modify 00009 // it under the terms of the GNU General Public License as published by 00010 // the Free Software Foundation; either version 2 of the License, or 00011 // (at your option) any later version. 00012 // 00013 // This program is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 // GNU General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU General Public License 00019 // along with this program; if not, write to the 00020 // Free Software Foundation, Inc., 00021 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 00026 #ifndef HH_SENF_Packets_DefaultBundle_EUI64Parser_ 00027 #define HH_SENF_Packets_DefaultBundle_EUI64Parser_ 1 00028 00029 // Custom includes 00030 #include <senf/Packets.hh> 00031 #include <senf/Socket/Protocols/Raw/EUI64.hh> 00032 00034 namespace senf { 00035 00042 struct EUI64Parser 00043 : public ValueParserBase<EUI64Parser, EUI64, 8u> 00044 { 00045 EUI64Parser(data_iterator i, state_type s) : Base(i,s) {} 00046 00047 value_type value() const { return value_type::from_data(i()); } 00048 void value(value_type const & v) { std::copy(v.begin(), v.end(), i()); } 00049 00050 using Base::operator=; 00051 }; 00052 00053 } 00054 //-///////////////////////////////////////////////////////////////////////////////////////////////// 00055 //#include "EUI64Parser.cci" 00056 //#include "EUI64Parser.ct" 00057 //#include "EUI64Parser.cti" 00058 #endif