Chris@16: // Copyright (c) 2001-2011 Hartmut Kaiser Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #if !defined(BOOST_SPIRIT_QI_CREATE_NOV_21_2009_0444PM) Chris@16: #define BOOST_SPIRIT_QI_CREATE_NOV_21_2009_0444PM Chris@16: Chris@16: #if defined(_MSC_VER) Chris@16: #pragma once Chris@16: #endif Chris@16: Chris@16: #include Chris@16: Chris@16: /////////////////////////////////////////////////////////////////////////////// Chris@16: namespace boost { namespace spirit { namespace result_of Chris@16: { Chris@16: template Chris@16: struct create_parser Chris@16: : spirit::traits::meta_create {}; Chris@16: }}} Chris@16: Chris@16: /////////////////////////////////////////////////////////////////////////////// Chris@16: namespace boost { namespace spirit { namespace qi Chris@16: { Chris@16: // Main API function for parser creation from data type Chris@16: template Chris@16: typename result_of::create_parser::type Chris@16: create_parser() Chris@16: { Chris@16: return spirit::traits::meta_create::call(); Chris@16: } Chris@16: }}} Chris@16: Chris@16: /////////////////////////////////////////////////////////////////////////////// Chris@16: namespace boost { namespace spirit { namespace traits Chris@16: { Chris@16: // Meta function returning true if create_parser does return a valid Chris@16: // parser for the given type T. Chris@16: template Chris@16: struct create_parser_exists Chris@16: : meta_create_exists {}; Chris@16: }}} Chris@16: Chris@16: #endif