TDE personal information management applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.6KB

  1. /*
  2. This file is part of KDE.
  3. Copyright (c) 2005 Tobias Koenig <tokoe@kde.org>
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License as published by the Free Software Foundation; either
  7. version 2 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public License
  13. along with this library; see the file COPYING.LIB. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  15. Boston, MA 02110-1301, USA.
  16. */
  17. #include "port.h"
  18. using namespace KWSDL;
  19. Port::Operation::Operation()
  20. {
  21. }
  22. Port::Operation::Operation( const TQString &name, const TQString &input, const TQString &output )
  23. : mName( name ), mInput( input ), mOutput( output )
  24. {
  25. }
  26. Port::Port()
  27. {
  28. }
  29. Port::Port( const TQString &name )
  30. : mName( name )
  31. {
  32. }
  33. void Port::addOperation( const Operation &operation )
  34. {
  35. mOperations.append( operation );
  36. }
  37. Port::Operation Port::operation( const TQString &name ) const
  38. {
  39. Operation::List::ConstIterator it;
  40. for ( it = mOperations.begin(); it != mOperations.end(); ++it )
  41. if ( (*it).name() == name )
  42. return *it;
  43. return Operation();
  44. }
  45. Port::Operation::List Port::operations() const
  46. {
  47. return mOperations;
  48. }