| API Docs for SAX and DOM |

- Main Page
- Classes
- Files
- Related Pages

# XSObject.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Licensed to the Apache Software Foundation (ASF) under one or more
    00003  * contributor license agreements.  See the NOTICE file distributed with
    00004  * this work for additional information regarding copyright ownership.
    00005  * The ASF licenses this file to You under the Apache License, Version 2.0
    00006  * (the "License"); you may not use this file except in compliance with
    00007  * the License.  You may obtain a copy of the License at
    00008  *
    00009  *      http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  * Unless required by applicable law or agreed to in writing, software
    00012  * 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 and
    00015  * 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_HPP
    00024
    00025 #include <xercesc/util/PlatformUtils.hpp>
    00026 #include <xercesc/framework/psvi/XSConstants.hpp>
    00027
    00028 XERCES_CPP_NAMESPACE_BEGIN
    00029
    00038 // forward declarations
    00039 class XSNamespaceItem;
    00040 class XSModel;
    00041
    00042 class  XSObject : public XMemory
    00043 {
    00044 public:
    00045
    00046     //  Constructors and Destructor
    00047     // -----------------------------------------------------------------------
    00050
    00058     XSObject
    00059     (
    00060         XSConstants::COMPONENT_TYPE compType
    00061         , XSModel* const xsModel
    00062         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
    00063     );
    00064
    00066
    00069     virtual ~XSObject();
    00071
    00072     //---------------------
    00076
    00081     XSConstants::COMPONENT_TYPE getType() const;
    00082
    00087     virtual const XMLCh* getName();
    00088
    00093     virtual const XMLCh* getNamespace();
    00094
    00100     virtual XSNamespaceItem *getNamespaceItem();
    00101
    00108     virtual unsigned int getId() const;
    00109
    00111
    00112     //----------------------------------
    00119     void setId(unsigned int id);
    00121
    00122 private:
    00123
    00124     // -----------------------------------------------------------------------
    00125     //  Unimplemented constructors and operators
    00126     // -----------------------------------------------------------------------
    00127     XSObject(const XSObject&);
    00128     XSObject & operator=(const XSObject &);
    00129
    00130 protected:
    00131
    00132     // -----------------------------------------------------------------------
    00133     //  data members
    00134     // -----------------------------------------------------------------------
    00135     // fMemoryManager:
    00136     //  used for any memory allocations
    00137     // fComponentType
    00138     //  the type of the actual component
    00139     XSConstants::COMPONENT_TYPE fComponentType;
    00140     XSModel*                    fXSModel;
    00141     MemoryManager*              fMemoryManager;
    00142     unsigned int                fId;
    00143 };
    00144
    00145 inline XSConstants::COMPONENT_TYPE XSObject::getType() const
    00146 {
    00147     return fComponentType;
    00148 }
    00149
    00150 XERCES_CPP_NAMESPACE_END
    00151
    00152 #endif

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