/* openDCM, dimensional constraint manager Copyright (C) 2013 Stefan Troeger This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef DCM_PROPERTY_PARSER_IMP_H #define DCM_PROPERTY_PARSER_IMP_H #include "property_parser.hpp" #include #include namespace dcm { typedef boost::spirit::istream_iterator IIterator; namespace details { template typename boost::enable_if >, void >::type recursive_init( srs& sseq, prs& pseq ) { if(dist::value == 0) { fusion::at(pseq) %= fusion::at(sseq)(qi::_r1); } else { fusion::at(pseq) %= fusion::at >::type >::type>(pseq)(qi::_r1) | fusion::at(sseq)(qi::_r1); } recursive_init::type>(sseq, pseq); }; template typename boost::disable_if >, void >::type recursive_init( srs& sseq, prs& pseq ){}; template prop_parser::prop_parser() : prop_parser::base_type(start) { typedef typename mpl::find::type::pos pos; Par::init(subrule); start = qi::lit("") >> subrule[phx::at_c(*qi::_r1) = qi::_1] >> qi::lit(""); }; template prop_par::prop_par() : prop_par::base_type(prop) { recursive_init::type, typename fusion::result_of::as_vector::type, mpl::int_<0> >(sub_rules, parent_rules); prop = *(fusion::back(parent_rules)(&qi::_val)); }; template cluster_prop_par::cluster_prop_par() : prop_par() {}; template vertex_prop_par::vertex_prop_par() : prop_par() {}; template edge_prop_par::edge_prop_par() : prop_par() {}; } //DCM } //details #endif