1 // Created on: 2001-07-26
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2001-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef LDOM_BasicText_HeaderFile
17 #define LDOM_BasicText_HeaderFile
19 #include <LDOM_BasicNode.hxx>
20 #include <LDOMBasicString.hxx>
23 class LDOM_CharacterData;
25 class LDOM_BasicElement;
27 // Class LDOM_BasicText
30 class LDOM_BasicText : public LDOM_BasicNode
34 // ---------- PUBLIC METHODS ----------
36 LDOM_BasicText () : LDOM_BasicNode (LDOM_Node::UNKNOWN) {}
39 LDOM_BasicText& operator = (const LDOM_NullPtr * aNull);
42 const LDOMBasicString& GetData () const
45 void SetData (const LDOMBasicString& aValue,
46 const Handle(LDOM_MemManager)& aDoc)
47 { myValue = LDOMString (aValue, aDoc); }
50 // ---------- PRIVATE METHODS ----------
51 friend class LDOM_Node;
52 friend class LDOMParser;
53 friend class LDOM_Document;
54 friend class LDOM_BasicElement;
56 LDOM_BasicText (const LDOM_Node::NodeType aType,
57 const LDOMBasicString& aData)
58 : LDOM_BasicNode (aType), myValue (aData) {}
61 LDOM_BasicText (const LDOM_CharacterData& aText);
63 static LDOM_BasicText& Create (const LDOM_Node::NodeType aType,
64 const LDOMBasicString& aData,
65 const Handle(LDOM_MemManager)& aDoc);
69 // ---------- PRIVATE FIELDS ----------
71 LDOMBasicString myValue;