hqlfunc.hpp 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*##############################################################################
  2. Copyright (C) 2011 HPCC Systems.
  3. All rights reserved. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Affero General Public License as
  5. published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Affero General Public License for more details.
  11. You should have received a copy of the GNU Affero General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ############################################################################## */
  14. #ifndef BUILDFUNC_HPP
  15. #define BUILDFUNC_HPP
  16. #ifdef READSCRIPT_EXPORTS
  17. #define READSCRIPT_DECL __declspec(dllexport)
  18. #else
  19. #define READSCRIPT_DECL __declspec(dllimport)
  20. #endif
  21. interface ITypeInfo;
  22. interface IFunctionParamInfo : public IInterface
  23. {
  24. public:
  25. virtual ITypeInfo * queryType() const = 0;
  26. };
  27. interface IModuleInfo;
  28. interface ITypeInfo;
  29. interface IHelperFunction : public IInterface
  30. {
  31. public:
  32. virtual StringBuffer & generateCpp(StringBuffer & out) = 0;
  33. };
  34. interface IFunctionInfo : public IHelperFunction
  35. {
  36. public:
  37. virtual unsigned getNumParameters() = 0;
  38. virtual const char * queryCppName() = 0;
  39. virtual IModuleInfo * queryModule() = 0;
  40. virtual _ATOM queryName() = 0;
  41. virtual IFunctionParamInfo * queryParam(unsigned idx) = 0;
  42. virtual ITypeInfo * queryReturnType() = 0;
  43. };
  44. interface IModuleInfo : public IInterface
  45. {
  46. public:
  47. virtual StringBuffer & getName(StringBuffer & out) = 0;
  48. virtual bool inLibrary() = 0;
  49. virtual bool isSystem() = 0;
  50. };
  51. interface IFunctionDatabase : public IInterface
  52. {
  53. public:
  54. virtual IFunctionInfo * queryFunction(unsigned idx) = 0;
  55. virtual IFunctionInfo * queryFunction(_ATOM name) = 0;
  56. virtual IModuleInfo * queryModule(unsigned idx) = 0;
  57. };
  58. #endif