You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(128) |
Dec
(65) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(48) |
Feb
(132) |
Mar
(95) |
Apr
(47) |
May
(54) |
Jun
(2) |
Jul
(57) |
Aug
(109) |
Sep
(131) |
Oct
(186) |
Nov
(105) |
Dec
(78) |
2007 |
Jan
(125) |
Feb
(105) |
Mar
(52) |
Apr
(104) |
May
(63) |
Jun
(116) |
Jul
(76) |
Aug
|
Sep
(18) |
Oct
(93) |
Nov
(110) |
Dec
(169) |
2008 |
Jan
(90) |
Feb
(64) |
Mar
(41) |
Apr
(23) |
May
(6) |
Jun
(18) |
Jul
(10) |
Aug
(61) |
Sep
(139) |
Oct
(50) |
Nov
(55) |
Dec
(2) |
2009 |
Jan
|
Feb
(1) |
Mar
(62) |
Apr
(22) |
May
(17) |
Jun
(19) |
Jul
(40) |
Aug
(21) |
Sep
|
Oct
(40) |
Nov
(23) |
Dec
|
2010 |
Jan
(14) |
Feb
(40) |
Mar
(9) |
Apr
(11) |
May
(19) |
Jun
(4) |
Jul
(10) |
Aug
(22) |
Sep
(15) |
Oct
|
Nov
(2) |
Dec
|
2011 |
Jan
(13) |
Feb
(10) |
Mar
|
Apr
(13) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(33) |
May
(20) |
Jun
|
Jul
(8) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Braden M. <br...@us...> - 2007-10-14 16:48:23
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28940/src/libopenvrml/openvrml Modified Files: Tag: OpenVRML-Spirit-BRANCH browser.cpp Log Message: Avoid symbol collision. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.225.2.1 retrieving revision 1.225.2.2 diff -C2 -d -r1.225.2.1 -r1.225.2.2 *** browser.cpp 13 Oct 2007 18:26:54 -0000 1.225.2.1 --- browser.cpp 14 Oct 2007 16:48:23 -0000 1.225.2.2 *************** *** 4751,4755 **** # ifndef OPENVRML_ENABLE_ANTLR_PARSER using boost::spirit::skip_parser_iteration_policy; - using boost::spirit::scanner_policies; using boost::spirit::multi_pass; using boost::spirit::make_multi_pass; --- 4751,4754 ---- *************** *** 4760,4764 **** typedef skip_parser_iteration_policy<vrml97_skip_grammar> iterator_policy_t; ! typedef scanner_policies<iterator_policy_t> scanner_policies_t; typedef multi_pass<istreambuf_iterator<char> > multi_pass_iterator_t; --- 4759,4764 ---- typedef skip_parser_iteration_policy<vrml97_skip_grammar> iterator_policy_t; ! typedef boost::spirit::scanner_policies<iterator_policy_t> ! scanner_policies_t; typedef multi_pass<istreambuf_iterator<char> > multi_pass_iterator_t; |
From: Braden M. <br...@us...> - 2007-10-13 18:26:57
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14422/src/libopenvrml/openvrml Modified Files: Tag: OpenVRML-Spirit-BRANCH basetypes.cpp basetypes.h browser.cpp browser.h node.cpp node.h Added Files: vrml97_grammar.cpp vrml97_grammar.h Log Message: Initial check-in of Spirit parser work. Index: node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.cpp,v retrieving revision 1.96 retrieving revision 1.96.2.1 diff -C2 -d -r1.96 -r1.96.2.1 *** node.cpp 26 Sep 2007 04:57:55 -0000 1.96 --- node.cpp 13 Oct 2007 18:26:54 -0000 1.96.2.1 *************** *** 28,32 **** # include <sstream> # include <boost/array.hpp> - # include <boost/bind.hpp> # include <boost/lexical_cast.hpp> # include <boost/mpl/for_each.hpp> --- 28,31 ---- *************** *** 230,233 **** --- 229,234 ---- /** + * @fn openvrml::node_interface::node_interface(type_id type, field_value::type_id field_type, const std::string & id) + * * @brief Constructor. * *************** *** 236,246 **** * @param[in] id the name of the interface. */ - openvrml::node_interface::node_interface(const type_id type, - const field_value::type_id field_type, - const std::string & id): - type(type), - field_type(field_type), - id(id) - {} /** --- 237,240 ---- *************** *** 509,512 **** --- 503,508 ---- /** + * @fn const openvrml::node_interface_set::const_iterator openvrml::find_interface(const node_interface_set & interfaces, const std::string & id) + * * @brief Find an interface matching @p id. * *************** *** 524,547 **** * if no interface is found. */ - const openvrml::node_interface_set::const_iterator - openvrml::find_interface(const node_interface_set & interfaces, - const std::string & id) - OPENVRML_NOTHROW - { - using std::find_if; - using boost::bind; - node_interface_set::const_iterator pos = - find_if(interfaces.begin(), interfaces.end(), - bind(node_interface_matches_field(), _1, id)); - if (pos == interfaces.end()) { - using std::logical_or; - - pos = find_if(interfaces.begin(), interfaces.end(), - bind(logical_or<bool>(), - bind(node_interface_matches_eventin(), _1, id), - bind(node_interface_matches_eventout(), _1, id))); - } - return pos; - } --- 520,523 ---- Index: node.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.h,v retrieving revision 1.62 retrieving revision 1.62.2.1 diff -C2 -d -r1.62 -r1.62.2.1 *** node.h 29 Jul 2007 07:13:33 -0000 1.62 --- node.h 13 Oct 2007 18:26:54 -0000 1.62.2.1 *************** *** 27,30 **** --- 27,31 ---- # include <set> # include <utility> + # include <boost/bind.hpp> # include <boost/thread/recursive_mutex.hpp> # include <openvrml/field_value.h> *************** *** 49,52 **** --- 50,54 ---- std::string id; + node_interface(); node_interface(type_id type, field_value::type_id field_type, *************** *** 54,57 **** --- 56,72 ---- }; + inline node_interface::node_interface(): + type(invalid_type_id), + field_type(field_value::invalid_type_id) + {} + + inline node_interface::node_interface(const type_id type, + const field_value::type_id field_type, + const std::string & id): + type(type), + field_type(field_type), + id(id) + {} + OPENVRML_API std::ostream & operator<<(std::ostream & out, node_interface::type_id type); *************** *** 174,182 **** node_interface_set; ! OPENVRML_API const node_interface_set::const_iterator find_interface(const node_interface_set & interfaces, const std::string & id) ! OPENVRML_NOTHROW; class OPENVRML_API node_metatype_id { --- 189,212 ---- node_interface_set; ! inline const node_interface_set::const_iterator find_interface(const node_interface_set & interfaces, const std::string & id) ! OPENVRML_NOTHROW ! { ! using std::find_if; ! using boost::bind; ! node_interface_set::const_iterator pos = ! find_if(interfaces.begin(), interfaces.end(), ! bind(node_interface_matches_field(), _1, id)); ! if (pos == interfaces.end()) { ! using std::logical_or; + pos = find_if(interfaces.begin(), interfaces.end(), + bind(logical_or<bool>(), + bind(node_interface_matches_eventin(), _1, id), + bind(node_interface_matches_eventout(), _1, id))); + } + return pos; + } class OPENVRML_API node_metatype_id { --- NEW FILE: vrml97_grammar.h --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- // // OpenVRML // // Copyright 2007 Braden McDaniel // // 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA [...2848 lines suppressed...] vrml97_grammar<ErrorHandler, Actions>::definition<ScannerT>::start() const { return this->vrml_scene; } } // namespace openvrml # ifdef BOOST_SPIRIT_DEBUG namespace std { template <typename C, typename E> std::basic_ostream<C, E> & operator<<(std::basic_ostream<C, E> & out, const openvrml::node_type_decl & node_type) { return out << node_type.first; } } # endif # endif // ifndef OPENVRML_VRML97_GRAMMAR_H Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.225 retrieving revision 1.225.2.1 diff -C2 -d -r1.225 -r1.225.2.1 *** browser.cpp 11 Oct 2007 05:00:27 -0000 1.225 --- browser.cpp 13 Oct 2007 18:26:54 -0000 1.225.2.1 *************** *** 40,43 **** --- 40,44 ---- # include <boost/enable_shared_from_this.hpp> # include <boost/functional.hpp> + # include <boost/lexical_cast.hpp> # include <boost/mpl/for_each.hpp> # include <boost/ptr_container/ptr_map.hpp> *************** *** 46,49 **** --- 47,51 ---- # include <private.h> [...6706 lines suppressed...] + using openvrml::node_type_decls; + + std::auto_ptr<node_type_decls> node_type_descs(new node_type_decls); + for (map_t::const_iterator entry = this->components_.begin(); + entry != this->components_.end(); + ++entry) { + try { + const component & c = ::component_registry_.at(entry->first); + c.add_to_node_type_desc_map(*node_type_descs); + } catch (boost::bad_ptr_container_operation & ex) { + OPENVRML_PRINT_EXCEPTION_(ex); + } catch (std::invalid_argument & ex) { + OPENVRML_PRINT_EXCEPTION_(ex); + } + } + return node_type_descs; + } + const char * const vrml97_profile::id = "VRML97"; Index: browser.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.h,v retrieving revision 1.71 retrieving revision 1.71.2.1 diff -C2 -d -r1.71 -r1.71.2.1 *** browser.h 31 May 2007 14:53:55 -0000 1.71 --- browser.h 13 Oct 2007 18:26:54 -0000 1.71.2.1 *************** *** 1,3 **** ! // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML --- 1,3 ---- ! // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- // // OpenVRML *************** *** 179,191 **** --- 179,200 ---- class null_node_metatype; class null_node_type; + class externproto_node; class OPENVRML_API browser : boost::noncopyable { friend class scene; + friend class externproto_node; + # ifdef OPENVRML_ENABLE_ANTLR_PARSER friend class Vrml97Parser; friend class X3DVrmlParser; + # endif friend bool OPENVRML_API operator==(const node_type &, const node_type &) OPENVRML_NOTHROW; struct root_scene_loader; + class externproto_node_metatype; + class externproto_node_type; + # ifndef OPENVRML_ENABLE_ANTLR_PARSER + struct vrml97_parse_actions; + # endif class OPENVRML_LOCAL node_metatype_map { *************** *** 228,231 **** --- 237,249 ---- }; + OPENVRML_LOCAL static void + parse_vrml( + std::istream & in, + const std::string & uri, + const std::string & type, + const openvrml::scene & scene, + std::vector<boost::intrusive_ptr<openvrml::node> > & nodes, + std::map<std::string, std::string> & meta); + const boost::scoped_ptr<null_node_metatype> null_node_metatype_; const boost::scoped_ptr<null_node_type> null_node_type_; --- NEW FILE: vrml97_grammar.cpp --- /** * @class openvrml::vrml97_space_parser openvrml/vrml97_grammar.h * * @brief A <a href="http://spirit.sourceforge.net">Spirit</a> space parser * appropriate for use with VRML97 and VRML-encoded X3D. */ /** * @typedef openvrml::vrm97_space_parser openvrml::vrml97_space_parser::self_t * * @brief Self type. */ /** * @fn bool openvrml::vrml97_space_parser::test(const CharT &) const * * @brief Test for a match. * * @param[in] c a character. * * @return @c true for whitespace characters or comma (“,”); * @c false otherwise. */ /** * @var const openvrml::vrml97_space_parser openvrml::vrml97_space_p * * @brief A <a href="http://spirit.sourceforge.net">Spirit</a> space parser * appropriate for use with VRML97 and VRML-encoded X3D. */ /** * @class openvrml::vrml97_skip_grammar openvrml/vrml97_grammar.h * * @brief A <a href="http://spirit.sourceforge.net">Spirit</a> grammar * appropriate for use as a skip parser for VRML97 and VRML-encoded * X3D. */ /** * @internal * * @struct openvrml::vrml97_skip_grammar::definition * * @brief @c vrml97_skip_grammar definition. */ /** * @typedef boost::spirit::rule<ScannerT> openvrml::vrml97_skip_grammar::definition<ScannerT>::rule_t * * @brief Rule type. */ /** * @var openvrml::vrml97_skip_grammar::definition<ScannerT>::rule_t openvrml::vrml97_skip_grammar::definition<ScannerT>::skip * * @brief The skip rule. */ /** * @fn openvrml::vrml97_skip_grammar::definition<ScannerT>::definition(const vrml97_skip_grammar &) * * @brief Construct. * * @param[in] self a reference to the grammar. */ /** * @fn openvrml::vrml97_skip_grammar::definition<ScannerT>::rule_t openvrml::vrml97_skip_grammar::definition<ScannerT>::start() const * * @brief The start rule. * * @return the start rule. */ /** * @enum openvrml::vrml_parse_error * * @brief Identifiers used to designate parse error conditions. */ /** * @var openvrml::vrml_parse_error openvrml::dot_expected * * @brief A “.” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::lbrace_expected * * @brief A “{” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::lbracket_expected * * @brief A “[” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::id_expected * * @brief An identifier was expected. */ /** * @var openvrml::vrml_parse_error openvrml::to_expected * * @brief The @c TO keyword was expected. */ /** * @var openvrml::vrml_parse_error openvrml::is_expected * * @brief The @c IS keyword was expected. */ /** * @var openvrml::vrml_parse_error openvrml::interface_type_or_rbracket_expected * * @brief An interface type or “]” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::field_type_expected * * @brief A field type was expected. */ /** * @var openvrml::vrml_parse_error openvrml::bool_expected * * @brief A keyword @c TRUE or @c FALSE was expected. */ /** * @var openvrml::vrml_parse_error openvrml::color_expected * * @brief A color value was expected. */ /** * @var openvrml::vrml_parse_error openvrml::color_or_lbracket_expected * * @brief A color value or “[” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::color_or_rbracket_expected * * @brief A color value or “]” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::float_expected * * @brief A floating-point value was expected. */ /** * @var openvrml::vrml_parse_error openvrml::float_or_lbracket_expected * * @brief A floating-point value or “[” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::float_or_rbracket_expected * * @brief A floating-point value or “]” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::image_expected * * @brief An image value was expected. */ /** * @var openvrml::vrml_parse_error openvrml::int32_expected * * @brief A integer value was expected. */ /** * @var openvrml::vrml_parse_error openvrml::int32_or_lbracket_expected * * @brief A integer value or “[” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::int32_or_rbracket_expected * * @brief A integer value or “]” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::rotation_expected * * @brief A rotation value was expected. */ /** * @var openvrml::vrml_parse_error openvrml::rotation_or_lbracket_expected * * @brief A rotation value or “[” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::rotation_or_rbracket_expected * * @brief A rotation value or “]” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::string_expected * * @brief A string value was expected. */ /** * @var openvrml::vrml_parse_error openvrml::string_or_lbracket_expected * * @brief A string value or “[” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::string_or_rbracket_expected * * @brief A string value or “]” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::vec2f_expected * * @brief A vec2f value was expected. */ /** * @var openvrml::vrml_parse_error openvrml::vec2f_or_lbracket_expected * * @brief A vec2f value or “[” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::vec2f_or_rbracket_expected * * @brief A vec2f value or “]” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::vec3f_expected * * @brief A vec3f value was expected. */ /** * @var openvrml::vrml_parse_error openvrml::vec3f_or_lbracket_expected * * @brief A vec3f value or “[” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::vec3f_or_rbracket_expected * * @brief A vec3f value or “]” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::node_expected * * @brief A node was expected. */ /** * @var openvrml::vrml_parse_error openvrml::node_or_lbracket_expected * * @brief A node or “[” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::node_or_rbracket_expected * * @brief A node or “]” was expected. */ /** * @var openvrml::vrml_parse_error openvrml::interface_collision * * @brief An interface conflicts with one that was previously declared. */ /** * @var openvrml::vrml_parse_error openvrml::unknown_node_type_id * * @brief Encountered an unknown node type identifier. */ /** * @fn std::ostream & openvrml::operator<<(std::ostream &, vrml_parse_error) * * @brief Stream output. * * @param[in,out] out output stream. * @param[in] error error identifier. * * @return @p out. */ /** * @class openvrml::vrml97_grammar openvrml/vrml97_grammar.h * * @brief A <a href="http://spirit.sourceforge.net">Spirit</a> grammar for * parsing VRML97. */ /** * @example pretty_print.cpp * * A pretty-printer using @c openvrml::vrml97_grammar. */ Index: basetypes.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/basetypes.cpp,v retrieving revision 1.44 retrieving revision 1.44.2.1 diff -C2 -d -r1.44 -r1.44.2.1 *** basetypes.cpp 11 Oct 2007 02:35:08 -0000 1.44 --- basetypes.cpp 13 Oct 2007 18:26:53 -0000 1.44.2.1 *************** *** 24,33 **** # include <numeric> # include <ostream> - # include <boost/spirit.hpp> - # include <boost/spirit/actor.hpp> - # include <boost/spirit/dynamic.hpp> - # include <boost/spirit/phoenix.hpp> # include <private.h> # include "basetypes.h" /** --- 24,30 ---- # include <numeric> # include <ostream> # include <private.h> # include "basetypes.h" + # include "vrml97_grammar.h" /** *************** *** 310,332 **** namespace { - struct OPENVRML_LOCAL vrml97_space_parser : - boost::spirit::char_parser<vrml97_space_parser> { - - typedef vrml97_space_parser self_t; - - template <typename CharT> - bool test(const CharT & c) const - { - return isspace(c) || c == ','; - } - }; - - const vrml97_space_parser vrml97_space_p = vrml97_space_parser(); - typedef std::istream::char_type char_t; typedef boost::spirit::multi_pass<std::istreambuf_iterator<char_t> > iterator_t; ! typedef boost::spirit::skip_parser_iteration_policy<vrml97_space_parser> iter_policy_t; typedef boost::spirit::scanner_policies<iter_policy_t> scanner_policies_t; --- 307,315 ---- namespace { typedef std::istream::char_type char_t; typedef boost::spirit::multi_pass<std::istreambuf_iterator<char_t> > iterator_t; ! typedef boost::spirit::skip_parser_iteration_policy<openvrml::vrml97_space_parser> iter_policy_t; typedef boost::spirit::scanner_policies<iter_policy_t> scanner_policies_t; *************** *** 334,380 **** typedef boost::spirit::rule<scanner_t> rule_t; - - - struct OPENVRML_LOCAL intensity_parser { - - typedef double result_t; - - struct valid { - explicit valid(result_t & value): - value_(value) - {} - - bool operator()() const - { - return this->value_ >= 0.0 && this->value_ <= 1.0; - } - - private: - result_t & value_; - }; - - template <typename ScannerT> - std::ptrdiff_t operator()(const ScannerT & scan, - result_t & result) const - { - using boost::spirit::assign_a; - using boost::spirit::eps_p; - using boost::spirit::real_p; - using boost::spirit::match_result; - typedef typename match_result<ScannerT, result_t>::type match_t; - typedef typename boost::spirit::rule<ScannerT> rule_t; - - rule_t rule - = real_p[assign_a(result)] >> eps_p(valid(result)) - ; - match_t match = rule.parse(scan); - return match.length(); - } - }; - - const boost::spirit::functor_parser<intensity_parser> intensity_p; } /** * @brief Stream input. * --- 317,325 ---- typedef boost::spirit::rule<scanner_t> rule_t; } /** + * @relatesalso openvrml::color + * * @brief Stream input. * *************** *** 382,386 **** * input are treated as whitespace. * ! * If any of the color components are outside the the range [0.0, 1.0], the * @c failbit will be set on @p in and @p c will be left in an arbitrary * state. --- 327,331 ---- * input are treated as whitespace. * ! * If any of the color components is outside the the range [0.0, 1.0], the * @c failbit will be set on @p in and @p c will be left in an arbitrary * state. *************** *** 396,401 **** using boost::spirit::make_multi_pass; using boost::spirit::match; ! using boost::spirit::real_p; ! using boost::spirit::assign_a; iter_policy_t iter_policy(vrml97_space_p); --- 341,346 ---- using boost::spirit::make_multi_pass; using boost::spirit::match; ! using phoenix::arg1; ! using phoenix::var; iter_policy_t iter_policy(vrml97_space_p); *************** *** 408,414 **** rule_t rule ! = intensity_p[assign_a(c.rgb[0])] ! >> intensity_p[assign_a(c.rgb[1])] ! >> intensity_p[assign_a(c.rgb[2])] ; --- 353,359 ---- rule_t rule ! = intensity_p[var(c.rgb[0]) = arg1] ! >> intensity_p[var(c.rgb[1]) = arg1] ! >> intensity_p[var(c.rgb[2]) = arg1] ; *************** *** 659,662 **** --- 604,609 ---- /** + * @relatesalso openvrml::color_rgba + * * @brief Stream input. * *************** *** 664,668 **** * input are treated as whitespace. * ! * If any of the color components are outside the the range [0.0, 1.0], the * @c failbit will be set on @p in and @p c will be left in an arbitrary * state. --- 611,615 ---- * input are treated as whitespace. * ! * If any of the color components is outside the the range [0.0, 1.0], the * @c failbit will be set on @p in and @p c will be left in an arbitrary * state. *************** *** 678,683 **** using boost::spirit::make_multi_pass; using boost::spirit::match; ! using boost::spirit::real_p; ! using boost::spirit::assign_a; iter_policy_t iter_policy(vrml97_space_p); --- 625,630 ---- using boost::spirit::make_multi_pass; using boost::spirit::match; ! using phoenix::arg1; ! using phoenix::var; iter_policy_t iter_policy(vrml97_space_p); *************** *** 690,697 **** rule_t rule ! = intensity_p[assign_a(c.rgba[0])] ! >> intensity_p[assign_a(c.rgba[1])] ! >> intensity_p[assign_a(c.rgba[2])] ! >> intensity_p[assign_a(c.rgba[3])]; match<> m = rule.parse(scan); --- 637,644 ---- rule_t rule ! = intensity_p[var(c.rgba[0]) = arg1] ! >> intensity_p[var(c.rgba[1]) = arg1] ! >> intensity_p[var(c.rgba[2]) = arg1] ! >> intensity_p[var(c.rgba[3]) = arg1]; match<> m = rule.parse(scan); *************** *** 1079,1082 **** --- 1026,1031 ---- /** + * @relatesalso openvrml::vec2f + * * @brief Stream input. * *************** *** 1094,1099 **** using boost::spirit::make_multi_pass; using boost::spirit::match; ! using boost::spirit::real_p; ! using boost::spirit::assign_a; iter_policy_t iter_policy(vrml97_space_p); --- 1043,1048 ---- using boost::spirit::make_multi_pass; using boost::spirit::match; ! using phoenix::arg1; ! using phoenix::var; iter_policy_t iter_policy(vrml97_space_p); *************** *** 1106,1110 **** rule_t r ! = real_p[assign_a(v.vec[0])] >> real_p[assign_a(v.vec[1])] ; --- 1055,1059 ---- rule_t r ! = float_p[var(v.vec[0]) = arg1] >> float_p[var(v.vec[1]) = arg1] ; *************** *** 1492,1495 **** --- 1441,1446 ---- /** + * @relatesalso openvrml::vec2d + * * @brief Stream input. * *************** *** 1508,1512 **** using boost::spirit::match; using boost::spirit::real_p; ! using boost::spirit::assign_a; iter_policy_t iter_policy(vrml97_space_p); --- 1459,1464 ---- using boost::spirit::match; using boost::spirit::real_p; ! using phoenix::arg1; ! using phoenix::var; iter_policy_t iter_policy(vrml97_space_p); *************** *** 1519,1523 **** rule_t r ! = real_p[assign_a(v.vec[0])] >> real_p[assign_a(v.vec[1])] ; --- 1471,1475 ---- rule_t r ! = real_p[var(v.vec[0]) = arg1] >> real_p[var(v.vec[1]) = arg1] ; *************** *** 2033,2036 **** --- 1985,1990 ---- /** + * @relatesalso openvrml::vec3f + * * @brief Stream input. * *************** *** 2048,2053 **** using boost::spirit::make_multi_pass; using boost::spirit::match; ! using boost::spirit::real_p; ! using boost::spirit::assign_a; iter_policy_t iter_policy(vrml97_space_p); --- 2002,2007 ---- using boost::spirit::make_multi_pass; using boost::spirit::match; ! using phoenix::arg1; ! using phoenix::var; iter_policy_t iter_policy(vrml97_space_p); *************** *** 2060,2066 **** rule_t r ! = real_p[assign_a(v.vec[0])] ! >> real_p[assign_a(v.vec[1])] ! >> real_p[assign_a(v.vec[2])] ; --- 2014,2020 ---- rule_t r ! = float_p[var(v.vec[0]) = arg1] ! >> float_p[var(v.vec[1]) = arg1] ! >> float_p[var(v.vec[2]) = arg1] ; *************** *** 2576,2579 **** --- 2530,2535 ---- /** + * @relatesalso openvrml::vec3d + * * @brief Stream input. * *************** *** 2592,2596 **** using boost::spirit::match; using boost::spirit::real_p; ! using boost::spirit::assign_a; iter_policy_t iter_policy(vrml97_space_p); --- 2548,2553 ---- using boost::spirit::match; using boost::spirit::real_p; ! using phoenix::arg1; ! using phoenix::var; iter_policy_t iter_policy(vrml97_space_p); *************** *** 2603,2609 **** rule_t r ! = real_p[assign_a(v.vec[0])] ! >> real_p[assign_a(v.vec[1])] ! >> real_p[assign_a(v.vec[2])] ; --- 2560,2566 ---- rule_t r ! = real_p[var(v.vec[0]) = arg1] ! >> real_p[var(v.vec[1]) = arg1] ! >> real_p[var(v.vec[2]) = arg1] ; *************** *** 3128,3133 **** using boost::spirit::match; using boost::spirit::eps_p; ! using boost::spirit::real_p; ! using boost::spirit::assign_a; iter_policy_t iter_policy(vrml97_space_p); --- 3085,3090 ---- using boost::spirit::match; using boost::spirit::eps_p; ! using phoenix::arg1; ! using phoenix::var; iter_policy_t iter_policy(vrml97_space_p); *************** *** 3141,3147 **** float x, y, z, angle; rule_t rule ! = real_p[assign_a(x)] >> real_p[assign_a(y)] >> real_p[assign_a(z)] >> eps_p(is_normalized(x, y, z)) ! >> real_p[assign_a(angle)] ; --- 3098,3106 ---- float x, y, z, angle; rule_t rule ! = float_p[var(x) = arg1] ! >> float_p[var(y) = arg1] ! >> float_p[var(z) = arg1] >> eps_p(is_normalized(x, y, z)) ! >> float_p[var(angle) = arg1] ; *************** *** 3153,3160 **** } ! rot.x(x); ! rot.y(y); ! rot.z(z); ! rot.angle(angle); return in; --- 3112,3119 ---- } ! rot.rot[0] = x; ! rot.rot[1] = y; ! rot.rot[2] = z; ! rot.rot[3] = angle; return in; *************** *** 4020,4027 **** using boost::spirit::make_multi_pass; using boost::spirit::ch_p; ! using boost::spirit::real_p; ! using boost::spirit::assign_a; ! using boost::spirit::increment_a; ! using boost::spirit::decrement_a; iter_policy_t iter_policy(vrml97_space_p); --- 3979,3984 ---- using boost::spirit::make_multi_pass; using boost::spirit::ch_p; ! using phoenix::arg1; ! using phoenix::var; iter_policy_t iter_policy(vrml97_space_p); *************** *** 4033,4064 **** scanner_t scan(first, last, policies); ! size_t row1_bracket_count = 0, row2_bracket_count = 0, row3_bracket_count = 0, ! row4_bracket_count = 0; rule_t r ! = !ch_p('[')[increment_a(row1_bracket_count)] ! >> real_p[assign_a(m[0][0])] ! >> real_p[assign_a(m[0][1])] ! >> real_p[assign_a(m[0][2])] ! >> real_p[assign_a(m[0][3])] ! >> !ch_p(']')[decrement_a(row1_bracket_count)] ! >> !ch_p('[')[increment_a(row2_bracket_count)] ! >> real_p[assign_a(m[1][0])] ! >> real_p[assign_a(m[1][1])] ! >> real_p[assign_a(m[1][2])] ! >> real_p[assign_a(m[1][3])] ! >> !ch_p(']')[decrement_a(row2_bracket_count)] ! >> !ch_p('[')[increment_a(row3_bracket_count)] ! >> real_p[assign_a(m[2][0])] ! >> real_p[assign_a(m[2][1])] ! >> real_p[assign_a(m[2][2])] ! >> real_p[assign_a(m[2][3])] ! >> !ch_p(']')[decrement_a(row3_bracket_count)] ! >> !ch_p('[')[increment_a(row4_bracket_count)] ! >> real_p[assign_a(m[3][0])] ! >> real_p[assign_a(m[3][1])] ! >> real_p[assign_a(m[3][2])] ! >> real_p[assign_a(m[3][3])] ! >> !ch_p(']')[decrement_a(row4_bracket_count)] ; --- 3990,4021 ---- scanner_t scan(first, last, policies); ! size_t row1_bracket_count = 0, row2_bracket_count = 0, ! row3_bracket_count = 0, row4_bracket_count = 0; rule_t r ! = !ch_p('[')[var(row1_bracket_count) += 1] ! >> float_p[var(m[0][0]) = arg1] ! >> float_p[var(m[0][1]) = arg1] ! >> float_p[var(m[0][2]) = arg1] ! >> float_p[var(m[0][3]) = arg1] ! >> !ch_p(']')[var(row1_bracket_count) -= 1] ! >> !ch_p('[')[var(row2_bracket_count) += 1] ! >> float_p[var(m[1][0]) = arg1] ! >> float_p[var(m[1][1]) = arg1] ! >> float_p[var(m[1][2]) = arg1] ! >> float_p[var(m[1][3]) = arg1] ! >> !ch_p(']')[var(row2_bracket_count) -= 1] ! >> !ch_p('[')[var(row3_bracket_count) += 1] ! >> float_p[var(m[2][0]) = arg1] ! >> float_p[var(m[2][1]) = arg1] ! >> float_p[var(m[2][2]) = arg1] ! >> float_p[var(m[2][3]) = arg1] ! >> !ch_p(']')[var(row3_bracket_count) -= 1] ! >> !ch_p('[')[var(row4_bracket_count) += 1] ! >> float_p[var(m[3][0]) = arg1] ! >> float_p[var(m[3][1]) = arg1] ! >> float_p[var(m[3][2]) = arg1] ! >> float_p[var(m[3][3]) = arg1] ! >> !ch_p(']')[var(row4_bracket_count) -= 1] ; *************** *** 4623,4628 **** using boost::spirit::make_multi_pass; using boost::spirit::match; ! using boost::spirit::real_p; ! using boost::spirit::assign_a; iter_policy_t iter_policy(vrml97_space_p); --- 4580,4585 ---- using boost::spirit::make_multi_pass; using boost::spirit::match; ! using phoenix::arg1; ! using phoenix::var; iter_policy_t iter_policy(vrml97_space_p); *************** *** 4635,4642 **** rule_t r ! = real_p[assign_a(q.quat[0])] ! >> real_p[assign_a(q.quat[1])] ! >> real_p[assign_a(q.quat[2])] ! >> real_p[assign_a(q.quat[3])] ; --- 4592,4599 ---- rule_t r ! = float_p[var(q.quat[0]) = arg1] ! >> float_p[var(q.quat[1]) = arg1] ! >> float_p[var(q.quat[2]) = arg1] ! >> float_p[var(q.quat[3]) = arg1] ; *************** *** 4751,4763 **** /** * @brief Construct. */ - openvrml::image::image() OPENVRML_NOTHROW: - x_(0), - y_(0), - comp_(0) - {} /** * @brief Construct. * --- 4708,4719 ---- /** + * @fn openvrml::image::image() + * * @brief Construct. */ /** + * @fn openvrml::image::image(size_t x, size_t y, size_t comp) + * * @brief Construct. * *************** *** 4766,4778 **** * @param[in] comp number of components. */ - openvrml::image::image(const size_t x, - const size_t y, - const size_t comp) - OPENVRML_THROW1(std::bad_alloc): - x_(x), - y_(y), - comp_(comp), - array_(x * y * comp) - {} /** --- 4722,4725 ---- *************** *** 4816,4831 **** /** * @brief Swap. * * @param[in,out] img an image. */ - void openvrml::image::swap(image & img) OPENVRML_NOTHROW - { - using std::swap; - swap(this->x_, img.x_); - swap(this->y_, img.y_); - swap(this->comp_, img.comp_); - swap(this->array_, img.array_); - } /** --- 4763,4772 ---- /** + * @fn void openvrml::image::swap(image & img) + * * @brief Swap. * * @param[in,out] img an image. */ /** *************** *** 5068,5098 **** size_t * const x_, * const y_, * const comp_; }; - - - struct OPENVRML_LOCAL int32_parser { - typedef openvrml::int32 result_t; - - template <typename ScannerT> - std::ptrdiff_t operator()(const ScannerT & scan, - result_t & result) const - { - using namespace boost::spirit; - using namespace phoenix; - typedef typename match_result<ScannerT, result_t>::type match_t; - match_t match - = ( lexeme_d[ - ch_p('0') >> chset_p("Xx") - >> hex_p[assign_a(result)] - ] - | int_p[assign_a(result)] - ).parse(scan); - return match.length(); - } - }; - - const boost::spirit::functor_parser<int32_parser> int32_p = int32_parser(); } /** * @brief Stream input. * --- 5009,5017 ---- size_t * const x_, * const y_, * const comp_; }; } /** + * @relatesalso openvrml::image + * * @brief Stream input. * *************** *** 5112,5119 **** using boost::spirit::match; using boost::spirit::eps_p; - using boost::spirit::int_p; using boost::spirit::repeat_p; - using boost::spirit::assign_a; - using boost::spirit::increment_a; using phoenix::arg1; using phoenix::var; --- 5031,5035 ---- *************** *** 5129,5140 **** size_t x = 0, y = 0, comp = 0, pixels = 0, index = 0; rule_t r ! = int32_p[var(pixels) = arg1][assign_a(x)] ! >> int32_p[var(pixels) *= arg1][assign_a(y)] ! >> int32_p[assign_a(comp)] // Just resize the image once we have the x, y, and comp values to // avoid unnecessary reallocation. >> eps_p[resize_image(img, x, y, comp)] >> repeat_p(ref(pixels))[ ! int32_p[set_pixel(img, index)][increment_a(index)] ] ; --- 5045,5056 ---- size_t x = 0, y = 0, comp = 0, pixels = 0, index = 0; rule_t r ! = int32_p[var(pixels) = arg1, var(x) = arg1] ! >> int32_p[var(pixels) *= arg1, var(y) = arg1] ! >> int32_p[var(comp) = arg1] // Just resize the image once we have the x, y, and comp values to // avoid unnecessary reallocation. >> eps_p[resize_image(img, x, y, comp)] >> repeat_p(ref(pixels))[ ! int32_p[set_pixel(img, index)][var(index) += 1] ] ; Index: basetypes.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/basetypes.h,v retrieving revision 1.30 retrieving revision 1.30.2.1 diff -C2 -d -r1.30 -r1.30.2.1 *** basetypes.h 11 Oct 2007 02:44:01 -0000 1.30 --- basetypes.h 13 Oct 2007 18:26:53 -0000 1.30.2.1 *************** *** 914,917 **** --- 914,933 ---- OPENVRML_NOTHROW; + inline image::image() OPENVRML_NOTHROW: + x_(0), + y_(0), + comp_(0) + {} + + inline image::image(const std::size_t x, + const std::size_t y, + const std::size_t comp) + OPENVRML_THROW1(std::bad_alloc): + x_(x), + y_(y), + comp_(comp), + array_(x * y * comp) + {} + template <typename InputIterator> image::image(const size_t x, *************** *** 934,937 **** --- 950,962 ---- } + inline void image::swap(image & img) OPENVRML_NOTHROW + { + using std::swap; + swap(this->x_, img.x_); + swap(this->y_, img.y_); + swap(this->comp_, img.comp_); + swap(this->array_, img.array_); + } + inline size_t image::x() const OPENVRML_NOTHROW { |
From: Braden M. <br...@us...> - 2007-10-13 18:26:52
|
Update of /cvsroot/openvrml/openvrml/tests In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14422/tests Modified Files: Tag: OpenVRML-Spirit-BRANCH Makefile.am parse_vrml97.cpp testsuite.at Log Message: Initial check-in of Spirit parser work. Index: testsuite.at =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/testsuite.at,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -C2 -d -r1.17 -r1.17.2.1 *** testsuite.at 18 Nov 2006 20:49:21 -0000 1.17 --- testsuite.at 13 Oct 2007 18:26:54 -0000 1.17.2.1 *************** *** 10,15 **** } ]]) ! AT_CHECK([parse-vrml97 < line-number.wrl], [0], [], ! [urn:X-openvrml:stream:1:3:17: warning: axis component of a rotation must be a normalized vector ]) AT_CLEANUP --- 10,15 ---- } ]]) ! AT_CHECK([parse-vrml97 line-number.wrl], [0], [], ! [line-number.wrl:3:17: warning: rotation axis should be a normalized vector ]) AT_CLEANUP *************** *** 21,25 **** Outer0 {} ]]) ! AT_CHECK([parse-vrml97 < proto-containment-trivial.wrl]) AT_CLEANUP --- 21,25 ---- Outer0 {} ]]) ! AT_CHECK([parse-vrml97 proto-containment-trivial.wrl]) AT_CLEANUP *************** *** 38,42 **** Outer {} ]]) ! AT_CHECK([parse-vrml97 < proto-containment-2-deep.wrl]) AT_CLEANUP --- 38,42 ---- Outer {} ]]) ! AT_CHECK([parse-vrml97 proto-containment-2-deep.wrl]) AT_CLEANUP *************** *** 54,58 **** Node1 {} ]]) ! AT_CHECK([parse-vrml97 < proto-field-is-proto.wrl]) AT_CLEANUP --- 54,58 ---- Node1 {} ]]) ! AT_CHECK([parse-vrml97 proto-field-is-proto.wrl]) AT_CLEANUP *************** *** 71,75 **** Node {} ]]) ! AT_CHECK([parse-vrml97 < proto-impl-exposedfield-event-is.wrl]) AT_CLEANUP --- 71,75 ---- Node {} ]]) ! AT_CHECK([parse-vrml97 proto-impl-exposedfield-event-is.wrl]) AT_CLEANUP *************** *** 83,87 **** } ]]) ! AT_CHECK([parse-vrml97 < route-referencing-current-node.wrl]) AT_CLEANUP --- 83,87 ---- } ]]) ! AT_CHECK([parse-vrml97 route-referencing-current-node.wrl]) AT_CLEANUP *************** *** 97,101 **** Node {} ]]) ! AT_CHECK([parse-vrml97 < def-use-in-proto-default-value.wrl]) AT_CLEANUP --- 97,101 ---- Node {} ]]) ! AT_CHECK([parse-vrml97 def-use-in-proto-default-value.wrl]) AT_CLEANUP *************** *** 115,119 **** Node {} ]]) ! AT_CHECK([parse-vrml97 < proto-in-proto-default-value.wrl]) AT_CLEANUP --- 115,119 ---- Node {} ]]) ! AT_CHECK([parse-vrml97 proto-in-proto-default-value.wrl]) AT_CLEANUP *************** *** 126,130 **** } ]]) ! AT_CHECK([parse-vrml97 < self-referential-script.wrl]) AT_CLEANUP --- 126,130 ---- } ]]) ! AT_CHECK([parse-vrml97 self-referential-script.wrl]) AT_CLEANUP *************** *** 140,144 **** Node {} ]]) ! AT_CHECK([parse-vrml97 < self-referential-script-in-proto.wrl]) AT_CLEANUP --- 140,144 ---- Node {} ]]) ! AT_CHECK([parse-vrml97 self-referential-script-in-proto.wrl]) AT_CLEANUP *************** *** 150,154 **** UnrecognizedNode { sfboolField TRUE } ]]) ! AT_CHECK([parse-vrml97 < unrecognized-externproto.wrl], [0], [ignore], --- 150,154 ---- UnrecognizedNode { sfboolField TRUE } ]]) ! AT_CHECK([parse-vrml97 unrecognized-externproto.wrl], [0], [ignore], *************** *** 162,166 **** UnimplementedNode { sfboolField TRUE } ]]) ! AT_CHECK([parse-vrml97 < unimplemented-externproto.wrl], [0], [ignore], --- 162,166 ---- UnimplementedNode { sfboolField TRUE } ]]) ! AT_CHECK([parse-vrml97 unimplemented-externproto.wrl], [0], [ignore], *************** *** 175,180 **** UnrecognizedNode {} ]]) ! AT_CHECK([parse-vrml97 < unrecognized-node.wrl], [1], [], ! [urn:X-openvrml:stream:1:2:0: error: unknown node type "UnrecognizedNode" ]) AT_CLEANUP --- 175,227 ---- UnrecognizedNode {} ]]) ! AT_CHECK([parse-vrml97 unrecognized-node.wrl], [1], [], ! [unrecognized-node.wrl:2:1: error: unknown node type identifier ! ]) ! AT_CLEANUP ! ! AT_SETUP([Unrecognized field]) ! AT_DATA([unrecognized-field.wrl], ! [[#VRML V2.0 utf8 ! EXTERNPROTO Node [ field SFBool val ] [] ! Node { wrong TRUE } ! ]]) ! AT_CHECK([parse-vrml97 unrecognized-field.wrl], [1], [], ! [unrecognized-field.wrl:3:8: error: unknown node interface identifier ! ]) ! AT_CLEANUP ! ! AT_SETUP([Provide a value for an eventIn in a PROTO]) ! AT_DATA([value-for-eventin-in-proto.wrl], ! [[#VRML V2.0 utf8 ! PROTO Node [ eventIn MFNode set_children ] { ! Group { set_children [ Group {} ] } ! } ! ]]) ! AT_CHECK([parse-vrml97 value-for-eventin-in-proto.wrl], [1], [], ! [value-for-eventin-in-proto.wrl:3:24: error: expected IS ! ]) ! AT_CLEANUP ! ! AT_SETUP([Occurrence of IS outside a PROTO]) ! AT_DATA([is-outside-proto.wrl], ! [[#VRML V2.0 utf8 ! Group { ! children IS foo ! } ! ]]) ! AT_CHECK([parse-vrml97 is-outside-proto.wrl], [1], [], ! [is-outside-proto.wrl:3:12: error: expected a node or @<:@ ! ]) ! AT_CLEANUP ! ! AT_SETUP([IS value type mismatch]) ! AT_DATA([is-value-type-mismatch.wrl], ! [[#VRML V2.0 utf8 ! PROTO Node [ exposedField SFBool val TRUE ] { ! Group { children IS val } ! } ! ]]) ! AT_CHECK([parse-vrml97 is-value-type-mismatch.wrl], [1], [], ! [is-value-type-mismatch.wrl:3:26: error: incompatible PROTO interface ]) AT_CLEANUP *************** *** 191,196 **** Node {} ]]) ! AT_CHECK([parse-vrml97 < proto-eventin-conflict.wrl], [1], [], ! [urn:X-openvrml:stream:1:4:22: error: Interface "exposedField MFNode foo" conflicts with previous declaration ]) AT_CLEANUP --- 238,243 ---- Node {} ]]) ! AT_CHECK([parse-vrml97 proto-eventin-conflict.wrl], [1], [], ! [proto-eventin-conflict.wrl:4:26: error: interface conflicts with previous declaration ]) AT_CLEANUP *************** *** 207,212 **** Node {} ]]) ! AT_CHECK([parse-vrml97 < proto-eventout-conflict.wrl], [1], [], ! [urn:X-openvrml:stream:1:4:19: error: Interface "eventOut SFColor foo_changed" conflicts with previous declaration ]) AT_CLEANUP --- 254,259 ---- Node {} ]]) ! AT_CHECK([parse-vrml97 proto-eventout-conflict.wrl], [1], [], ! [proto-eventout-conflict.wrl:4:31: error: interface conflicts with previous declaration ]) AT_CLEANUP *************** *** 223,231 **** Node {} ]]) ! AT_CHECK([parse-vrml97 < use-def-in-different-proto-default-value.wrl], [1], [], ! [urn:X-openvrml:stream:1:4:43: error: node "G" has not been defined in this scope ]) AT_CLEANUP AT_BANNER([X3D VRML parse tests: code that should be accepted]) --- 270,321 ---- Node {} ]]) ! AT_CHECK([parse-vrml97 use-def-in-different-proto-default-value.wrl], [1], [], ! [use-def-in-different-proto-default-value.wrl:4:44: error: unknown node name identifier ]) AT_CLEANUP + AT_SETUP([ROUTE from a field]) + AT_DATA([route-from-field.wrl], + [[#VRML V2.0 utf8 + PROTO FromNode [ field SFBool val TRUE ] { Group {} } + PROTO ToNode [ eventIn SFBool set_val ] { Group {} } + DEF FROM-NODE FromNode {} + DEF TO-NODE ToNode {} + ROUTE FROM-NODE.val TO TO-NODE.val + ]]) + AT_CHECK([parse-vrml97 route-from-field.wrl], [1], [], + [route-from-field.wrl:6:20: error: expected an eventOut identifier + ]) + AT_CLEANUP + + AT_SETUP([ROUTE to a field]) + AT_DATA([route-to-field.wrl], + [[#VRML V2.0 utf8 + PROTO FromNode [ eventOut SFBool val_changed ] { Group {} } + PROTO ToNode [ field SFBool val TRUE ] { Group {} } + DEF FROM-NODE FromNode {} + DEF TO-NODE ToNode {} + ROUTE FROM-NODE.val TO TO-NODE.val + ]]) + AT_CHECK([parse-vrml97 route-to-field.wrl], [1], [], + [route-to-field.wrl:6:35: error: expected an eventIn identifier + ]) + AT_CLEANUP + + AT_SETUP([ROUTE an SFInt32 to an SFBool]) + AT_DATA([route-sfint32-to-sfbool.wrl], + [[#VRML V2.0 utf8 + PROTO FromNode [ eventOut SFInt32 val_changed ] { Group {} } + PROTO ToNode [ eventIn SFBool set_val ] { Group {} } + DEF FROM-NODE FromNode {} + DEF TO-NODE ToNode {} + ROUTE FROM-NODE.val TO TO-NODE.val + ]]) + AT_CHECK([parse-vrml97 route-sfint32-to-sfbool.wrl], [1], [], + [route-sfint32-to-sfbool.wrl:6:35: error: eventIn value type does not match eventOut value type + ]) + AT_CLEANUP + + AT_BANNER([X3D VRML parse tests: code that should be accepted]) *************** *** 305,309 **** ]]) AT_CHECK([parse-x3dvrml < unsupported-component-level.x3dv], [1], [], ! [urn:X-openvrml:stream:1:3:10: error: unsupported component level ]) AT_CLEANUP --- 395,399 ---- ]]) AT_CHECK([parse-x3dvrml < unsupported-component-level.x3dv], [1], [], ! [unsupported-component-level.x3dv:3:10: error: unsupported component level ]) AT_CLEANUP Index: parse_vrml97.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/parse_vrml97.cpp,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** parse_vrml97.cpp 22 Nov 2006 00:05:19 -0000 1.3 --- parse_vrml97.cpp 13 Oct 2007 18:26:54 -0000 1.3.2.1 *************** *** 1,5 **** ! // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // ! // Copyright 2004, 2005 Braden McDaniel // // This program is free software; you can redistribute it and/or modify --- 1,5 ---- ! // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- // ! // Copyright 2007 Braden McDaniel // [...1723 lines suppressed...] + // + // WorldInfo node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::field_id, + field_value::mfstring_id, + "info"), + node_interface(node_interface::field_id, + field_value::sfstring_id, + "title") + }; + static const node_interface_set interface_set(interfaces, + interfaces + 2); + const bool succeeded = + node_types.insert(make_pair("WorldInfo", interface_set)) + .second; + assert(succeeded); + } + } Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/Makefile.am,v retrieving revision 1.18 retrieving revision 1.18.2.1 diff -C2 -d -r1.18 -r1.18.2.1 *** Makefile.am 6 Oct 2007 09:29:06 -0000 1.18 --- Makefile.am 13 Oct 2007 18:26:54 -0000 1.18.2.1 *************** *** 2,5 **** --- 2,8 ---- -I$(top_builddir)/src/libopenvrml \ -I$(top_srcdir)/src/libopenvrml \ + -DBOOST_SPIRIT_THREADSAFE \ + -DBOOST_SPIRIT_CLOSURE_LIMIT=6 \ + -DPHOENIX_LIMIT=6 \ -DBOOST_TEST_DYN_LINK AM_CXXFLAGS = $(PTHREAD_CFLAGS) *************** *** 7,11 **** TESTS_ENVIRONMENT = BOOST_TEST_REPORT_LEVEL=detailed ! TESTS = color \ rotation \ mat4f \ --- 10,15 ---- TESTS_ENVIRONMENT = BOOST_TEST_REPORT_LEVEL=detailed ! TESTS = id_parser \ ! color \ rotation \ mat4f \ *************** *** 23,45 **** libtest_openvrml_la_LIBADD = $(top_builddir)/src/libopenvrml/libopenvrml.la color_SOURCES = color.cpp color_LDADD = \ $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) rotation_SOURCES = rotation.cpp rotation_LDADD = \ $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) mat4f_SOURCES = mat4f.cpp mat4f_LDADD = \ $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) image_SOURCES = image.cpp image_LDADD = \ $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) browser_SOURCES = browser.cpp --- 27,58 ---- libtest_openvrml_la_LIBADD = $(top_builddir)/src/libopenvrml/libopenvrml.la + id_parser_SOURCES = id_parser.cpp + id_parser_LDADD = \ + -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) \ + -lboost_thread$(BOOST_LIB_SUFFIX) + color_SOURCES = color.cpp color_LDADD = \ $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) \ ! -lboost_thread$(BOOST_LIB_SUFFIX) rotation_SOURCES = rotation.cpp rotation_LDADD = \ $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) \ ! -lboost_thread$(BOOST_LIB_SUFFIX) mat4f_SOURCES = mat4f.cpp mat4f_LDADD = \ $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) \ ! -lboost_thread$(BOOST_LIB_SUFFIX) image_SOURCES = image.cpp image_LDADD = \ $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) \ ! -lboost_thread$(BOOST_LIB_SUFFIX) browser_SOURCES = browser.cpp *************** *** 47,71 **** libtest-openvrml.la \ -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) \ ! -lboost_filesystem$(BOOST_LIB_SUFFIX) parse_anchor_SOURCES = parse_anchor.cpp ! parse_anchor_LDADD = libtest-openvrml.la node_interface_set_SOURCES = node_interface_set.cpp node_interface_set_LDADD = \ $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) node_metatype_id_SOURCES = node_metatype_id.cpp node_metatype_id_LDADD = \ $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) parse_vrml97_SOURCES = parse_vrml97.cpp ! parse_vrml97_LDADD = libtest-openvrml.la parse_x3dvrml_SOURCES = parse_x3dvrml.cpp parse_x3dvrml_LDADD = libtest-openvrml.la EXTRA_DIST = \ package.m4 \ --- 60,93 ---- libtest-openvrml.la \ -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) \ ! -lboost_filesystem$(BOOST_LIB_SUFFIX) \ ! -lboost_thread$(BOOST_LIB_SUFFIX) parse_anchor_SOURCES = parse_anchor.cpp ! parse_anchor_LDADD = \ ! libtest-openvrml.la \ ! -lboost_thread$(BOOST_LIB_SUFFIX) node_interface_set_SOURCES = node_interface_set.cpp node_interface_set_LDADD = \ $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) \ ! -lboost_thread$(BOOST_LIB_SUFFIX) node_metatype_id_SOURCES = node_metatype_id.cpp node_metatype_id_LDADD = \ $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_unit_test_framework$(BOOST_LIB_SUFFIX) \ ! -lboost_thread$(BOOST_LIB_SUFFIX) parse_vrml97_SOURCES = parse_vrml97.cpp ! parse_vrml97_LDADD = \ ! $(top_builddir)/src/libopenvrml/libopenvrml.la \ ! -lboost_thread$(BOOST_LIB_SUFFIX) parse_x3dvrml_SOURCES = parse_x3dvrml.cpp parse_x3dvrml_LDADD = libtest-openvrml.la + #parse_vrml97_SOURCES = parse-vrml97.cc + EXTRA_DIST = \ package.m4 \ |
From: Braden M. <br...@us...> - 2007-10-13 18:26:51
|
Update of /cvsroot/openvrml/openvrml/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14422/src Modified Files: Tag: OpenVRML-Spirit-BRANCH Makefile.am Log Message: Initial check-in of Spirit parser work. Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/Makefile.am,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** Makefile.am 10 Oct 2007 07:04:54 -0000 1.11 --- Makefile.am 13 Oct 2007 18:26:53 -0000 1.11.2.1 *************** *** 24,29 **** openvrml_includedir = $(pkgincludedir)/openvrml openvrml_include_HEADERS = \ - libopenvrml/openvrml/read_write_mutex.h \ libopenvrml/openvrml/basetypes.h \ libopenvrml/openvrml/field_value.h \ libopenvrml/openvrml/event.h \ --- 24,30 ---- openvrml_includedir = $(pkgincludedir)/openvrml openvrml_include_HEADERS = \ libopenvrml/openvrml/basetypes.h \ + libopenvrml/openvrml/vrml97_grammar.h \ + libopenvrml/openvrml/read_write_mutex.h \ libopenvrml/openvrml/field_value.h \ libopenvrml/openvrml/event.h \ *************** *** 115,121 **** -DOPENVRML_LIBDIR_=\"$(libdir)\" \ -DOPENVRML_PKGDATADIR_=\"$(pkgdatadir)\" \ - -DBOOST_SPIRIT_THREADSAFE \ -DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS \ ! -DBOOST_MPL_LIMIT_VECTOR_SIZE=30 libopenvrml_libopenvrml_la_CXXFLAGS = \ $(PTHREAD_CFLAGS) \ --- 116,124 ---- -DOPENVRML_LIBDIR_=\"$(libdir)\" \ -DOPENVRML_PKGDATADIR_=\"$(pkgdatadir)\" \ -DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS \ ! -DBOOST_MPL_LIMIT_VECTOR_SIZE=30 \ ! -DBOOST_SPIRIT_THREADSAFE \ ! -DBOOST_SPIRIT_CLOSURE_LIMIT=6 \ ! -DPHOENIX_LIMIT=6 libopenvrml_libopenvrml_la_CXXFLAGS = \ $(PTHREAD_CFLAGS) \ *************** *** 125,128 **** --- 128,132 ---- libopenvrml_libopenvrml_la_SOURCES = \ + libopenvrml/openvrml/vrml97_grammar.cpp \ libopenvrml/openvrml/read_write_mutex.cpp \ libopenvrml/openvrml/basetypes.cpp \ |
From: Braden M. <br...@us...> - 2007-10-13 18:26:51
|
Update of /cvsroot/openvrml/openvrml/examples In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14422/examples Modified Files: Tag: OpenVRML-Spirit-BRANCH Makefile.am Added Files: pretty_print.cpp Log Message: Initial check-in of Spirit parser work. --- NEW FILE: pretty_print.cpp --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- // // pretty-print // // Copyright 2007 Braden McDaniel // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program 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 General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA [...2086 lines suppressed...] // // WorldInfo node // { static const node_interface interfaces[] = { node_interface(node_interface::field_id, field_value::mfstring_id, "info"), node_interface(node_interface::field_id, field_value::sfstring_id, "title") }; static const node_interface_set interface_set(interfaces, interfaces + 2); const bool succeeded = node_types.insert(make_pair("WorldInfo", interface_set)) .second; assert(succeeded); } } Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/examples/Makefile.am,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** Makefile.am 10 Oct 2007 07:04:54 -0000 1.4 --- Makefile.am 13 Oct 2007 18:26:53 -0000 1.4.2.1 *************** *** 1,13 **** - AM_CPPFLAGS = \ - -I$(top_builddir)/src/libopenvrml \ - -I$(top_srcdir)/src/libopenvrml \ - -I$(top_builddir)/src/libopenvrml-gl \ - -I$(top_srcdir)/src/libopenvrml-gl - AM_CXXFLAGS = $(SDL_CFLAGS) - AM_LDFLAGS = $(OPENVRML_RPATH) $(SDL_LIBS) $(JNI_LIBS) $(GLU_LIBS) - LDADD = $(top_builddir)/src/libopenvrml-gl/libopenvrml-gl.la - if ENABLE_EXAMPLES ! noinst_PROGRAMS = sdl-viewer if WITH_REZ --- 1,4 ---- if ENABLE_EXAMPLES ! noinst_PROGRAMS = sdl-viewer pretty-print if WITH_REZ *************** *** 24,27 **** sdl_viewer_SOURCES = sdl_viewer.cpp ! EXTRA_DIST = $(sdl_viewer_SOURCES) --- 15,35 ---- sdl_viewer_SOURCES = sdl_viewer.cpp + sdl_viewer_CPPFLAGS = \ + -I$(top_builddir)/src/libopenvrml \ + -I$(top_srcdir)/src/libopenvrml \ + -I$(top_builddir)/src/libopenvrml-gl \ + -I$(top_srcdir)/src/libopenvrml-gl + sdl_viewer_CXXFLAGS = $(SDL_CFLAGS) + sdl_viewer_LDFLAGS = $(OPENVRML_RPATH) $(SDL_LIBS) $(JNI_LIBS) $(GLU_LIBS) + sdl_viewer_LDADD = $(top_builddir)/src/libopenvrml-gl/libopenvrml-gl.la ! pretty_print_SOURCES = pretty_print.cpp ! pretty_print_CPPFLAGS = \ ! -I$(top_builddir)/src/libopenvrml \ ! -I$(top_srcdir)/src/libopenvrml \ ! -DBOOST_SPIRIT_THREADSAFE \ ! -DBOOST_SPIRIT_CLOSURE_LIMIT=6 \ ! -DPHOENIX_LIMIT=6 ! pretty_print_LDADD = $(top_builddir)/src/libopenvrml/libopenvrml.la ! ! EXTRA_DIST = $(sdl_viewer_SOURCES) $(pretty_print_SOURCES) |
From: Braden M. <br...@us...> - 2007-10-13 18:26:51
|
Update of /cvsroot/openvrml/openvrml/doc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14422/doc Modified Files: Tag: OpenVRML-Spirit-BRANCH index.doc Log Message: Initial check-in of Spirit parser work. Index: index.doc =================================================================== RCS file: /cvsroot/openvrml/openvrml/doc/index.doc,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** index.doc 12 May 2007 03:43:42 -0000 1.6 --- index.doc 13 Oct 2007 18:26:53 -0000 1.6.2.1 *************** *** 12,16 **** * <tr><td>@ref intro</td></tr> * <tr><td>@ref history</td></tr> ! * <tr><td>@ref getting_started</td></tr> * <tr><td>@ref resource_fetching</td></tr> * <tr><td>@ref resource_fetching_rationale</td></tr> --- 12,17 ---- * <tr><td>@ref intro</td></tr> * <tr><td>@ref history</td></tr> ! * <tr><td>@ref parsing</td></tr> ! * <tr><td>@ref libopenvrml</td></tr> * <tr><td>@ref resource_fetching</td></tr> * <tr><td>@ref resource_fetching_rationale</td></tr> *************** *** 23,29 **** * @section intro 1 Introduction * ! * OpenVRML is a runtime library for VRML97 and X3D worlds. OpenVRML parses ! * VRML/X3D directly into an in-memory scene graph format that can be further ! * manipulated through its API and/or rendered. * * @subsection history 1.1 History --- 24,32 ---- * @section intro 1 Introduction * ! * The OpenVRML development toolkit consists of the following parts: ! * ! * - the VRML97 and X3D-VRML parsing interfaces ! * - libopenvrml, a runtime library for VRML97 and X3D worlds ! * - ibopenvrml-gl, an OpenGL renderer * * @subsection history 1.1 History *************** *** 32,40 **** * maintained by Braden McDaniel. * ! * @section getting_started 2 Getting started * ! * @subsection resource_fetching 2.1 Fetching network resources * ! * @subsubsection resource_fetching_rationale 2.1.1 Rationale * * A VRML/X3D runtime must, of course, be able to fetch network resources --- 35,60 ---- * maintained by Braden McDaniel. * ! * @section parsing 2 Parsing VRML97 and VRML-encoded X3D * ! * OpenVRML includes parsers for reading VRML97 and VRML-encoded X3D. These ! * parsers are implemented using the <a ! * href="http://spirit.sourceforge.net">Spirit parsing framework</a> and have ! * the following features: * ! * - The parsers are node-independent. A user-defined “starting ! * set” of nodes is provided to the parser at the beginning of ! * parsing. ! * - The parsers are strict. Invalid code gets rejected. The parsers have ! * been constructed to be appropriate for ensuring syntactic and semantic ! * correctness of the parsed stream. ! * - Using the parsers does not require linking with libopenvrml. Spirit and ! * the grammars which make up the parsers consist of C++ templates, which ! * are implemented in header files. ! * ! * @section libopenvrml 3 libopenvrml - the run-time library ! * ! * @subsection resource_fetching 3.1 Fetching network resources ! * ! * @subsubsection resource_fetching_rationale 3.1.1 Rationale * * A VRML/X3D runtime must, of course, be able to fetch network resources *************** *** 56,60 **** * supported by modern Web browsers (significantly, @c ftp and @c http). * ! * @subsubsection resource_istream 2.1.2 resource_istream and resource_fetcher * * OpenVRML accomplishes this extensibility by extending the C++ IOStreams --- 76,80 ---- * supported by modern Web browsers (significantly, @c ftp and @c http). * ! * @subsubsection resource_istream 3.1.2 resource_istream and resource_fetcher * * OpenVRML accomplishes this extensibility by extending the C++ IOStreams *************** *** 96,109 **** * a return value signals that the caller is taking ownership of the resource. * ! * @subsubsection introducing_browser 2.1.3 Introducing browser * ! * The centerpiece of the OpenVRML library is @c openvrml::browser. This ! * class provides the interface for loading VRML/X3D worlds. Most management ! * of the runtime will be handled through its member functions. @c browser is ! * instantiated with a concrete subclass of @c resource_fetcher along with ! * @c std::ostream instances where normal console output and error console output ! * should be sent. * ! * @subsubsection resource_istream_impl_considerations 2.1.4 resource_istream implementation considerations * * OpenVRML supports a notion of data streaming. In general, network --- 116,129 ---- * a return value signals that the caller is taking ownership of the resource. * ! * @subsubsection introducing_browser 3.1.3 Introducing browser * ! * The centerpiece of OpenVRML is @c openvrml::browser. This class provides ! * the interface for loading VRML/X3D worlds. Most management of the runtime ! * will be handled through its member functions. @c browser is instantiated ! * with a concrete subclass of @c resource_fetcher along with @c std::ostream ! * instances where normal console output and error console output should be ! * sent. * ! * @subsubsection resource_istream_impl_considerations 3.1.4 resource_istream implementation considerations * * OpenVRML supports a notion of data streaming. In general, network *************** *** 111,119 **** * User code that does not support data streaming (as in the example using * @c std::filebuf in the documentation for ! * @c openvrml::browser::do_get_resource) can remain largely oblivious to ! * synchronization issues. However, user code that supports data streaming ! * must be mindful of the fact that OpenVRML uses separate threads to read the ! * data streams. Care must be taken not to write to a buffer at the same time ! * OpenVRML's stream reading thread is reading the buffer. * * The IOStreams framework is typically extended by inheriting --- 131,139 ---- * User code that does not support data streaming (as in the example using * @c std::filebuf in the documentation for ! * @c openvrml::resource_fetcher::do_get_resource) can remain largely ! * oblivious to synchronization issues. However, user code that supports data ! * streaming must be mindful of the fact that OpenVRML uses separate threads ! * to read the data streams. Care must be taken not to write to a buffer at ! * the same time OpenVRML's stream reading thread is reading the buffer. * * The IOStreams framework is typically extended by inheriting |
From: Braden M. <br...@us...> - 2007-10-13 17:10:42
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16560 Modified Files: ChangeLog Log Message: Added read_write_mutex source files to doxygen doc dependencies. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1561 retrieving revision 1.1562 diff -C2 -d -r1.1561 -r1.1562 *** ChangeLog 11 Oct 2007 05:00:26 -0000 1.1561 --- ChangeLog 13 Oct 2007 17:10:44 -0000 1.1562 *************** *** 1,2 **** --- 1,7 ---- + 2007-10-13 Braden McDaniel <br...@en...> + + * doc/Makefile.am (DOCUMENTED_SOURCE_FILES): Added + read_write_mutex source files. + 2007-10-11 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2007-10-13 17:10:42
|
Update of /cvsroot/openvrml/openvrml/doc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16560/doc Modified Files: Makefile.am Log Message: Added read_write_mutex source files to doxygen doc dependencies. Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/doc/Makefile.am,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Makefile.am 5 Feb 2007 05:36:10 -0000 1.36 --- Makefile.am 13 Oct 2007 17:10:44 -0000 1.37 *************** *** 31,34 **** --- 31,36 ---- $(top_srcdir)/src/libopenvrml/openvrml/node_impl_util.cpp \ $(top_srcdir)/src/libopenvrml/openvrml/node_impl_util.h \ + $(top_srcdir)/src/libopenvrml/openvrml/read_write_mutex.cpp \ + $(top_srcdir)/src/libopenvrml/openvrml/read_write_mutex.h \ $(top_srcdir)/src/libopenvrml/openvrml/rendering_context.cpp \ $(top_srcdir)/src/libopenvrml/openvrml/rendering_context.h \ |
From: Braden M. <br...@us...> - 2007-10-11 05:42:20
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13237/src/libopenvrml/openvrml Modified Files: Tag: OpenVRML-0_16-BRANCH browser.cpp Log Message: Improved resiliency of create_file_url to getcwd failures. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.190.2.18 retrieving revision 1.190.2.19 diff -C2 -d -r1.190.2.18 -r1.190.2.19 *** browser.cpp 12 Jul 2007 02:52:06 -0000 1.190.2.18 --- browser.cpp 11 Oct 2007 05:42:18 -0000 1.190.2.19 *************** *** 3519,3522 **** --- 3519,3524 ---- /** + * @internal + * * @brief Create an absolute “file” URL from a relative path. * *************** *** 3529,3538 **** * @p relative_uri. * ! * @exception std::bad_alloc if memory allocation fails. * * @sa ftp://ftp.rfc-editor.org/in-notes/rfc1738.txt */ OPENVRML_LOCAL const uri create_file_url(const uri & relative_uri) ! OPENVRML_THROW1(std::bad_alloc) { assert(relative(relative_uri)); --- 3531,3542 ---- * @p relative_uri. * ! * @exception std::runtime_error if the current working directory ! * cannot be determined. ! * @exception std::bad_alloc if memory allocation fails. * * @sa ftp://ftp.rfc-editor.org/in-notes/rfc1738.txt */ OPENVRML_LOCAL const uri create_file_url(const uri & relative_uri) ! OPENVRML_THROW2(std::runtime_error, std::bad_alloc) { assert(relative(relative_uri)); *************** *** 3552,3555 **** --- 3556,3560 ---- } + char * getcwd_result = 0; # ifdef _WIN32 std::vector<char> cwd_buf(_MAX_PATH); *************** *** 3559,3564 **** // cwd_buf[0] = '/'; ! while (!_getcwd(&cwd_buf.front() + 1, int(cwd_buf.size())) ! && errno == ERANGE) { cwd_buf.resize(cwd_buf.size() * 2); } --- 3564,3569 ---- // cwd_buf[0] = '/'; ! while (!(getcwd_result = _getcwd(&cwd_buf[1], int(cwd_buf.size()))) ! && (errno == ERANGE)) { cwd_buf.resize(cwd_buf.size() * 2); } *************** *** 3568,3575 **** # else std::vector<char> cwd_buf(PATH_MAX); ! while (!getcwd(&cwd_buf.front(), cwd_buf.size()) && errno == ERANGE) { cwd_buf.resize(cwd_buf.size() * 2); } # endif base_uri << &cwd_buf.front(); --- 3573,3588 ---- # else std::vector<char> cwd_buf(PATH_MAX); ! while (!(getcwd_result = getcwd(&cwd_buf.front(), cwd_buf.size())) ! && (errno == ERANGE)) { cwd_buf.resize(cwd_buf.size() * 2); } # endif + if (getcwd_result == 0) { + assert(errno != 0); + assert(errno != EFAULT); + assert(errno != EINVAL); + throw std::runtime_error(strerror(errno)); + } + base_uri << &cwd_buf.front(); *************** *** 7255,7269 **** // file URL. // ! const uri absolute_uri = !relative(test_uri) ! ? test_uri ! : (!this->parent() && this->url().empty()) ! ? create_file_url(test_uri) ! : test_uri ! .resolve_against(uri(this->url())); try { in = this->browser().get_resource(absolute_uri); } catch (std::exception & ex) { std::ostringstream msg; ! msg << string(absolute_uri) << ": " << ex.what(); this->browser().err(msg.str()); continue; --- 7268,7284 ---- // file URL. // ! uri absolute_uri; try { + absolute_uri = !relative(test_uri) + ? test_uri + : (!this->parent() && this->url().empty()) + ? create_file_url(test_uri) + : test_uri.resolve_against(uri(this->url())); in = this->browser().get_resource(absolute_uri); } catch (std::exception & ex) { std::ostringstream msg; ! msg << string(!absolute_uri.scheme().empty() ? absolute_uri ! : test_uri) ! << ": " << ex.what(); this->browser().err(msg.str()); continue; |
From: Braden M. <br...@us...> - 2007-10-11 05:42:16
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13237 Modified Files: Tag: OpenVRML-0_16-BRANCH ChangeLog Log Message: Improved resiliency of create_file_url to getcwd failures. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1310.2.202 retrieving revision 1.1310.2.203 diff -C2 -d -r1.1310.2.202 -r1.1310.2.203 *** ChangeLog 11 Oct 2007 05:08:48 -0000 1.1310.2.202 --- ChangeLog 11 Oct 2007 05:42:18 -0000 1.1310.2.203 *************** *** 1,4 **** --- 1,15 ---- 2007-10-11 Braden McDaniel <br...@en...> + Improved resiliency of create_file_url to getcwd failures. + + * src/libopenvrml/openvrml/browser.cpp + (create_file_url(const uri &)): Throw std::runtime_error if getcwd + fails with an error other than ERANGE, EFAULT, or EINVAL. + Assertion will fail in case of the latter two errors. + (openvrml::scene::get_resource(const std::vector<std::string> &) + const): Catch an exception thrown from create_file_url. + + 2007-10-11 Braden McDaniel <br...@en...> + * examples/sdl_viewer.cpp (sdl_viewer::run()): Initialize the SDL_Event struct. |
From: Braden M. <br...@us...> - 2007-10-11 05:08:58
|
Update of /cvsroot/openvrml/openvrml/examples In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32156/examples Modified Files: Tag: OpenVRML-0_16-BRANCH sdl_viewer.cpp Log Message: Initialize the SDL_Event struct. Index: sdl_viewer.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/examples/sdl_viewer.cpp,v retrieving revision 1.10.2.6 retrieving revision 1.10.2.7 diff -C2 -d -r1.10.2.6 -r1.10.2.7 *** sdl_viewer.cpp 10 Jul 2007 20:32:17 -0000 1.10.2.6 --- sdl_viewer.cpp 11 Oct 2007 05:08:51 -0000 1.10.2.7 *************** *** 282,286 **** bool need_redraw = false; do { ! SDL_Event event; sdl_viewer::event_info viewer_event_info; while (SDL_PollEvent(&event)) { --- 282,286 ---- bool need_redraw = false; do { ! SDL_Event event = {}; sdl_viewer::event_info viewer_event_info; while (SDL_PollEvent(&event)) { |
From: Braden M. <br...@us...> - 2007-10-11 05:08:58
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32156 Modified Files: Tag: OpenVRML-0_16-BRANCH ChangeLog Log Message: Initialize the SDL_Event struct. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1310.2.201 retrieving revision 1.1310.2.202 diff -C2 -d -r1.1310.2.201 -r1.1310.2.202 *** ChangeLog 10 Oct 2007 21:32:12 -0000 1.1310.2.201 --- ChangeLog 11 Oct 2007 05:08:48 -0000 1.1310.2.202 *************** *** 1,2 **** --- 1,7 ---- + 2007-10-11 Braden McDaniel <br...@en...> + + * examples/sdl_viewer.cpp (sdl_viewer::run()): + Initialize the SDL_Event struct. + 2007-10-10 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2007-10-11 05:00:29
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29079/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Improved resiliency of create_file_url to getcwd failures. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.224 retrieving revision 1.225 diff -C2 -d -r1.224 -r1.225 *** browser.cpp 26 Sep 2007 04:57:53 -0000 1.224 --- browser.cpp 11 Oct 2007 05:00:27 -0000 1.225 *************** *** 3522,3525 **** --- 3522,3527 ---- /** + * @internal + * * @brief Create an absolute “file” URL from a relative path. * *************** *** 3532,3541 **** * @p relative_uri. * ! * @exception std::bad_alloc if memory allocation fails. * * @sa ftp://ftp.rfc-editor.org/in-notes/rfc1738.txt */ OPENVRML_LOCAL const uri create_file_url(const uri & relative_uri) ! OPENVRML_THROW1(std::bad_alloc) { assert(relative(relative_uri)); --- 3534,3545 ---- * @p relative_uri. * ! * @exception std::runtime_error if the current working directory ! * cannot be determined. ! * @exception std::bad_alloc if memory allocation fails. * * @sa ftp://ftp.rfc-editor.org/in-notes/rfc1738.txt */ OPENVRML_LOCAL const uri create_file_url(const uri & relative_uri) ! OPENVRML_THROW2(std::runtime_error, std::bad_alloc) { assert(relative(relative_uri)); *************** *** 3555,3558 **** --- 3559,3563 ---- } + char * getcwd_result = 0; # ifdef _WIN32 std::vector<char> cwd_buf(_MAX_PATH); *************** *** 3562,3567 **** // cwd_buf[0] = '/'; ! while (!_getcwd(&cwd_buf.front() + 1, int(cwd_buf.size())) ! && errno == ERANGE) { cwd_buf.resize(cwd_buf.size() * 2); } --- 3567,3572 ---- // cwd_buf[0] = '/'; ! while (!(getcwd_result = _getcwd(&cwd_buf[1], int(cwd_buf.size()))) ! && (errno == ERANGE)) { cwd_buf.resize(cwd_buf.size() * 2); } *************** *** 3571,3578 **** # else std::vector<char> cwd_buf(PATH_MAX); ! while (!getcwd(&cwd_buf.front(), cwd_buf.size()) && errno == ERANGE) { cwd_buf.resize(cwd_buf.size() * 2); } # endif base_uri << &cwd_buf.front(); --- 3576,3591 ---- # else std::vector<char> cwd_buf(PATH_MAX); ! while (!(getcwd_result = getcwd(&cwd_buf.front(), cwd_buf.size())) ! && (errno == ERANGE)) { cwd_buf.resize(cwd_buf.size() * 2); } # endif + if (getcwd_result == 0) { + assert(errno != 0); + assert(errno != EFAULT); + assert(errno != EINVAL); + throw std::runtime_error(strerror(errno)); + } + base_uri << &cwd_buf.front(); *************** *** 7502,7516 **** // file URL. // ! const uri absolute_uri = !relative(test_uri) ! ? test_uri ! : (!this->parent() && this->url().empty()) ! ? create_file_url(test_uri) ! : test_uri ! .resolve_against(uri(this->url())); try { in = this->browser().fetcher_.get_resource(absolute_uri); } catch (std::exception & ex) { std::ostringstream msg; ! msg << string(absolute_uri) << ": " << ex.what(); this->browser().err(msg.str()); continue; --- 7515,7531 ---- // file URL. // ! uri absolute_uri; try { + absolute_uri = !relative(test_uri) + ? test_uri + : (!this->parent() && this->url().empty()) + ? create_file_url(test_uri) + : test_uri.resolve_against(uri(this->url())); in = this->browser().fetcher_.get_resource(absolute_uri); } catch (std::exception & ex) { std::ostringstream msg; ! msg << string(!absolute_uri.scheme().empty() ? absolute_uri ! : test_uri) ! << ": " << ex.what(); this->browser().err(msg.str()); continue; |
From: Braden M. <br...@us...> - 2007-10-11 05:00:25
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29079 Modified Files: ChangeLog Log Message: Improved resiliency of create_file_url to getcwd failures. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1560 retrieving revision 1.1561 diff -C2 -d -r1.1560 -r1.1561 *** ChangeLog 11 Oct 2007 04:51:14 -0000 1.1560 --- ChangeLog 11 Oct 2007 05:00:26 -0000 1.1561 *************** *** 1,4 **** --- 1,15 ---- 2007-10-11 Braden McDaniel <br...@en...> + Improved resiliency of create_file_url to getcwd failures. + + * src/libopenvrml/openvrml/browser.cpp + (create_file_url(const uri &)): Throw std::runtime_error if getcwd + fails with an error other than ERANGE, EFAULT, or EINVAL. + Assertion will fail in case of the latter two errors. + (openvrml::scene::get_resource(const std::vector<std::string> &) + const): Catch an exception thrown from create_file_url. + + 2007-10-11 Braden McDaniel <br...@en...> + * examples/sdl_viewer.cpp (sdl_viewer::run()): Initialize the SDL_Event struct. |
From: Braden M. <br...@us...> - 2007-10-11 04:51:14
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25526/src/libopenvrml/openvrml Modified Files: Vrml97Parser.g Log Message: Made the scope parent pointer nonconst. Index: Vrml97Parser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/Vrml97Parser.g,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** Vrml97Parser.g 18 Nov 2006 20:49:21 -0000 1.71 --- Vrml97Parser.g 11 Oct 2007 04:51:15 -0000 1.72 *************** *** 802,806 **** protoInterfaceDeclaration[ const openvrml::scene & scene, ! const boost::shared_ptr<const openvrml::scope> & outer_scope, const std::string & proto_id, node_interface_set & interfaces, --- 802,806 ---- protoInterfaceDeclaration[ const openvrml::scene & scene, ! const boost::shared_ptr<openvrml::scope> & outer_scope, const std::string & proto_id, node_interface_set & interfaces, |
From: Braden M. <br...@us...> - 2007-10-11 04:51:14
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25526 Modified Files: ChangeLog Log Message: Made the scope parent pointer nonconst. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1559 retrieving revision 1.1560 diff -C2 -d -r1.1559 -r1.1560 *** ChangeLog 11 Oct 2007 04:03:26 -0000 1.1559 --- ChangeLog 11 Oct 2007 04:51:14 -0000 1.1560 *************** *** 4,11 **** Initialize the SDL_Event struct. ! 2007-10-10 Braden McDaniel <br...@en...> Made the scope parent pointer nonconst. * src/libopenvrml/openvrml/scope.cpp * src/libopenvrml/openvrml/scope.h --- 4,12 ---- Initialize the SDL_Event struct. ! 2007-10-11 Braden McDaniel <br...@en...> Made the scope parent pointer nonconst. + * src/libopenvrml/openvrml/Vrml97Parser.g * src/libopenvrml/openvrml/scope.cpp * src/libopenvrml/openvrml/scope.h |
From: Braden M. <br...@us...> - 2007-10-11 04:03:26
|
Update of /cvsroot/openvrml/openvrml/examples In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6514/examples Modified Files: sdl_viewer.cpp Log Message: Initialize the SDL_Event struct. Index: sdl_viewer.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/examples/sdl_viewer.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** sdl_viewer.cpp 10 Jul 2007 20:29:06 -0000 1.17 --- sdl_viewer.cpp 11 Oct 2007 04:03:27 -0000 1.18 *************** *** 276,280 **** bool need_redraw = false; do { ! SDL_Event event; sdl_viewer::event_info viewer_event_info; while (SDL_PollEvent(&event)) { --- 276,280 ---- bool need_redraw = false; do { ! SDL_Event event = {}; sdl_viewer::event_info viewer_event_info; while (SDL_PollEvent(&event)) { |
From: Braden M. <br...@us...> - 2007-10-11 04:03:24
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6514 Modified Files: ChangeLog Log Message: Initialize the SDL_Event struct. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1558 retrieving revision 1.1559 diff -C2 -d -r1.1558 -r1.1559 *** ChangeLog 11 Oct 2007 03:57:00 -0000 1.1558 --- ChangeLog 11 Oct 2007 04:03:26 -0000 1.1559 *************** *** 1,2 **** --- 1,7 ---- + 2007-10-11 Braden McDaniel <br...@en...> + + * examples/sdl_viewer.cpp (sdl_viewer::run()): + Initialize the SDL_Event struct. + 2007-10-10 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2007-10-11 03:56:59
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3524/src/libopenvrml/openvrml Modified Files: scope.h scope.cpp Log Message: Made the scope parent pointer nonconst. Index: scope.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/scope.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** scope.h 17 Apr 2006 07:29:17 -0000 1.15 --- scope.h 11 Oct 2007 03:57:01 -0000 1.16 *************** *** 42,55 **** std::map<std::string, node *> named_node_map; const std::string id_; ! const boost::shared_ptr<const scope> parent_; public: explicit scope(const std::string & id, ! const boost::shared_ptr<const scope> & parent = boost::shared_ptr<scope>()); const std::string & id() const OPENVRML_NOTHROW; ! const boost::shared_ptr<const scope> & parent() const OPENVRML_NOTHROW; const std::pair<boost::shared_ptr<node_type>, bool> --- 42,55 ---- std::map<std::string, node *> named_node_map; const std::string id_; ! const boost::shared_ptr<scope> parent_; public: explicit scope(const std::string & id, ! const boost::shared_ptr<scope> & parent = boost::shared_ptr<scope>()); const std::string & id() const OPENVRML_NOTHROW; ! const boost::shared_ptr<scope> & parent() const OPENVRML_NOTHROW; const std::pair<boost::shared_ptr<node_type>, bool> Index: scope.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/scope.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** scope.cpp 6 Mar 2007 07:24:01 -0000 1.21 --- scope.cpp 11 Oct 2007 03:57:01 -0000 1.22 *************** *** 94,98 **** */ openvrml::scope::scope(const std::string & id, ! const boost::shared_ptr<const scope> & parent): id_(id), parent_(parent) --- 94,98 ---- */ openvrml::scope::scope(const std::string & id, ! const boost::shared_ptr<scope> & parent): id_(id), parent_(parent) *************** *** 114,118 **** * @return the parent @c scope; or null if the @c scope is a root @c scope. */ ! const boost::shared_ptr<const openvrml::scope> & openvrml::scope::parent() const OPENVRML_NOTHROW { --- 114,118 ---- * @return the parent @c scope; or null if the @c scope is a root @c scope. */ ! const boost::shared_ptr<openvrml::scope> & openvrml::scope::parent() const OPENVRML_NOTHROW { |
From: Braden M. <br...@us...> - 2007-10-11 03:56:59
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3524 Modified Files: ChangeLog Log Message: Made the scope parent pointer nonconst. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1557 retrieving revision 1.1558 diff -C2 -d -r1.1557 -r1.1558 *** ChangeLog 11 Oct 2007 02:44:01 -0000 1.1557 --- ChangeLog 11 Oct 2007 03:57:00 -0000 1.1558 *************** *** 1,4 **** --- 1,11 ---- 2007-10-10 Braden McDaniel <br...@en...> + Made the scope parent pointer nonconst. + + * src/libopenvrml/openvrml/scope.cpp + * src/libopenvrml/openvrml/scope.h + + 2007-10-10 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/basetypes.h (openvrml::int32): Use boost::int32_t; |
From: Braden M. <br...@us...> - 2007-10-11 02:43:59
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6619/src/libopenvrml/openvrml Modified Files: basetypes.h Log Message: Use boost::int32_t. Index: basetypes.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/basetypes.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** basetypes.h 11 Oct 2007 02:29:24 -0000 1.29 --- basetypes.h 11 Oct 2007 02:44:01 -0000 1.30 *************** *** 30,42 **** # include <iosfwd> # include <vector> ! # include <sys/types.h> namespace openvrml { ! # ifdef _WIN32 ! typedef __int32 int32; ! # else ! typedef int32_t int32; ! # endif --- 30,38 ---- # include <iosfwd> # include <vector> ! # include <boost/cstdint.hpp> namespace openvrml { ! typedef boost::int32_t int32; |
From: Braden M. <br...@us...> - 2007-10-11 02:43:59
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6619 Modified Files: ChangeLog Log Message: Use boost::int32_t. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1556 retrieving revision 1.1557 diff -C2 -d -r1.1556 -r1.1557 *** ChangeLog 11 Oct 2007 02:35:08 -0000 1.1556 --- ChangeLog 11 Oct 2007 02:44:01 -0000 1.1557 *************** *** 2,5 **** --- 2,10 ---- * src/libopenvrml/openvrml/basetypes.h + (openvrml::int32): Use boost::int32_t; + + 2007-10-10 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/basetypes.h (openvrml::image): Since unsigned long is quite probably larger than 4 bytes on 64-bit platforms, use openvrml::int32 in pixel |
From: Braden M. <br...@us...> - 2007-10-11 02:35:06
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3449/src/libopenvrml/openvrml Modified Files: basetypes.cpp Log Message: Since unsigned long is quite probably larger than 4 bytes on 64-bit platforms, use openvrml::int32 in pixel accessor and mutator functions on openvrml::image. Index: basetypes.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/basetypes.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** basetypes.cpp 6 Mar 2007 07:24:00 -0000 1.43 --- basetypes.cpp 11 Oct 2007 02:35:08 -0000 1.44 *************** *** 4947,4951 **** /** ! * @fn unsigned long openvrml::image::pixel(size_t index) const * * @brief Pixel value. --- 4947,4951 ---- /** ! * @fn openvrml::int32 openvrml::image::pixel(size_t index) const * * @brief Pixel value. *************** *** 4959,4963 **** /** ! * @fn void openvrml::image::pixel(size_t index, unsigned long value) * * @brief Set a pixel value. --- 4959,4963 ---- /** ! * @fn void openvrml::image::pixel(size_t index, int32 value) * * @brief Set a pixel value. *************** *** 4970,4974 **** /** ! * @fn unsigned long openvrml::image::pixel(size_t x, size_t y) const * * @brief Pixel value. --- 4970,4974 ---- /** ! * @fn openvrml::int32 openvrml::image::pixel(size_t x, size_t y) const * * @brief Pixel value. *************** *** 4983,4987 **** /** ! * @fn void openvrml::image::pixel(size_t x, size_t y, unsigned long value) * * @brief Set a pixel value. --- 4983,4987 ---- /** ! * @fn void openvrml::image::pixel(size_t x, size_t y, int32 value) * * @brief Set a pixel value. |
From: Braden M. <br...@us...> - 2007-10-11 02:35:06
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3449 Modified Files: ChangeLog Log Message: Since unsigned long is quite probably larger than 4 bytes on 64-bit platforms, use openvrml::int32 in pixel accessor and mutator functions on openvrml::image. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1555 retrieving revision 1.1556 diff -C2 -d -r1.1555 -r1.1556 *** ChangeLog 11 Oct 2007 02:29:24 -0000 1.1555 --- ChangeLog 11 Oct 2007 02:35:08 -0000 1.1556 *************** *** 5,8 **** --- 5,9 ---- than 4 bytes on 64-bit platforms, use openvrml::int32 in pixel accessor and mutator functions. + * src/libopenvrml/openvrml/basetypes.cpp: Doc-comment updates. 2007-10-10 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2007-10-11 02:29:22
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1043/src/libopenvrml/openvrml Modified Files: basetypes.h Log Message: Since unsigned long is quite probably larger than 4 bytes on 64-bit platforms, use openvrml::int32 in pixel accessor and mutator functions on openvrml::image. Index: basetypes.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/basetypes.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** basetypes.h 6 Mar 2007 07:24:00 -0000 1.28 --- basetypes.h 11 Oct 2007 02:29:24 -0000 1.29 *************** *** 907,914 **** void array(InputIterator begin, InputIterator end) OPENVRML_NOTHROW; ! unsigned long pixel(size_t index) const OPENVRML_NOTHROW; ! void pixel(size_t index, unsigned long value) OPENVRML_NOTHROW; ! unsigned long pixel(size_t x, size_t y) const OPENVRML_NOTHROW; ! void pixel(size_t x, size_t y, unsigned long value) OPENVRML_NOTHROW; }; --- 907,914 ---- void array(InputIterator begin, InputIterator end) OPENVRML_NOTHROW; ! int32 pixel(size_t index) const OPENVRML_NOTHROW; ! void pixel(size_t index, int32 value) OPENVRML_NOTHROW; ! int32 pixel(size_t x, size_t y) const OPENVRML_NOTHROW; ! void pixel(size_t x, size_t y, int32 value) OPENVRML_NOTHROW; }; *************** *** 973,986 **** } ! inline unsigned long image::pixel(const size_t index) const OPENVRML_NOTHROW { assert(index < this->x_ * this->y_); ! unsigned long retval = 0x00000000; for (size_t component = this->comp_, i = index * this->comp_; component > 0; --component, ++i) { retval |= ! static_cast<unsigned long>(this->array_[i]) << (8 * (component - 1)); } --- 973,986 ---- } ! inline int32 image::pixel(const size_t index) const OPENVRML_NOTHROW { assert(index < this->x_ * this->y_); ! int32 retval = 0x00000000; for (size_t component = this->comp_, i = index * this->comp_; component > 0; --component, ++i) { retval |= ! static_cast<int32>(this->array_[i]) << (8 * (component - 1)); } *************** *** 988,992 **** } ! inline void image::pixel(const size_t index, const unsigned long value) OPENVRML_NOTHROW { --- 988,992 ---- } ! inline void image::pixel(const size_t index, const int32 value) OPENVRML_NOTHROW { *************** *** 1001,1005 **** } ! inline unsigned long image::pixel(const size_t x, const size_t y) const OPENVRML_NOTHROW { --- 1001,1005 ---- } ! inline int32 image::pixel(const size_t x, const size_t y) const OPENVRML_NOTHROW { *************** *** 1010,1014 **** inline void image::pixel(const size_t x, const size_t y, ! const unsigned long value) OPENVRML_NOTHROW { --- 1010,1014 ---- inline void image::pixel(const size_t x, const size_t y, ! const int32 value) OPENVRML_NOTHROW { |