00001 // Copyright (C) 2005-2010 Code Synthesis Tools CC 00002 // 00003 // This program was generated by CodeSynthesis XSD, an XML Schema to 00004 // C++ data binding compiler. 00005 // 00006 // This program is free software; you can redistribute it and/or modify 00007 // it under the terms of the GNU General Public License version 2 as 00008 // published by the Free Software Foundation. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program; if not, write to the Free Software 00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 // 00019 // In addition, as a special exception, Code Synthesis Tools CC gives 00020 // permission to link this program with the Xerces-C++ library (or with 00021 // modified versions of Xerces-C++ that use the same license as Xerces-C++), 00022 // and distribute linked combinations including the two. You must obey 00023 // the GNU General Public License version 2 in all respects for all of 00024 // the code used other than Xerces-C++. If you modify this copy of the 00025 // program, you may extend this exception to your version of the program, 00026 // but you are not obligated to do so. If you do not wish to do so, delete 00027 // this exception statement from your version. 00028 // 00029 // Furthermore, Code Synthesis Tools CC makes a special exception for 00030 // the Free/Libre and Open Source Software (FLOSS) which is described 00031 // in the accompanying FLOSSE file. 00032 // 00033 00034 // Begin prologue. 00035 // 00036 // 00037 // End prologue. 00038 00039 #include "nd-pskel.hxx" 00040 00041 // nd_pskel 00042 // 00043 00044 void nd_pskel:: 00045 ref_parser (::xml_schema::long_pskel& p) 00046 { 00047 this->ref_parser_ = &p; 00048 } 00049 00050 void nd_pskel:: 00051 parsers (::xml_schema::long_pskel& ref) 00052 { 00053 this->ref_parser_ = &ref; 00054 } 00055 00056 nd_pskel:: 00057 nd_pskel () 00058 : ref_parser_ (0), 00059 v_state_attr_stack_ (sizeof (v_state_attr_), &v_state_attr_first_) 00060 { 00061 } 00062 00063 // nd_pskel 00064 // 00065 00066 void nd_pskel:: 00067 ref (long long) 00068 { 00069 } 00070 00071 #include <cassert> 00072 00073 // Attribute validation and dispatch functions for nd_pskel. 00074 // 00075 bool nd_pskel:: 00076 _attribute_impl_phase_one (const ::xml_schema::ro_string& ns, 00077 const ::xml_schema::ro_string& n, 00078 const ::xml_schema::ro_string& s) 00079 { 00080 if (n == "ref" && ns.empty ()) 00081 { 00082 if (this->ref_parser_) 00083 { 00084 this->ref_parser_->pre (); 00085 this->ref_parser_->_pre_impl (); 00086 this->ref_parser_->_characters (s); 00087 this->ref_parser_->_post_impl (); 00088 long long tmp (this->ref_parser_->post_long ()); 00089 this->ref (tmp); 00090 } 00091 00092 static_cast< v_state_attr_* > (this->v_state_attr_stack_.top ())->ref = true; 00093 return true; 00094 } 00095 00096 return false; 00097 } 00098 00099 void nd_pskel:: 00100 _pre_a_validate () 00101 { 00102 this->v_state_attr_stack_.push (); 00103 v_state_attr_& as = *static_cast< v_state_attr_* > (this->v_state_attr_stack_.top ()); 00104 00105 as.ref = false; 00106 } 00107 00108 void nd_pskel:: 00109 _post_a_validate () 00110 { 00111 v_state_attr_& as = *static_cast< v_state_attr_* > (this->v_state_attr_stack_.top ()); 00112 00113 if (!as.ref) 00114 this->_expected_attribute ( 00115 "", "ref"); 00116 00117 this->v_state_attr_stack_.pop (); 00118 } 00119 00120 // Begin epilogue. 00121 // 00122 // 00123 // End epilogue. 00124