http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XMLGrammarDescription.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-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  * $Log: XMLGrammarDescription.hpp,v $
00019  * Revision 1.3  2004/09/08 13:55:59  peiyongz
00020  * Apache License Version 2.0
00021  *
00022  * Revision 1.2  2003/10/14 15:17:47  peiyongz
00023  * Implementation of Serialization/Deserialization
00024  *
00025  * Revision 1.1  2003/06/20 18:37:39  peiyongz
00026  * Stateless Grammar Pool :: Part I
00027  *
00028  * $Id: XMLGrammarDescription.hpp,v 1.3 2004/09/08 13:55:59 peiyongz Exp $
00029  *
00030  */
00031 
00032 #if !defined(XMLGRAMMARDESCRIPTION_HPP)
00033 #define XMLGRAMMARDESCRIPTION_HPP
00034 
00035 #include <xercesc/util/XMemory.hpp>
00036 #include <xercesc/validators/common/Grammar.hpp>
00037 
00038 #include <xercesc/internal/XSerializable.hpp>
00039 
00040 XERCES_CPP_NAMESPACE_BEGIN
00041 
00042 class  XMLGrammarDescription : public XSerializable, public XMemory
00043 {
00044 public :
00045     // -----------------------------------------------------------------------
00047     // -----------------------------------------------------------------------
00049 
00053     virtual ~XMLGrammarDescription();
00055 
00056     // -----------------------------------------------------------------------
00058     // -----------------------------------------------------------------------
00060 
00064     virtual Grammar::GrammarType   getGrammarType() const = 0;
00065     
00070     virtual const XMLCh*           getGrammarKey() const = 0;    
00072     
00073     inline MemoryManager*          getMemoryManager() const;
00074 
00075     /***
00076      * Support for Serialization/De-serialization
00077      ***/
00078     DECL_XSERIALIZABLE(XMLGrammarDescription)
00079 
00080 protected :
00081     // -----------------------------------------------------------------------
00083     // -----------------------------------------------------------------------
00085     XMLGrammarDescription(MemoryManager* const memMgr = XMLPlatformUtils::fgMemoryManager);
00087 
00088 private :
00089     // -----------------------------------------------------------------------
00091     // -----------------------------------------------------------------------
00093     XMLGrammarDescription(const XMLGrammarDescription& );
00094     XMLGrammarDescription& operator=(const XMLGrammarDescription& );
00096 
00097     // -----------------------------------------------------------------------
00098     //
00099     // fMemMgr: plugged-in (or defaulted-in) memory manager, 
00100     //          not owned 
00101     //          no reset after initialization
00102     //          allow derivatives to access directly
00103     //
00104     // -----------------------------------------------------------------------    
00105     MemoryManager* const  fMemMgr;     
00106 };
00107 
00108 inline MemoryManager* XMLGrammarDescription::getMemoryManager() const
00109 {
00110     return fMemMgr;
00111 }
00112 
00113 XERCES_CPP_NAMESPACE_END
00114 
00115 #endif


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