GenEnvRules.hpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2018 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 _GENENVRULES_HPP_
  14. #define _GENENVRULES_HPP_
  15. //#include "jiface.hpp"
  16. //#include "jliball.hpp"
  17. //#include "XMLTags.h"
  18. namespace ech
  19. {
  20. //Reference WizardInputs::setWizardRules
  21. //Reference WizardInputs::setTopologyParam
  22. class GenEnvRules
  23. {
  24. public:
  25. GenEnvRules(const char* filename) { loadFile(filename); }
  26. void loadFile(const char* filename);
  27. int getPropInt(const char* propname, int dft=0) const;
  28. const char* getProp(const char* propname) const;
  29. bool foundInProp(const char* propname, const char* item, const char* sep=",") const;
  30. bool doNotGenTheCompOptional(const char* compname) const;
  31. bool isValidServerCombo(const char* server1, const char* server2) const;
  32. const char* getRoxieAgentRedType() const { return roxieAgentRedType; }
  33. unsigned getRoxieAgentRedChannels() const { return roxieAgentRedChannels; }
  34. unsigned getRoxieAgentRedOffset() const { return roxieAgentRedOffset; };
  35. private:
  36. Owned<IProperties> rules;
  37. unsigned roxieAgentRedChannels;
  38. unsigned roxieAgentRedOffset;
  39. StringBuffer roxieAgentRedType;
  40. bool roxieOnDemand;
  41. };
  42. }
  43. #endif