Salome HOME
Warnings correction for moc files generation
[modules/shaper.git] / src / Config / Config_ValidatorReader.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 /*
4  * Config_ValidatorReader.h
5  *
6  *  Created on: Mar 20, 2015
7  *      Author: sbh
8  */
9
10 #ifndef CONFIG_VALIDATORREADER_H_
11 #define CONFIG_VALIDATORREADER_H_
12
13 #include <Config_def.h>
14 #include <Config_XMLReader.h>
15
16 #include <cstdarg>
17 #include <string>
18
19 /*!
20  * \class Config_ValidatorReader
21  * \ingroup Config
22  * \brief Base class for all libxml readers. Provides high-level API
23  * for all xml operations.
24 */
25 class Config_ValidatorReader : public Config_XMLReader
26 {
27  public:
28   /*!
29    * Constructor
30    * \param theXmlFile - full path to the xml file which will be processed by the reader
31    */
32   CONFIG_EXPORT Config_ValidatorReader(const std::string& theXmlFile);
33   CONFIG_EXPORT virtual ~Config_ValidatorReader();
34
35  protected:
36   /*!
37    * \brief Allows to customize reader's behavior for a node. Virtual.
38    * The default implementation process "source" and "validator" nodes.
39    */
40   virtual void processNode(xmlNodePtr aNode);
41   /*!
42    * \brief Defines which nodes should be processed recursively. Virtual.
43    * The default impl is to read all nodes.
44    */
45   virtual bool processChildren(xmlNodePtr aNode);
46
47   /*!
48    * Cleans the cached information about parent feature or attribute (widget)
49    */
50   virtual void cleanup(xmlNodePtr theNode);
51
52   /*!
53    * \brief Retrieves all the necessary info from the validator node.
54    * Sends ValidatorLoaded event
55    */
56   void processValidator(xmlNodePtr theNode);
57
58  private:
59   std::string myCurrentWidget;
60 };
61
62 #endif /* CONFIG_VALIDATORREADER_H_ */