composer.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. '''*****************************************************************************
  2. AToMPM - A Tool for Multi-Paradigm Modelling
  3. Copyright (c) 2011 Eugene Syriani
  4. This file is part of AToMPM.
  5. AToMPM is free software: you can redistribute it and/or modify it under the
  6. terms of the GNU Lesser General Public License as published by the Free Software
  7. Foundation, either version 3 of the License, or (at your option) any later
  8. version.
  9. AToMPM is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  11. PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License along
  13. with AToMPM. If not, see <http://www.gnu.org/licenses/>.
  14. *****************************************************************************'''
  15. from composite_primitive import CompositePrimitive
  16. class Composer(CompositePrimitive):
  17. '''
  18. Encapsulates T-Core primitives.
  19. Both packet_in & next_in methods must be overridden to provide meaningful behaviour.
  20. '''
  21. def __init__(self):
  22. '''
  23. Encapsulates T-Core primitives.
  24. Both packet_in & next_in methods must be overridden to provide meaningful behaviour.
  25. '''
  26. super(Composer, self).__init__()
  27. def packet_in(self, packet):
  28. return packet
  29. def next_in(self, packet):
  30. return packet