From: <br...@us...> - 2010-06-06 19:11:25
|
Revision: 4155 http://openvrml.svn.sourceforge.net/openvrml/?rev=4155&view=rev Author: braden Date: 2010-06-06 19:11:18 +0000 (Sun, 06 Jun 2010) Log Message: ----------- Added MFDouble parsing. Modified Paths: -------------- trunk/ChangeLog trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-06-03 01:50:18 UTC (rev 4154) +++ trunk/ChangeLog 2010-06-06 19:11:18 UTC (rev 4155) @@ -1,3 +1,8 @@ +2010-06-06 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/x3d_vrml_grammar.h: Added MFDouble + parsing. + 2010-06-02 Braden McDaniel <br...@en...> Updates for 0.18.6 release. Modified: trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h =================================================================== --- trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h 2010-06-03 01:50:18 UTC (rev 4154) +++ trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h 2010-06-06 19:11:18 UTC (rev 4155) @@ -307,6 +307,11 @@ {} } on_mfcolorrgba; + struct on_mfdouble_t { + void operator()(const std::vector<double> & /* val */) const + {} + } on_mfdouble; + struct on_mfimage_t { void operator()(const std::vector<image> & /* val */) const {} @@ -652,6 +657,13 @@ static const boost::spirit::classic::functor_parser< typename base_t::template mftype_parser< + boost::spirit::classic::real_parser< + double, + boost::spirit::classic::real_parser_policies<double> > > > + mfdouble_p; + + static const boost::spirit::classic::functor_parser< + typename base_t::template mftype_parser< boost::spirit::classic::functor_parser<openvrml::image_parser> > > mfimage_p; @@ -692,6 +704,9 @@ case field_value::mfcolorrgba_id: r = mfcolorrgba_p[base_t::self.actions.on_mfcolorrgba]; break; + case field_value::mfdouble_id: + r = mfdouble_p[base_t::self.actions.on_mfdouble]; + break; case field_value::mfimage_id: r = mfimage_p[base_t::self.actions.on_mfimage]; break; @@ -733,6 +748,23 @@ template <typename ScannerT> const boost::spirit::classic::functor_parser< typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>:: + template mftype_parser< + boost::spirit::classic::real_parser< + double, + boost::spirit::classic::real_parser_policies<double> > > > + x3d_vrml_grammar<Actions, ErrorHandler>::definition<ScannerT>::mfdouble_p = + typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>:: + template mftype_parser< + boost::spirit::classic::real_parser< + double, + boost::spirit::classic::real_parser_policies<double> + > + >(boost::spirit::classic::real_p); + + template <typename Actions, typename ErrorHandler> + template <typename ScannerT> + const boost::spirit::classic::functor_parser< + typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>:: template mftype_parser<boost::spirit::classic::functor_parser<openvrml::color_rgba_parser> > > x3d_vrml_grammar<Actions, ErrorHandler>::definition<ScannerT>::mfcolorrgba_p = typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>:: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |