confighelper.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #include "deployutils.hpp"
  2. class DEPLOYUTILS_API CConfigHelper
  3. {
  4. public:
  5. virtual ~CConfigHelper();
  6. static CConfigHelper* getInstance(const IPropertyTree *cfg = NULL, const char* esp_name = NULL);
  7. bool isInBuildSet(const char* comp_process_name, const char* comp_name) const;
  8. const char* getConfigXMLDir() const
  9. {
  10. return m_strConfigXMLDir.toCharArray();
  11. }
  12. const char* getBuildSetFileName() const
  13. {
  14. return m_strBuildSetFileName.toCharArray();
  15. }
  16. const char* getEnvConfFile() const
  17. {
  18. return m_strEnvConfFile.toCharArray();
  19. }
  20. const char* getConfFile() const
  21. {
  22. return m_strConfFile.toCharArray();
  23. }
  24. const char* getBuildSetFilePath() const
  25. {
  26. return m_strBuildSetFilePath.toCharArray();
  27. }
  28. const IPropertyTree* getBuildSetTree() const
  29. {
  30. return m_pDefBldSet;
  31. }
  32. void getNewComponentListFromBuildSet(const IPropertyTree *pEnvTree, StringArray &sCompArray) const;
  33. void addNewComponentsFromBuildSetToEnv(IPropertyTree *pEnvTree);
  34. protected:
  35. CConfigHelper();
  36. Owned<IPropertyTree> m_pDefBldSet;
  37. StringBuffer m_strConfigXMLDir;
  38. StringBuffer m_strBuildSetFileName;
  39. StringBuffer m_strEnvConfFile;
  40. StringBuffer m_strConfFile;
  41. StringBuffer m_strBuildSetFilePath;
  42. };