rtldistr.hpp 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 rtldistr_incl
  14. #define rtldistr_incl
  15. #include "eclrtl.hpp"
  16. struct IDistributionTable : public IInterface
  17. {
  18. virtual void report(StringBuffer &out)=0;
  19. virtual void merge(MemoryBuffer &in)=0;
  20. virtual void serialize(MemoryBuffer &out)=0;
  21. };
  22. struct IStringDistributionTable : public IDistributionTable
  23. {
  24. virtual void noteValue(unsigned len, const char *val)=0;
  25. };
  26. struct IRealDistributionTable : public IDistributionTable
  27. {
  28. virtual void noteValue(double val)=0;
  29. };
  30. struct IBoolDistributionTable : public IDistributionTable
  31. {
  32. virtual void noteValue(bool val)=0;
  33. };
  34. struct IIntDistributionTable : public IDistributionTable
  35. {
  36. virtual void noteValue(int val)=0;
  37. };
  38. struct IInt64DistributionTable : public IDistributionTable
  39. {
  40. virtual void noteValue(__int64 val)=0;
  41. };
  42. struct IUIntDistributionTable : public IDistributionTable
  43. {
  44. virtual void noteValue(unsigned int val)=0;
  45. };
  46. struct IUInt64DistributionTable : public IDistributionTable
  47. {
  48. virtual void noteValue(unsigned __int64 val)=0;
  49. };
  50. ECLRTL_API IStringDistributionTable *createIStringDistributionTable(const char *, unsigned size);
  51. ECLRTL_API IRealDistributionTable *createIRealDistributionTable(const char *, unsigned size);
  52. ECLRTL_API IBoolDistributionTable *createIBoolDistributionTable(const char *, unsigned size);
  53. ECLRTL_API IIntDistributionTable *createIIntDistributionTable(const char *, unsigned size);
  54. ECLRTL_API IInt64DistributionTable *createIInt64DistributionTable(const char *, unsigned size);
  55. ECLRTL_API IUIntDistributionTable *createIUIntDistributionTable(const char *, unsigned size);
  56. ECLRTL_API IUInt64DistributionTable *createIUInt64DistributionTable(const char *, unsigned size);
  57. #endif