Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:27:05

0001 /*
0002  * Licensed to the Apache Software Foundation (ASF) under one or more
0003  * contributor license agreements.  See the NOTICE file distributed with
0004  * this work for additional information regarding copyright ownership.
0005  * The ASF licenses this file to You under the Apache License, Version 2.0
0006  * (the "License"); you may not use this file except in compliance with
0007  * the License.  You may obtain a copy of the License at
0008  * 
0009  *      http://www.apache.org/licenses/LICENSE-2.0
0010  * 
0011  * Unless required by applicable law or agreed to in writing, software
0012  * distributed under the License is distributed on an "AS IS" BASIS,
0013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014  * See the License for the specific language governing permissions and
0015  * limitations under the License.
0016  */
0017 
0018 /*
0019  * $Id$
0020  */
0021 
0022 #if !defined(XERCESC_INCLUDE_GUARD_XMLGRAMMARDESCRIPTION_HPP)
0023 #define XERCESC_INCLUDE_GUARD_XMLGRAMMARDESCRIPTION_HPP
0024 
0025 #include <xercesc/util/XMemory.hpp>
0026 #include <xercesc/validators/common/Grammar.hpp>
0027 
0028 #include <xercesc/internal/XSerializable.hpp>
0029 
0030 XERCES_CPP_NAMESPACE_BEGIN
0031 
0032 class XMLPARSER_EXPORT XMLGrammarDescription : public XSerializable, public XMemory
0033 {
0034 public :
0035     // -----------------------------------------------------------------------
0036     /** @name Virtual destructor for derived classes */
0037     // -----------------------------------------------------------------------
0038     //@{
0039     /**
0040       * virtual destructor
0041       *
0042       */
0043     virtual ~XMLGrammarDescription();
0044     //@}
0045 
0046     // -----------------------------------------------------------------------
0047     /** @name The Grammar Description Interface */
0048     // -----------------------------------------------------------------------
0049     //@{     
0050     /**
0051       * getGrammarType
0052       *
0053       */
0054     virtual Grammar::GrammarType   getGrammarType() const = 0;
0055     
0056     /**
0057       * getGrammarKey
0058       *
0059       */
0060     virtual const XMLCh*           getGrammarKey() const = 0;    
0061     //@}
0062     
0063     inline MemoryManager*          getMemoryManager() const;
0064 
0065     /***
0066      * Support for Serialization/De-serialization
0067      ***/
0068     DECL_XSERIALIZABLE(XMLGrammarDescription)
0069 
0070 protected :
0071     // -----------------------------------------------------------------------
0072     /**  Hidden Constructors */
0073     // -----------------------------------------------------------------------
0074     //@{
0075     XMLGrammarDescription(MemoryManager* const memMgr = XMLPlatformUtils::fgMemoryManager);
0076     //@}
0077 
0078 private :
0079     // -----------------------------------------------------------------------
0080     /** name  Unimplemented copy constructor and operator= */
0081     // -----------------------------------------------------------------------
0082     //@{
0083     XMLGrammarDescription(const XMLGrammarDescription& );
0084     XMLGrammarDescription& operator=(const XMLGrammarDescription& );
0085     //@}
0086 
0087     // -----------------------------------------------------------------------
0088     //
0089     // fMemMgr: plugged-in (or defaulted-in) memory manager, 
0090     //          not owned 
0091     //          no reset after initialization
0092     //          allow derivatives to access directly
0093     //
0094     // -----------------------------------------------------------------------    
0095     MemoryManager* const  fMemMgr;     
0096 };
0097 
0098 inline MemoryManager* XMLGrammarDescription::getMemoryManager() const
0099 {
0100     return fMemMgr;
0101 }
0102 
0103 XERCES_CPP_NAMESPACE_END
0104 
0105 #endif