source: icXML/icXML-devel/src/icxercesc/framework/XMLElementDecl.cpp

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

Changes to icxercesc files

File size: 3.8 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: XMLElementDecl.cpp 679359 2008-07-24 11:15:19Z borisk $
20 */
21
22
23// ---------------------------------------------------------------------------
24//  Includes
25// ---------------------------------------------------------------------------
26#include <icxercesc/framework/XMLElementDecl.hpp>
27#include <xercesc/util/XMLUniDefs.hpp>
28#include <xercesc/util/XMLUni.hpp>
29#include <icxercesc/validators/schema/SchemaElementDecl.hpp>
30#include <icxercesc/validators/DTD/DTDElementDecl.hpp>
31#include <icxmlc/XMLConfig.hpp>
32
33XERCES_CPP_NAMESPACE_BEGIN
34
35// ---------------------------------------------------------------------------
36//  XMLElementDecl: Public, static data
37// ---------------------------------------------------------------------------
38const unsigned int  XMLElementDecl::fgInvalidElemId    = 0xFFFFFFFE;
39const unsigned int  XMLElementDecl::fgPCDataElemId     = 0xFFFFFFFF;
40const XMLCh         XMLElementDecl::fgPCDataElemName[] =
41{
42                chPound, chLatin_P, chLatin_C, chLatin_D, chLatin_A
43        ,   chLatin_T, chLatin_A, chNull
44};
45
46
47
48// ---------------------------------------------------------------------------
49//  XMLElementDecl: Destructor
50// ---------------------------------------------------------------------------
51XMLElementDecl::~XMLElementDecl()
52{
53    cleanUp();
54}
55
56// ---------------------------------------------------------------------------
57//  XMLElementDecl: Setter Methods
58// ---------------------------------------------------------------------------
59void
60XMLElementDecl::setElementName(const XMLCh* const prefix, const XMLCh* const localPart, const int uriId )
61{
62    fElementName->setName(prefix, localPart, uriId);
63}
64
65void
66XMLElementDecl::setElementName(const XMLCh* const rawName, const int uriId)
67{
68    fElementName->setName(rawName, uriId);
69}
70
71void XMLElementDecl::setElementName(const QName* const elementName)
72{
73    *fElementName = *elementName;
74}
75
76// ---------------------------------------------------------------------------
77//  ElementDecl: Hidden constructors
78// ---------------------------------------------------------------------------
79XMLElementDecl::XMLElementDecl(XMLStringPool * const stringManager)
80: fElementName(new (stringManager->getMemoryManager()) QName(stringManager))
81, fCreateReason(XMLElementDecl::NoReason)
82, fId(XMLElementDecl::fgInvalidElemId)
83, fExternalElement(false)
84{
85
86}
87
88XMLElementDecl::XMLElementDecl(const QName & qName)
89: fElementName(new (qName.getMemoryManager()) QName(qName))
90, fCreateReason(XMLElementDecl::NoReason)
91, fId(XMLElementDecl::fgInvalidElemId)
92, fExternalElement(false)
93{
94
95}
96
97
98
99/***
100 * Support for Serialization/De-serialization
101 ***/
102
103IMPL_XSERIALIZABLE_NOCREATE(XMLElementDecl)
104
105void XMLElementDecl::serialize(XSerializeEngine&)
106{
107    DEPRECATED_FEATURE_IN_ICXML;
108}
109
110void
111XMLElementDecl::storeElementDecl(XSerializeEngine&, XMLElementDecl* const)
112{
113    DEPRECATED_FEATURE_IN_ICXML;
114}
115
116XMLElementDecl* XMLElementDecl::loadElementDecl(XSerializeEngine&)
117{
118    DEPRECATED_FEATURE_IN_ICXML;
119}
120
121XMLElementDecl::XMLElementDecl(MemoryManager* const)
122{
123    DEPRECATED_FEATURE_IN_ICXML;
124}
125
126XERCES_CPP_NAMESPACE_END
Note: See TracBrowser for help on using the repository browser.