GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
PadRowLayout2DXML.h
1 #ifndef GEAR_PadRowLayout2DXML_H
2 #define GEAR_PadRowLayout2DXML_H 1
3 
4 
5 //#include "gearxml/XMLHandler.h"
6 //#include "gear/PadRowLayout2D.h"
7 
8 #include <string>
9 #include <map>
10 
11 namespace gear {
12 
13  class PadRowLayout2D ;
14  class TiXmlElement ;
15  class GearMgr ;
16 
17  class PadRowLayout2DXML ;
18 
19 
26 
27  typedef std::map< std::string, PadRowLayout2DXML* > Map ;
28 
29 
30  public:
31 
32  virtual ~PadRowLayout2DXML(){}
33 
36  virtual TiXmlElement toXML( const PadRowLayout2D* layout ) const=0 ;
37 
38 
42  virtual PadRowLayout2D* fromXML( const TiXmlElement* xmlElement) const=0 ;
43 
44 
46  static PadRowLayout2DXML* getHandler(const std::string& typeName ) ;
47 
49  static PadRowLayout2DXML* getHandler(const PadRowLayout2D* l ) ;
50 
51 
54  static Map& map() ;
55 
56 // /** Helper function for getting the proper key in the handler map */
57 // static std::string typeName( const PadRowLayout2D* l ) ;
58 
59  }; // class
60 } // namespace gear
61 
62 #endif /* ifndef GEAR_PadRowLayout2DXML_H */
virtual PadRowLayout2D * fromXML(const TiXmlElement *xmlElement) const =0
Creates the appropriate PadRowLayout2D subclass from the given XML element (node) ...
virtual TiXmlElement toXML(const PadRowLayout2D *layout) const =0
Creates an XML node for the given PadRowLayout2D.
Abstract description of a planar subdetector with pads (cells) that are positioned in rows (circular ...
static Map & map()
The map with available xml handler objects (PadRowLayout2DXML)
static PadRowLayout2DXML * getHandler(const std::string &typeName)
Get handler for given type.
The element is a container class.
Definition: tinyxml.h:827
Abstract XML handler for PadRowLayout2DXML.