source: icXML/icXML-devel/src/xercesc/framework/psvi/XSModelGroupDefinition.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: 3.0 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: XSModelGroupDefinition.cpp 471747 2006-11-06 14:31:56Z amassari $
20 */
21
22#include <xercesc/framework/psvi/XSModelGroupDefinition.hpp>
23#include <xercesc/framework/psvi/XSParticle.hpp>
24#include <xercesc/framework/psvi/XSModel.hpp>
25#include <xercesc/validators/schema/XercesGroupInfo.hpp>
26
27
28XERCES_CPP_NAMESPACE_BEGIN
29
30// ---------------------------------------------------------------------------
31//  XSModelGroupDefinition: Constructors and Destructors
32// ---------------------------------------------------------------------------
33XSModelGroupDefinition::XSModelGroupDefinition(XercesGroupInfo* const groupInfo,
34                                               XSParticle* const      groupParticle,
35                                               XSAnnotation* const    annot,
36                                               XSModel* const         xsModel,
37                                               MemoryManager* const   manager)
38    : XSObject(XSConstants::MODEL_GROUP_DEFINITION, xsModel, manager)
39    , fGroupInfo(groupInfo)
40    , fModelGroupParticle(groupParticle)
41    , fAnnotation(annot)
42{
43}
44
45XSModelGroupDefinition::~XSModelGroupDefinition()
46{
47    if (fModelGroupParticle) // Not owned by XSModel
48        delete fModelGroupParticle;
49}
50
51// ---------------------------------------------------------------------------
52//  XSModelGroupDefinition: XSModel virtual methods
53// ---------------------------------------------------------------------------
54const XMLCh *XSModelGroupDefinition::getName() const
55{
56    return fXSModel->getURIStringPool()->getValueForId(fGroupInfo->getNameId());
57}
58
59const XMLCh *XSModelGroupDefinition::getNamespace() 
60{
61    return fXSModel->getURIStringPool()->getValueForId(fGroupInfo->getNamespaceId());
62}
63
64XSNamespaceItem *XSModelGroupDefinition::getNamespaceItem() 
65{
66    return fXSModel->getNamespaceItem(getNamespace());
67}
68
69// ---------------------------------------------------------------------------
70//  XSModelGroupDefinition: access methods
71// ---------------------------------------------------------------------------
72XSModelGroup* XSModelGroupDefinition::getModelGroup()
73{
74    if (fModelGroupParticle)
75        return fModelGroupParticle->getModelGroupTerm();
76
77    return 0;
78}
79
80
81XERCES_CPP_NAMESPACE_END
82
83
Note: See TracBrowser for help on using the repository browser.