Separatista
leafelement.h
1 /***************************************************************************
2 * Copyright (C) 2014 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_LEAFELEMENT_H
22 #define SEPARATISTA_LEAFELEMENT_H
23 
24 #include <ctime>
25 #include <string>
26 
27 #include "separatista/separatista.h"
28 #include "separatista/xerces_types.h"
29 #include "separatista/element.h"
30 #include "separatista/validator.h"
31 #include "separatista/elementdescriptor.h"
32 
33 namespace Separatista
34 {
38  class SEPARATISTA_EXTERN LeafElement : public Element
39  {
40  public:
44  static Element* createElement(const ChildElementDescriptor* pChildElementDescriptor);
45 
46 
47  IOErrorCode toDOMDocument(xercesc::DOMDocument *pDocument, xercesc::DOMElement *pParent, const ErrorOptions errorOptions = ThrowExceptions) const;
48 
49  void fromDOMDocument(xercesc::DOMElement *pDOMElement, const ErrorOptions errorOptions = ThrowExceptions);
50 
54  const wchar_t* getTextValue() const;
55 
59  void setValue(const wchar_t *pValue, const ErrorOptions errorOptions = ThrowExceptions);
60 
61  protected:
63  LeafElement(const ChildElementDescriptor* pChildElementDescriptor);
64 
65  std::wstring m_value;
66  };
67 }
68 
69 
70 #endif // SEPARATISTA_LEAFELEMENT_H
Definition: leafelement.h:38
Definition: elementdescriptor.h:58
ErrorOptions
Definition: element.h:62
Definition: mt940s.h:39
Definition: element.h:55