Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-21 09:17:42

0001 // Created on: 2001-07-26
0002 // Created by: Alexander GRIGORIEV
0003 // Copyright (c) 2001-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef LDOM_BasicText_HeaderFile
0017 #define LDOM_BasicText_HeaderFile
0018 
0019 #include <LDOM_BasicNode.hxx>
0020 #include <LDOMBasicString.hxx>
0021 
0022 class LDOM_CharacterData;
0023 
0024 //  Class LDOM_BasicText
0025 //
0026 
0027 class LDOM_BasicText : public LDOM_BasicNode
0028 {
0029 public:
0030   // ---------- PUBLIC METHODS ----------
0031 
0032   LDOM_BasicText()
0033       : LDOM_BasicNode(LDOM_Node::UNKNOWN)
0034   {
0035   }
0036 
0037   //    Empty constructor
0038 
0039   LDOM_BasicText& operator=(const LDOM_NullPtr* aNull);
0040 
0041   //    Nullify
0042 
0043   const LDOMBasicString& GetData() const { return myValue; }
0044 
0045   void SetData(const LDOMBasicString& aValue, const occ::handle<LDOM_MemManager>& aDoc)
0046   {
0047     myValue = LDOMString(aValue, aDoc);
0048   }
0049 
0050 private:
0051   // ---------- PRIVATE METHODS ----------
0052   friend class LDOM_Node;
0053   friend class LDOMParser;
0054   friend class LDOM_Document;
0055   friend class LDOM_BasicElement;
0056 
0057   LDOM_BasicText(const LDOM_Node::NodeType aType, const LDOMBasicString& aData)
0058       : LDOM_BasicNode(aType),
0059         myValue(aData)
0060   {
0061   }
0062 
0063   // Constructor
0064 
0065   LDOM_BasicText(const LDOM_CharacterData& aText);
0066 
0067   static LDOM_BasicText& Create(const LDOM_Node::NodeType           aType,
0068                                 const LDOMBasicString&              aData,
0069                                 const occ::handle<LDOM_MemManager>& aDoc);
0070   // Creation
0071 
0072 private:
0073   // ---------- PRIVATE FIELDS ----------
0074 
0075   LDOMBasicString myValue;
0076 };
0077 
0078 #endif