Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-16 09:33:44

0001 //  Copyright (c) 2001-2011 Hartmut Kaiser
0002 //
0003 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
0004 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #if !defined(BOOST_SPIRIT_QI_CREATE_NOV_21_2009_0444PM)
0007 #define BOOST_SPIRIT_QI_CREATE_NOV_21_2009_0444PM
0008 
0009 #if defined(_MSC_VER)
0010 #pragma once
0011 #endif
0012 
0013 #include <boost/spirit/home/qi/auto/meta_create.hpp>
0014 
0015 ///////////////////////////////////////////////////////////////////////////////
0016 namespace boost { namespace spirit { namespace result_of
0017 {
0018     template <typename T>
0019     struct create_parser
0020       : spirit::traits::meta_create<qi::domain, T> {};
0021 }}}
0022 
0023 ///////////////////////////////////////////////////////////////////////////////
0024 namespace boost { namespace spirit { namespace qi
0025 {
0026     // Main API function for parser creation from data type
0027     template <typename T>
0028     typename result_of::create_parser<T>::type
0029     create_parser()
0030     {
0031         return spirit::traits::meta_create<qi::domain, T>::call();
0032     }
0033 }}}
0034 
0035 ///////////////////////////////////////////////////////////////////////////////
0036 namespace boost { namespace spirit { namespace traits
0037 {
0038     // Meta function returning true if create_parser does return a valid
0039     // parser for the given type T.
0040     template <typename T>
0041     struct create_parser_exists
0042       : meta_create_exists<qi::domain, T> {};
0043 }}}
0044 
0045 #endif