EnvironmentConfiguration.hpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2015 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 _ENVIRONMENT_CONFIGURATON_HPP_
  14. #define _ENVIRONMENT_CONFIGURATON_HPP_
  15. #include "jptree.hpp"
  16. #include "ConfigFileComponentUtils.hpp"
  17. namespace CONFIGURATOR
  18. {
  19. class CEnvironmentConfiguration : public CConfigFileComponentUtils
  20. {
  21. public:
  22. IMPLEMENT_IINTERFACE
  23. enum CEF_ERROR_CODES{ CF_NO_ERROR = 0,
  24. CF_UNKNOWN_COMPONENT,
  25. CF_UNKNOWN_ESP_COMPONENT,
  26. CF_COMPONENT_INSTANCE_NOT_FOUND,
  27. CF_OTHER = 0xFF };
  28. static CEnvironmentConfiguration* getInstance();
  29. virtual ~CEnvironmentConfiguration();
  30. enum CEF_ERROR_CODES generateBaseEnvironmentConfiguration();
  31. enum CEF_ERROR_CODES addComponent(const char* pCompType);
  32. enum CEF_ERROR_CODES removeComponent(const char* pCompType, const char* pCompName);
  33. enum CEF_ERROR_CODES addESPService(const char* espServiceType);
  34. protected:
  35. CEnvironmentConfiguration();
  36. Owned<IPropertyTree> m_pEnv;
  37. private:
  38. };
  39. }
  40. #endif // _ENVIRONMENT_CONFIGURATON_HPP_