source: icXML/icXML-devel/src/xercesc/dom/impl/DOMLSInputImpl.cpp @ 2722

Last change on this file since 2722 was 2722, checked in by cameron, 6 years ago

Original Xerces files with import mods for icxercesc

File size: 2.5 KB
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: DOMLSInputImpl.cpp 752848 2009-03-12 12:44:40Z amassari $
20 */
21
22#include "DOMLSInputImpl.hpp"
23
24#include <icxercesc/util/XMLString.hpp>
25
26XERCES_CPP_NAMESPACE_BEGIN
27
28DOMLSInputImpl::DOMLSInputImpl(MemoryManager* const manager /*= XMLPlatformUtils::fgMemoryManager*/)
29:fStringData(0)
30,fByteStream(0)
31,fEncoding(0)
32,fPublicId(0)
33,fSystemId(0)
34,fBaseURI(0)
35,fIssueFatalErrorIfNotFound(true)
36,fMemoryManager(manager)
37{
38}
39
40DOMLSInputImpl::~DOMLSInputImpl()
41{
42    fMemoryManager->deallocate(fEncoding);
43    fMemoryManager->deallocate(fPublicId);
44    fMemoryManager->deallocate(fSystemId);
45    fMemoryManager->deallocate(fBaseURI);
46}
47
48void DOMLSInputImpl::setStringData(const XMLCh* data)
49{
50    fStringData=data;
51    setEncoding(XMLUni::fgXMLChEncodingString);
52}
53
54void DOMLSInputImpl::setByteStream(InputSource* stream)
55{
56    fByteStream=stream;
57}
58
59void DOMLSInputImpl::setEncoding(const XMLCh* const encodingStr)
60{
61    fMemoryManager->deallocate(fEncoding);
62    fEncoding = XMLString::replicate(encodingStr, fMemoryManager);
63}
64
65void DOMLSInputImpl::setPublicId(const XMLCh* const publicId)
66{
67    fMemoryManager->deallocate(fPublicId);
68    fPublicId = XMLString::replicate(publicId, fMemoryManager);
69}
70
71void DOMLSInputImpl::setSystemId(const XMLCh* const systemId)
72{
73    fMemoryManager->deallocate(fSystemId);
74    fSystemId = XMLString::replicate(systemId, fMemoryManager);
75}
76
77void DOMLSInputImpl::setBaseURI(const XMLCh* const baseURI)
78{
79    fMemoryManager->deallocate(fBaseURI);
80    fBaseURI = XMLString::replicate(baseURI, fMemoryManager);
81}
82
83void DOMLSInputImpl::setIssueFatalErrorIfNotFound(bool flag)
84{
85    fIssueFatalErrorIfNotFound=flag;
86}
87
88void DOMLSInputImpl::release()
89{
90    delete this;
91}
92
93
94XERCES_CPP_NAMESPACE_END
95
Note: See TracBrowser for help on using the repository browser.