hqlfunc.hpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 BUILDFUNC_HPP
  14. #define BUILDFUNC_HPP
  15. interface ITypeInfo;
  16. interface IFunctionParamInfo : public IInterface
  17. {
  18. public:
  19. virtual ITypeInfo * queryType() const = 0;
  20. };
  21. interface IModuleInfo;
  22. interface ITypeInfo;
  23. interface IHelperFunction : public IInterface
  24. {
  25. public:
  26. virtual StringBuffer & generateCpp(StringBuffer & out) = 0;
  27. };
  28. interface IFunctionInfo : public IHelperFunction
  29. {
  30. public:
  31. virtual unsigned getNumParameters() = 0;
  32. virtual const char * queryCppName() = 0;
  33. virtual IModuleInfo * queryModule() = 0;
  34. virtual IAtom * queryName() = 0;
  35. virtual IFunctionParamInfo * queryParam(unsigned idx) = 0;
  36. virtual ITypeInfo * queryReturnType() = 0;
  37. };
  38. interface IModuleInfo : public IInterface
  39. {
  40. public:
  41. virtual StringBuffer & getName(StringBuffer & out) = 0;
  42. virtual bool inLibrary() = 0;
  43. virtual bool isSystem() = 0;
  44. };
  45. interface IFunctionDatabase : public IInterface
  46. {
  47. public:
  48. virtual IFunctionInfo * queryFunction(unsigned idx) = 0;
  49. virtual IFunctionInfo * queryFunction(IAtom * name) = 0;
  50. virtual IModuleInfo * queryModule(unsigned idx) = 0;
  51. };
  52. #endif