Separatista
attributedleafelement.h
1 /***************************************************************************
2 * Copyright (C) 2016 by Okkel Klaver *
3 * info@vanhetland.nl *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20 
21 #ifndef SEPARATISTA_ATTRIBUTEDLEAFELEMENT_H
22 #define SEPARATISTA_ATTRIBUTEDLEAFELEMENT_H
23 
24 #include <map>
25 
26 #include "separatista/separatista.h"
27 #include "separatista/xerces_types.h"
28 #include "separatista/leafelement.h"
29 #include "separatista/elementdescriptor.h"
30 
31 namespace Separatista
32 {
36  class SEPARATISTA_EXTERN AttributedLeafElement : public LeafElement
37  {
38  public:
42  static Element* createElement(const ChildElementDescriptor* pChildElementDescriptor);
43 
44 
45  IOErrorCode toDOMDocument(xercesc::DOMDocument *pDocument, xercesc::DOMElement *pParent, const ErrorOptions errorOptions = ThrowExceptions) const;
46 
47  void fromDOMDocument(xercesc::DOMElement *pDOMElement, const ErrorOptions errorOptions = ThrowExceptions);
48 
50  const wchar_t* getAttributeValue(const wchar_t *pAttributeName) const;
51 
53  void setAttributeValue(const wchar_t *pAttributeName, const wchar_t *pValue);
54  protected:
56  AttributedLeafElement(const ChildElementDescriptor* pChildElementDescriptor);
57 
58  std::map<std::wstring, std::wstring> m_Attributes;
59  };
60 }
61 
62 
63 #endif // SEPARATISTA_ATTRIBUTEDLEAFELEMENT_H
Definition: leafelement.h:38
Definition: elementdescriptor.h:58
ErrorOptions
Definition: element.h:62
Definition: attributedleafelement.h:36
Definition: mt940s.h:39
Definition: element.h:55