switch to new MPL based Fraunhofer FOKUS Public License
[senf.git] / senf / PPI / Connectors.cc
index 485312d..90c593c 100644 (file)
@@ -2,23 +2,28 @@
 //
 // Copyright (C) 2007
 // Fraunhofer Institute for Open Communication Systems (FOKUS)
-// Competence Center NETwork research (NET), St. Augustin, GERMANY
-//     Stefan Bund <g0dil@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):
+//   Stefan Bund <g0dil@berlios.de>
 
 /** \file
     \brief Connectors non-inline non-template implementation */
 #include "Connectors.ih"
 
 // Custom includes
-#include "Route.hh"
-#include "Module.hh"
 #include "ModuleManager.hh"
-#include <senf/Utils/Console/Console.hh>
+#include <senf/Utils/Console/ParsedCommand.hh>
 
 //#include "Connectors.mpp"
 #define prefix_
-///////////////////////////////cc.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::ppi::connector::Connector
 
 prefix_ senf::ppi::connector::Connector::~Connector()
@@ -68,6 +71,7 @@ prefix_ void senf::ppi::connector::Connector::connect(Connector & target)
     SENF_ASSERT( ! target.peer_,
                  "senf::ppi::connector::Connector::connect(): (target) "
                  "duplicate connection" );
+
     if (! (packetTypeID() == typeid(void) ||
            target.packetTypeID() == typeid(void) ||
            packetTypeID() == target.packetTypeID()) )
@@ -222,7 +226,7 @@ prefix_ void senf::ppi::connector::Connector::v_disconnected()
 prefix_ void senf::ppi::connector::Connector::v_connected()
 {}
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::ppi::connector::PassiveConnector
 
 prefix_ senf::ppi::connector::PassiveConnector::~PassiveConnector()
@@ -243,7 +247,7 @@ prefix_ void senf::ppi::connector::PassiveConnector::v_connected()
     peer_ = & dynamic_cast<ActiveConnector&>(Connector::peer());
 }
 
-////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // private members
 
 prefix_ void senf::ppi::connector::PassiveConnector::v_init()
@@ -287,7 +291,7 @@ prefix_ void senf::ppi::connector::PassiveConnector::notifyUnthrottle()
         SENF_PPI_THROTTLE_TRACE("OUT", "not forwarding unthrottle event");
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::ppi::connector::ActiveConnector
 
 prefix_ senf::ppi::connector::ActiveConnector::~ActiveConnector()
@@ -308,7 +312,7 @@ prefix_ void senf::ppi::connector::ActiveConnector::v_connected()
     peer_ = & dynamic_cast<PassiveConnector&>(Connector::peer());
 }
 
-////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // private members
 
 prefix_ void senf::ppi::connector::ActiveConnector::v_init()
@@ -357,7 +361,7 @@ prefix_ void senf::ppi::connector::ActiveConnector::unregisterRoute(ForwardingRo
         notifyRoutes_.erase(i);
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::ppi::connector::InputConnector
 
 prefix_ senf::Packet senf::ppi::connector::InputConnector::operator()()
@@ -388,7 +392,7 @@ prefix_ void senf::ppi::connector::InputConnector::v_connected()
     peer_ = & dynamic_cast<OutputConnector&>(Connector::peer());
 }
 
-////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // private members
 
 prefix_ void senf::ppi::connector::InputConnector::v_requestEvent()
@@ -400,7 +404,7 @@ prefix_ void senf::ppi::connector::InputConnector::v_enqueueEvent()
 prefix_ void senf::ppi::connector::InputConnector::v_dequeueEvent()
 {}
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::ppi::connector::OutputConnector
 
 prefix_ void senf::ppi::connector::OutputConnector::v_disconnected()
@@ -415,10 +419,10 @@ prefix_ void senf::ppi::connector::OutputConnector::v_connected()
     peer_ = & dynamic_cast<InputConnector&>(Connector::peer());
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::ppi::connector::GenericActiveInput
 
-////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // private members
 
 prefix_ void senf::ppi::connector::GenericActiveInput::v_requestEvent()
@@ -426,7 +430,7 @@ prefix_ void senf::ppi::connector::GenericActiveInput::v_requestEvent()
     request();
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::ppi::connector::GenericPassiveInput
 
 prefix_ void senf::ppi::connector::GenericPassiveInput::v_disconnected()
@@ -443,7 +447,7 @@ prefix_ void senf::ppi::connector::GenericPassiveInput::v_connected()
     peer_ = & dynamic_cast<GenericActiveOutput&>(Connector::peer());
 }
 
-////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // private members
 
 prefix_ void senf::ppi::connector::GenericPassiveInput::v_enqueueEvent()
@@ -476,7 +480,7 @@ prefix_ void senf::ppi::connector::GenericPassiveInput::v_unthrottleEvent()
     }
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::ppi::connector::GenericPassiveOutput
 
 prefix_ void senf::ppi::connector::GenericPassiveOutput::v_disconnected()
@@ -493,7 +497,7 @@ prefix_ void senf::ppi::connector::GenericPassiveOutput::v_connected()
     peer_ = & dynamic_cast<GenericActiveInput&>(Connector::peer());
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::ppi::connector::GenericActiveInput
 
 prefix_ void senf::ppi::connector::GenericActiveInput::v_disconnected()
@@ -510,7 +514,7 @@ prefix_ void senf::ppi::connector::GenericActiveInput::v_connected()
     peer_ = & dynamic_cast<GenericPassiveOutput&>(Connector::peer());
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::ppi::connector::GenericActiveOutput
 
 prefix_ void senf::ppi::connector::GenericActiveOutput::v_disconnected()
@@ -528,7 +532,7 @@ prefix_ void senf::ppi::connector::GenericActiveOutput::v_connected()
 }
 
 
-///////////////////////////////cc.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 #undef prefix_
 //#include "Connectors.mpp"