thorpipe.hpp 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. #ifndef __THORPIPERROR_HPP_
  14. #define __THORPIPERROR_HPP_
  15. #ifdef THORHELPER_EXPORTS
  16. #define THORHELPER_API DECL_EXPORT
  17. #else
  18. #define THORHELPER_API DECL_IMPORT
  19. #endif
  20. #include "jthread.hpp"
  21. #include "csvsplitter.hpp"
  22. interface IPipeErrorHelper : extends IInterface
  23. {
  24. public:
  25. virtual void run(IPipeProcess *pipe) = 0;
  26. virtual void wait() = 0;
  27. virtual const char * queryErrorOutput() = 0;
  28. };
  29. extern THORHELPER_API IPipeErrorHelper * createPipeErrorHelper();
  30. interface IReadRowStream : public IInterface
  31. {
  32. public:
  33. virtual const void * next() = 0;
  34. virtual void setStream(ISimpleReadStream * in) = 0;
  35. virtual bool eos() = 0;
  36. };
  37. interface IEngineRowAllocator;
  38. interface IOutputRowDeserializer;
  39. interface IXmlToRowTransformer;
  40. interface ICsvToRowTransformer;
  41. interface IPipeWriteXformHelper : extends IInterface
  42. {
  43. virtual void writeHeader(IPipeProcess * pipe) = 0;
  44. virtual void writeFooter(IPipeProcess * pipe) = 0;
  45. virtual void ready() = 0;
  46. virtual void writeTranslatedText(const void * row, IPipeProcess * pipe) = 0;
  47. };
  48. extern THORHELPER_API IReadRowStream *createReadRowStream(IEngineRowAllocator * _rowAllocator, IOutputRowDeserializer * _rowDeserializer, IXmlToRowTransformer * _xmlTransformer, ICsvToRowTransformer * _csvTransformer, const char * iteratorPath, unsigned pipeFlags);
  49. extern THORHELPER_API IPipeWriteXformHelper *createPipeWriteXformHelper(unsigned _flags, IHThorXmlWriteExtra * _xmlWriterExtra, IHThorCsvWriteExtra * _csvWriterExtra, IOutputRowSerializer *_rawSerializer);
  50. #endif /* __THORPIPERROR_HPP_ */