/tags/rel-0-1-0/FreeSpeech/data-flow/include/OutputStream.h

# · C++ Header · 58 lines · 18 code · 14 blank · 26 comment · 0 complexity · 6c99ee34ec2bf07c0e2c3dd22be58c6e MD5 · raw file

  1. // Copyright (C) 1999 Jean-Marc Valin
  2. //
  3. // This program is free software; you can redistribute it and/or modify
  4. // it under the terms of the GNU General Public License as published by
  5. // the Free Software Foundation; either version 2, or (at your option)
  6. // any later version.
  7. //
  8. // This program is distributed in the hope that it will be useful, but
  9. // WITHOUT ANY WARRANTY; without even the implied warranty of
  10. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. // General Public License for more details.
  12. //
  13. // You should have received a copy of the GNU General Public License
  14. // along with this file. If not, write to the Free Software Foundation,
  15. // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  16. #ifndef OUTPUTSTREAM_H
  17. #define OUTPUTSTREAM_H
  18. #include "Node.h"
  19. #include "ObjectRef.h"
  20. class OutputStream : public Node {
  21. protected:
  22. /**The ID of the 'output' output*/
  23. int outputID;
  24. /**The ID of the 'input' input*/
  25. int inputID;
  26. /**Reference to the opened stream*/
  27. ObjectRef openedFile;
  28. public:
  29. /**Constructor, takes the name of the node and a set of parameters*/
  30. OutputStream(string nodeName, ParameterSet params);
  31. /**Class specific initialization routine.
  32. Each class will call its subclass specificInitialize() method*/
  33. virtual void specificInitialize();
  34. /**Class reset routine.
  35. Each class will call its superclass reset() method*/
  36. virtual void reset();
  37. /**Ask for the node's output which ID (number) is output_id
  38. and for the 'count' iteration */
  39. virtual ObjectRef getOutput(int output_id, int count);
  40. protected:
  41. /**Default constructor, should not be used*/
  42. OutputStream() {throw new GeneralException("OutputStream copy constructor should not be called",__FILE__,__LINE__);}
  43. };
  44. #endif