00001 /*00002 * Licensed to the Apache Software Foundation (ASF) under one or more00003 * contributor license agreements. See the NOTICE file distributed with00004 * this work for additional information regarding copyright ownership.00005 * The ASF licenses this file to You under the Apache License, Version 2.000006 * (the "License"); you may not use this file except in compliance with00007 * the License. You may obtain a copy of the License at00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.000010 * 00011 * Unless required by applicable law or agreed to in writing, software00012 * distributed under the License is distributed on an "AS IS" BASIS,00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.00014 * See the License for the specific language governing permissions and00015 * limitations under the License.00016 */00017
00018 /*00019 * $Id: XSObject.hpp 568078 2007-08-21 11:43:25Z amassari $00020 */00021
00022 #if !defined(XSOBJECT_HPP)00023#define XSOBJECT_HPP00024
00025 #include <xercesc/util/PlatformUtils.hpp>00026 #include <xercesc/framework/psvi/XSConstants.hpp>00027
00028 XERCES_CPP_NAMESPACE_BEGIN00029
00038 // forward declarations00039 class XSNamespaceItem;
00040 class XSModel;
00041
00042class XSObject : publicXMemory00043 {
00044 public:
00045
00046 // Constructors and Destructor00047 // -----------------------------------------------------------------------00050
00058 XSObject00059 (
00060 XSConstants::COMPONENT_TYPE compType
00061 , XSModel* const xsModel
00062 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager00063 );
00064
00066
00069 virtual ~XSObject();
00071
00072 //---------------------00076
00081 XSConstants::COMPONENT_TYPE getType() const;
00082
00087 virtualconst XMLCh* getName();
00088
00093 virtualconst XMLCh* getNamespace();
00094
00100 virtualXSNamespaceItem *getNamespaceItem();
00101
00108 virtualunsignedint getId() const;
00109
00111
00112 //----------------------------------00119 void setId(unsignedintid);
00121
00122 private:
00123
00124 // -----------------------------------------------------------------------00125 // Unimplemented constructors and operators00126 // -----------------------------------------------------------------------00127 XSObject(constXSObject&);
00128 XSObject & operator=(constXSObject &);
00129
00130 protected:
00131
00132 // -----------------------------------------------------------------------00133 // data members00134 // -----------------------------------------------------------------------00135 // fMemoryManager:00136 // used for any memory allocations00137 // fComponentType00138 // the type of the actual component00139XSConstants::COMPONENT_TYPE fComponentType;
00140XSModel* fXSModel;
00141MemoryManager* fMemoryManager;
00142unsignedint fId;
00143 };
00144
00145inlineXSConstants::COMPONENT_TYPEXSObject::getType() const00146 {
00147 returnfComponentType;
00148 }
00149
00150 XERCES_CPP_NAMESPACE_END00151
00152 #endif