/*============================================================================= Copyright (c) 2001-2010 Hartmut Kaiser Copyright (c) 2001-2010 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(BOOST_SPIRIT_ATTRIBUTES_FWD_OCT_01_2009_0715AM) #define BOOST_SPIRIT_ATTRIBUTES_FWD_OCT_01_2009_0715AM #if defined(_MSC_VER) #pragma once #endif #include #if (defined(__GNUC__) && (__GNUC__ < 4)) || \ (defined(__APPLE__) && defined(__INTEL_COMPILER)) #include #endif /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { namespace result_of { // forward declaration only template struct extract_from; template struct pre_transform; template struct optional_value; template struct begin; template struct end; template struct deref; }}} /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { namespace traits { /////////////////////////////////////////////////////////////////////////// // Determine if T is a proxy /////////////////////////////////////////////////////////////////////////// template struct is_proxy; /////////////////////////////////////////////////////////////////////////// // Retrieve the attribute type to use from the given type // // This is needed to extract the correct attribute type from proxy classes // as utilized in FUSION_ADAPT_CLASS /////////////////////////////////////////////////////////////////////////// template struct attribute_type; /////////////////////////////////////////////////////////////////////////// // Determines how we pass attributes to semantic actions. This // may be specialized. By default, all attributes are wrapped in // a fusion sequence, because the attribute has to be treated as being // a single value in any case (even if it actually already is a fusion // sequence in its own). /////////////////////////////////////////////////////////////////////////// template struct pass_attribute; /////////////////////////////////////////////////////////////////////////// template struct optional_attribute; /////////////////////////////////////////////////////////////////////////// // Sometimes the user needs to transform the attribute types for certain // attributes. This template can be used as a customization point, where // the user is able specify specific transformation rules for any attribute // type. /////////////////////////////////////////////////////////////////////////// template struct transform_attribute; /////////////////////////////////////////////////////////////////////////// // Qi only template struct assign_to_attribute_from_iterators; template void assign_to(Iterator const& first, Iterator const& last, Attribute& attr); template void assign_to(Iterator const&, Iterator const&, unused_type); template struct assign_to_attribute_from_value; template void assign_to(T const& val, Attribute& attr); template void assign_to(T const&, unused_type); /////////////////////////////////////////////////////////////////////////// // Karma only template struct extract_from_attribute; template typename spirit::result_of::extract_from::type extract_from(Attribute const& attr, Context& ctx #if (defined(__GNUC__) && (__GNUC__ < 4)) || \ (defined(__APPLE__) && defined(__INTEL_COMPILER)) , typename enable_if >::type* = NULL #endif ); /////////////////////////////////////////////////////////////////////////// // return the type currently stored in the given variant /////////////////////////////////////////////////////////////////////////// template struct variant_which; /////////////////////////////////////////////////////////////////////////// // Determine, whether T is a variant like type /////////////////////////////////////////////////////////////////////////// template struct not_is_variant; /////////////////////////////////////////////////////////////////////////// // Clear data efficiently /////////////////////////////////////////////////////////////////////////// template struct clear_value; /////////////////////////////////////////////////////////////////////// // Determine the value type of the given container type /////////////////////////////////////////////////////////////////////// template struct container_value; template struct container_iterator; template struct is_container; /////////////////////////////////////////////////////////////////////////// // Qi only template struct push_back_container; template struct is_empty_container; /////////////////////////////////////////////////////////////////////// // Determine the iterator type of the given container type // Karma only /////////////////////////////////////////////////////////////////////// template struct begin_container; template struct end_container; template struct deref_iterator; template struct next_iterator; template struct compare_iterators; /////////////////////////////////////////////////////////////////////////// // Print the given attribute of type T to the stream given as Out /////////////////////////////////////////////////////////////////////////// template struct print_attribute_debug; template void print_attribute(Out&, T const&); template void print_attribute(Out&, unused_type); /////////////////////////////////////////////////////////////////////////// template struct token_printer_debug; template void print_token(Out&, T const&); }}} #endif