00001 /*00002 * The Software License00003 * =================================================================================00004 * Copyright (c) 2003-.The Terimber Corporation. All rights reserved.00005 * =================================================================================00006 * Redistributions of source code must retain the above copyright notice, 00007 * this list of conditions and the following disclaimer.00008 * Redistributions in binary form must reproduce the above copyright notice, 00009 * this list of conditions and the following disclaimer in the documentation 00010 * and/or other materials provided with the distribution.00011 * The end-user documentation included with the redistribution, if any, 00012 * must include the following acknowledgment:00013 * "This product includes software developed by the Terimber Corporation."00014 * =================================================================================00015 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, 00016 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 00017 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00018 * IN NO EVENT SHALL THE TERIMBER CORPORATION OR ITS CONTRIBUTORS BE LIABLE FOR 00019 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00020 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00021 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 00022 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT00023 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE00024 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.00025 * ================================================================================00026 */00027
00028 #ifndef _terimber_sxs_hpp_00029 #define _terimber_sxs_hpp_00030
00031 #include "xml/sxs.h"00032 #include "base/except.h"00033
00034 BEGIN_TERIMBER_NAMESPACE00035 #pragma pack(4)00036
00037 inline00038 xmlNodeType00039nodeDecl::get_type() const00040 {
00041 return_type;
00042 }
00043
00045 inline00046 byte_allocator&
00047xml_grammar::get_data_allocator()
00048 {
00049 return_data_allocator;
00050 }
00051
00052 inline00053 byte_allocator&
00054xml_grammar::get_tmp_allocator()
00055 {
00056 return_tmp_allocator;
00057 }
00058
00059 inline00060 constnamedNodeDecl*
00061xml_grammar::get_document_decl() const 00062 {
00063 return &_document_decl;
00064 }
00065
00066 inline00067 constnamedNodeDecl*
00068xml_grammar::get_doctype_decl() const 00069 {
00070 return &_doctype_decl;
00071 }
00072
00073 inline00074 constnamedNodeDecl*
00075xml_grammar::get_comment_decl() const 00076 {
00077 return &_comment_decl;
00078 }
00079
00080 inline00081 constnamedNodeDecl*
00082xml_grammar::get_cdata_decl() const 00083 {
00084 return &_cdata_decl;
00085 }
00086
00087 inline00088 void00089xml_grammar::clear()
00090 {
00091 _elementMap.clear();
00092 _notationMap.clear();
00093 _entityMap.clear();
00094 _attributeRefMap.clear();
00095 _piMap.clear();
00096 _doc_name = 0;
00097 _public_id = 0;
00098 _system_id = 0;
00099 _data_allocator.clear_extra();
00100 _tmp_allocator.clear_extra();
00101 }
00102
00103 inline00104 constelement_decl_map_t&
00105xml_grammar::get_elementMap() const 00106 {
00107 return_elementMap;
00108 }
00109
00110 inline00111 constnamednode_decl_map_t&
00112xml_grammar::get_piMap() const 00113 {
00114 return_piMap;
00115 }
00116
00117 inline00118 constentity_decl_map_t&
00119xml_grammar::get_entityMap() const 00120 {
00121 return_entityMap;
00122 }
00123
00124 inline00125 constnotation_decl_map_t&
00126xml_grammar::get_notationMap() const 00127 {
00128 return_notationMap;
00129 }
00130
00131 xml_forceinline00132 void00133xml_grammar::check_readonly()
00134 {
00135 if (_read_only) exception::_throw("External grammar has been provided");
00136 }
00137
00138
00139 #pragma pack()00140 END_TERIMBER_NAMESPACE00141
00142 #endif // _terimber_sxs_hpp_