|
|
|||
File indexing completed on 2026-06-02 08:51:48
0001 #ifndef AUTOMATION_SERVICE_H 0002 #define AUTOMATION_SERVICE_H 0003 0004 /** 0005 * @file AutomationService.h 0006 * @author Bryan BERTHOU (SPhN / CEA Saclay) 0007 * @date March 03, 2016 0008 * @version 1.0 0009 */ 0010 0011 #include <string> 0012 0013 #include "../../BaseObject.h" 0014 0015 namespace PARTONS { 0016 0017 class ResourceManager; 0018 0019 class CryptographicHashService; 0020 0021 class ComputationConfigurationParameters; 0022 class Scenario; 0023 class XMLParserI; 0024 class XMLValidatorI; 0025 0026 /** 0027 * @class AutomationService 0028 * 0029 * @brief Automation service is designed to dynamically run complex tasks (by calling service object methods) or to create some complex C++ objects, all described by an XML file. 0030 * It allow users to perform complex tasks in a simple way without know C++ programming language and without rebuild their project. 0031 * Automation service provides some methods to retrieve Scenario or ComputationConfiguration objects from a specific XML file. 0032 * Scenario can be used to automates the whole computation process by calling many other services to performs tasks previously defined in XML file. 0033 * ComputationConfiguration is only used to configure a specific module, then you can do whatever you want with this new pre-configured module. 0034 */ 0035 class AutomationService: public BaseObject { 0036 public: 0037 static const unsigned int classId; ///< Unique ID to automatically register the class in the registry. 0038 0039 /** 0040 * Constructor 0041 * 0042 * @param className 0043 */ 0044 AutomationService(const std::string &className); 0045 0046 /** 0047 * Default destructor 0048 */ 0049 virtual ~AutomationService(); 0050 0051 /** 0052 * Call resolveObjectDependencies method of XMLValidatorI interface (after all modules have been registered and after all programm have been started) to retrieve XML schema file path from property file. 0053 */ 0054 virtual void resolveObjectDependencies(); 0055 0056 /** 0057 * Open and validate XML file with XML schema file. 0058 * Then parse it and return string representation of this file into a Scenario object. 0059 * 0060 * @param xmlFilePath 0061 * @return string representation of XML file into a Scenario object 0062 */ 0063 Scenario* parseXMLFile(const std::string &xmlFilePath) const; 0064 0065 /** 0066 * 0067 * @param pScenario 0068 */ 0069 void playScenario(Scenario* pScenario) const; 0070 0071 Scenario* parseScenario(Scenario* pScenario) const; 0072 0073 private: 0074 static const std::string PROPERTY_NAME_XML_SCHEMA_FILE_PATH; 0075 std::string m_xmlSchemaFile; 0076 0077 XMLValidatorI* m_pXMLValidatorI; ///< Specific interface to allow the plug or unplug xml validator (see AutomationService constructor) for third party libraries. Helpful for developers to avoid code rewriting and for more flexibility. 0078 XMLParserI* m_pXMLParserI; ///< Specific interface to allow the plug or unplug xml parser (see AutomationService constructor) for third party libraries. Helpful for developers to avoid code rewriting and for more flexibility. 0079 0080 CryptographicHashService* m_pCryptographicHashService; 0081 ResourceManager* m_pResourceManager; 0082 0083 const std::string& getXmlSchemaFile() const; 0084 }; 0085 0086 } /* namespace PARTONS */ 0087 0088 #endif /* AUTOMATION_SERVICE_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|