|
From: Foster B. <fos...@us...> - 2006-02-03 18:34:23
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/eve_smoke In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6755/adobe/test/eve_smoke Modified Files: default.eve main.cpp Log Message: asl 1.0.13 Index: default.eve =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/eve_smoke/default.eve,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** default.eve 30 Mar 2005 22:34:35 -0000 1.1 --- default.eve 3 Feb 2006 18:33:39 -0000 1.2 *************** *** 1,11 **** dialog() { ! row() ! { ! button (name: "Hello"); ! } ! column() ! { ! button (name: "world!"); ! } } --- 1,11 ---- dialog() { ! row() ! { ! button (name: "Hello"); ! } ! column() ! { ! button (name: "world!"); ! } } Index: main.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/eve_smoke/main.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** main.cpp 24 Jan 2006 19:38:51 -0000 1.4 --- main.cpp 3 Feb 2006 18:33:39 -0000 1.5 *************** *** 1,6 **** /* ! Copyright 2005 Ralph Thomas and Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005 Ralph Thomas and Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 39,49 **** /// \return an any containing the created widget. // ! adobe::eve_callback_suite_t::position_t assemble( adobe::name_t name, ! const adobe::dictionary_t& parameters) { ! std::cout << "Create: " << name.get() << std::endl; ! std::cout << parameters << std::endl; ! return adobe::eve_callback_suite_t::position_t(); } --- 39,49 ---- /// \return an any containing the created widget. // ! adobe::eve_callback_suite_t::position_t assemble( adobe::name_t name, ! const adobe::dictionary_t& parameters) { ! std::cout << "Create: " << name.get() << std::endl; ! std::cout << parameters << std::endl; ! return adobe::eve_callback_suite_t::position_t(); } *************** *** 59,85 **** void testParse( boost::filesystem::path& fileName ) { ! // ! // Open our input stream. ! // ! boost::filesystem::ifstream stream( fileName ); ! if (!stream.is_open()) ! { ! std::stringstream err; ! err << "Could not open file: " << fileName.native_file_string(); ! throw std::runtime_error(err.str()); ! } ! // ! // Call the Eve parser. ! // adobe::basic_sheet_t layout_sheet; adobe::virtual_machine_t evaluator; ! adobe::parse(stream, adobe::line_position_t(fileName.native_file_string().c_str()), ! adobe::eve_callback_suite_t::position_t(), adobe::bind_layout(boost::bind(&assemble, _2, _3), layout_sheet, evaluator)); } --- 59,85 ---- void testParse( boost::filesystem::path& fileName ) { ! // ! // Open our input stream. ! // ! boost::filesystem::ifstream stream( fileName ); ! if (!stream.is_open()) ! { ! std::stringstream err; ! err << "Could not open file: " << fileName.native_file_string(); ! throw std::runtime_error(err.str()); ! } ! // ! // Call the Eve parser. ! // adobe::basic_sheet_t layout_sheet; adobe::virtual_machine_t evaluator; ! adobe::parse(stream, adobe::line_position_t(fileName.native_file_string().c_str()), ! adobe::eve_callback_suite_t::position_t(), adobe::bind_layout(boost::bind(&assemble, _2, _3), layout_sheet, evaluator)); } *************** *** 103,138 **** int main( int argc, char* argv[] ) { ! bool success(true); ! // ! // Try to open the filename given on the command line, otherwise ! // try to open "default.eve". ! // ! try ! { ! boost::filesystem::path file_path("default.eve"); ! if( argc > 1 ) file_path = boost::filesystem::path(argv[1], boost::filesystem::native); ! // ! // Call our testParse function with the selected filename. ! // ! testParse( file_path ); ! } ! catch( const std::exception& error ) ! { ! // ! // Oops, something didn't work out. ! // ! std::cerr << "Exception: " << error.what() << std::endl; ! } ! catch( ... ) ! { ! std::cerr << "Unknown exception" << std::endl; ! } ! return success ? 0 : 1; } --- 103,138 ---- int main( int argc, char* argv[] ) { ! bool success(true); ! // ! // Try to open the filename given on the command line, otherwise ! // try to open "default.eve". ! // ! try ! { ! boost::filesystem::path file_path("default.eve"); ! if( argc > 1 ) file_path = boost::filesystem::path(argv[1], boost::filesystem::native); ! // ! // Call our testParse function with the selected filename. ! // ! testParse( file_path ); ! } ! catch( const std::exception& error ) ! { ! // ! // Oops, something didn't work out. ! // ! std::cerr << "Exception: " << error.what() << std::endl; ! } ! catch( ... ) ! { ! std::cerr << "Unknown exception" << std::endl; ! } ! return success ? 0 : 1; } |