switch to new MPL based Fraunhofer FOKUS Public License
[senf.git] / senf / Packets / 80221Bundle / MIHTypes.hh
index 64ae62b..32c71c3 100644 (file)
@@ -2,23 +2,28 @@
 //
 // Copyright (C) 2009
 // Fraunhofer Institute for Open Communication Systems (FOKUS)
-// Competence Center NETwork research (NET), St. Augustin, GERMANY
-//     Thorsten Horstmann <tho@berlios.de>
 //
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
+// The contents of this file are subject to the Fraunhofer FOKUS Public License
+// Version 1.0 (the "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at 
+// http://senf.berlios.de/license.html
 //
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
+// The Fraunhofer FOKUS Public License Version 1.0 is based on, 
+// but modifies the Mozilla Public License Version 1.1.
+// See the full license text for the amendments.
 //
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the
-// Free Software Foundation, Inc.,
-// 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+// Software distributed under the License is distributed on an "AS IS" basis, 
+// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
+// for the specific language governing rights and limitations under the License.
+//
+// The Original Code is Fraunhofer FOKUS code.
+//
+// The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V. 
+// (registered association), Hansastraße 27 c, 80686 Munich, Germany.
+// All Rights Reserved.
+//
+// Contributor(s):
+//   Thorsten Horstmann <tho@berlios.de>
 
 /** \file
     \brief MIHTypes public header */
 #include <boost/variant.hpp>
 
 //#include "MIHTypes.mpp"
-///////////////////////////////hh.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 
 namespace senf {
 
-    class MIHFId 
-        : public boost::variant< boost::blank, senf::MACAddress, senf::INet4Address, 
+    class MIHFId
+        : public boost::variant< boost::blank, senf::MACAddress, senf::INet4Address,
                 senf::INet6Address, std::string, senf::EUI64 >,
           public boost::less_than_comparable<MIHFId>,
           public boost::equality_comparable<MIHFId>
     {
     public:
         static MIHFId const Multicast; ///< The multicast (empty) MIHF Id
-        static MIHFId const None; ///< The multicast (empty) MIHF Id
-        enum Type { Empty, MACAddress, INet4Address, INet6Address, String, EUI64 };
-      
-        MIHFId();                                   ///< Create empty instance.
-        MIHFId(senf::MACAddress const & addr);      ///< Construct id with given MACAddress 
+        enum Type { MulticastType, MACAddress, INet4Address, INet6Address, String, EUI64 };
+
+        MIHFId();                                   ///< Create multicast id.
+        MIHFId(senf::MACAddress const & addr);      ///< Construct id with given MACAddress
         MIHFId(senf::INet4Address const & addr);    ///< Construct id with given INet4Address
         MIHFId(senf::INet6Address const & addr);    ///< Construct id with given INet6Address
         MIHFId(std::string const & addr);           ///< Construct id with given String
         MIHFId(senf::EUI64 const & addr);           ///< Construct id with given EUI64
-        
+
         Type type() const;
         bool operator==(MIHFId const & other) const;
-        bool operator<(MIHFId const & other) const; 
-        
+        bool operator<(MIHFId const & other) const;
+
     private:
         struct GetTypeVisitor : public boost::static_visitor<Type> {
-            Type operator()(boost::blank const &) const { return Empty; }
+            Type operator()(boost::blank const &) const { return MulticastType; }
             Type operator()(senf::MACAddress const &) const { return MACAddress; }
             Type operator()(senf::INet4Address const &) const { return INet4Address; }
             Type operator()(senf::INet6Address const &) const { return INet6Address; }
@@ -94,7 +98,7 @@ namespace senf {
 
 }
 
-///////////////////////////////hh.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 #include "MIHTypes.cci"
 //#include "MIHTypes.ct"
 //#include "MIHTypes.cti"