00001 00002 /*============================================================================= 00003 physical quantities / units / constants 00004 Copyright (c) 2006, 2007 Martin Schulz 00005 http://physical.sourceforge.net 00006 00007 This is private code by Martin Schulz. 00008 00009 Use, modification and distribution is subject to the Boost Software 00010 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 00011 http://www.boost.org/LICENSE_1_0.txt) 00012 =============================================================================*/ 00013 00014 #ifndef PHYSICAL_FIXEDPARSER 00015 #define PHYSICAL_FIXEDPARSER 00016 00017 #include <string> 00018 #include <stdexcept> 00019 #include "physical/dynamicphysical.hpp" 00020 00021 00022 namespace physical { 00023 00024 namespace parser { 00025 00026 struct parser_exception: public std::runtime_error { 00027 std::size_t sucessfully_parsed_up_to; 00028 std::string string_to_parse; 00029 parser_exception(const std::string& s, std::size_t n); 00030 }; 00031 00032 struct Parser { 00033 DynamicPhysical<SI> parse(std::string formula); 00034 }; 00035 00036 }; // namespace parser 00037 00038 }; // namespace physical 00039 00040 00041 #endif
Generated on Mon Apr 2 22:25:03 2007 for physical_svn by 1.5.1-p1 | hosted on |