| API Docs for SAX and DOM |
| Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages # XSObject.hpp Go to the documentation of this file.
    00001 /*
    00002  * Copyright 2003,2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *      http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016
    00017 /*
    00018  * $Id: XSObject.hpp 191054 2005-06-17 02:56:35Z jberry $
    00019  */
    00020
    00021 #if !defined(XSOBJECT_HPP)
    00022 #define XSOBJECT_HPP
    00023
    00024 #include <xercesc/util/PlatformUtils.hpp>
    00025 #include <xercesc/framework/psvi/XSConstants.hpp>
    00026
    00027 XERCES_CPP_NAMESPACE_BEGIN
    00028
    00037 // forward declarations
    00038 class XSNamespaceItem;
    00039 class XSModel;
    00040
    00041 class  XSObject : public XMemory
    00042 {
    00043 public:
    00044
    00045     //  Constructors and Destructor
    00046     // -----------------------------------------------------------------------
    00049
    00057     XSObject
    00058     (
    00059         XSConstants::COMPONENT_TYPE compType
    00060         , XSModel* const xsModel
    00061         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
    00062     );
    00063
    00065
    00068     virtual ~XSObject();
    00070
    00071     //---------------------
    00075
    00080     XSConstants::COMPONENT_TYPE getType() const;
    00081
    00086     virtual const XMLCh* getName();
    00087
    00092     virtual const XMLCh* getNamespace();
    00093
    00099     virtual XSNamespaceItem *getNamespaceItem();
    00100
    00107     virtual unsigned int getId() const;
    00108
    00110
    00111     //----------------------------------
    00118     void setId(unsigned int id);
    00120
    00121 private:
    00122
    00123     // -----------------------------------------------------------------------
    00124     //  Unimplemented constructors and operators
    00125     // -----------------------------------------------------------------------
    00126     XSObject(const XSObject&);
    00127     XSObject & operator=(const XSObject &);
    00128
    00129 protected:
    00130
    00131     // -----------------------------------------------------------------------
    00132     //  data members
    00133     // -----------------------------------------------------------------------
    00134     // fMemoryManager:
    00135     //  used for any memory allocations
    00136     // fComponentType
    00137     //  the type of the actual component
    00138     XSConstants::COMPONENT_TYPE fComponentType;
    00139     XSModel*                    fXSModel;
    00140     MemoryManager*              fMemoryManager;
    00141     unsigned int                fId;
    00142 };
    00143
    00144 inline XSConstants::COMPONENT_TYPE XSObject::getType() const
    00145 {
    00146     return fComponentType;
    00147 }
    00148
    00149 XERCES_CPP_NAMESPACE_END
    00150
    00151 #endif

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.