Search:

SENF Extensible Network Framework

  • Home
  • Download
  • Wiki
  • BerliOS
  • ChangeLog
  • Browse SVN
  • Bug Tracker
  • Overview
  • Examples
  • HowTos
  • Glossary
  • PPI
  • Packets
  • Scheduler
  • Socket
  • Utils
  • Console
  • Daemon
  • Logger
  • Termlib
  • Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • Directories
  • File List
  • File Members

Jack.cc

Go to the documentation of this file.
00001 // $Id: Jack.cc 1769 2011-02-14 08:50:48Z tho $
00002 //
00003 // Copyright (C) 2009
00004 // Fraunhofer (FOKUS)
00005 // Competence Center NETwork research (NET), St. Augustin, GERMANY
00006 //     Stefan Bund <g0dil@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 //#include "Jack.ih"
00027 
00028 // Custom includes
00029 #include "Setup.hh"
00030 
00031 #define prefix_
00032 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00033 
00034 prefix_ void senf::ppi::connector::GenericActiveInputJack::reset(GenericActiveInput & input)
00035 {
00036     if (input_->connected()) {
00037         GenericPassiveOutput & peer (input_->peer());
00038         input_->disconnect();
00039         connect(peer, input);
00040     }
00041     input_ = & input;
00042 }
00043 
00044 prefix_ void senf::ppi::connector::GenericActiveOutputJack::reset(GenericActiveOutput & output)
00045 {
00046     if (output_->connected()) {
00047         GenericPassiveInput & peer (output_->peer());
00048         output_->disconnect();
00049         connect(output, peer);
00050     }
00051     output_ = & output;
00052 }
00053 
00054 prefix_ void senf::ppi::connector::GenericPassiveInputJack::reset(GenericPassiveInput & input)
00055 {
00056     if (input_->connected()) {
00057         GenericActiveOutput & peer (input_->peer());
00058         input_->disconnect();
00059         connect(peer, input);
00060     }
00061     input_ = & input;
00062 }
00063 
00064 prefix_ void senf::ppi::connector::GenericPassiveOutputJack::reset(GenericPassiveOutput & output)
00065 {
00066     if (output_->connected()) {
00067         GenericActiveInput & peer (output_->peer());
00068         output_->disconnect();
00069         connect(output, peer);
00070     }
00071     output_ = & output;
00072 }
00073 
00074 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00075 #undef prefix_
00076 
00077 
00078 // Local Variables:
00079 // mode: c++
00080 // fill-column: 100
00081 // comment-column: 40
00082 // c-file-style: "senf"
00083 // indent-tabs-mode: nil
00084 // ispell-local-dictionary: "american"
00085 // compile-command: "scons -u test"
00086 // End:

Contact: senf-dev@lists.berlios.de | © 2006-2010 Fraunhofer Institute for Open Communication Systems, Network Research