Changeset 62146


Ignore:
Timestamp:
May 22, 2010, 3:52:34 PM (8 years ago)
Author:
Hartmut Kaiser
Message:

Wave: added file type to iteration context

Location:
trunk/boost/wave
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/wave/cpp_iteration_context.hpp

    r60817 r62146  
    9191
    9292///////////////////////////////////////////////////////////////////////////////
    93 // 
     93//  Base class for iteration contexts
    9494template <typename ContextT, typename IteratorT>
    9595struct base_iteration_context
    9696{
    97 public:
     97    enum file_type
     98    {
     99        // this iteration context handles ...
     100        main_file,      // ... the main preprocessed file
     101        system_header,  // ... a header file included used #include  <>
     102        user_header     // ... a header file included using #include ""
     103    };
     104
    98105    base_iteration_context(ContextT& ctx_,
    99106            BOOST_WAVE_STRINGTYPE const &fname, std::size_t if_block_depth = 0)   
     
    103110    base_iteration_context(ContextT& ctx_,
    104111            IteratorT const &first_, IteratorT const &last_,
    105             BOOST_WAVE_STRINGTYPE const &fname, std::size_t if_block_depth = 0)
     112            BOOST_WAVE_STRINGTYPE const &fname, std::size_t if_block_depth = 0,
     113            file_type type = main_file)
    106114    :   first(first_), last(last_), real_filename(fname),
    107115        real_relative_filename(fname), filename(fname),
     
    119127    std::size_t if_block_depth; // depth of #if block recursion
    120128    ContextT& ctx;              // corresponding context<> object
     129    file_type type;             // the type of the handled file
    121130};
    122131
     
    139148    iteration_context(ContextT& ctx, BOOST_WAVE_STRINGTYPE const &fname,
    140149            position_type const &act_pos,
    141             boost::wave::language_support language_)
    142     :   base_iteration_context<ContextT, IteratorT>(ctx, fname)
     150            boost::wave::language_support language_,
     151            file_type type = main_file)
     152    :   base_iteration_context<ContextT, IteratorT>(ctx, fname, type)
    143153    {
    144154        InputPolicyT::template inner<self_type>::init_iterators(
  • trunk/boost/wave/util/cpp_iterator.hpp

    r61723 r62146  
    15731573    boost::shared_ptr<base_iteration_context_type> new_iter_ctx (
    15741574        new iteration_context_type(ctx, native_path_str.c_str(), act_pos,
    1575             boost::wave::enable_prefer_pp_numbers(ctx.get_language())));
     1575            boost::wave::enable_prefer_pp_numbers(ctx.get_language()),
     1576            is_system ? base_iteration_context_type::system_header :
     1577                base_iteration_context_type::user_header));
    15761578
    15771579    // call the include policy trace function
  • trunk/boost/wave/wave_version.hpp

    r59538 r62146  
    1717//  BOOST_WAVE_VERSION & 0x00FF00 is the minor version
    1818//  BOOST_WAVE_VERSION & 0xFF0000 is the major version
    19 #define BOOST_WAVE_VERSION                 0x020005
     19#define BOOST_WAVE_VERSION                 0x020006
    2020
    2121//  The following defines contain the same information as above
    2222#define BOOST_WAVE_VERSION_MAJOR           2
    2323#define BOOST_WAVE_VERSION_MINOR           0
    24 #define BOOST_WAVE_VERSION_SUBMINOR        5
     24#define BOOST_WAVE_VERSION_SUBMINOR        6
    2525
    2626#endif // !defined(WAVE_VERSION_H_9D79ABDB_AC54_4C0A_89B1_F70A2DCFE21E_INCLUDED)
Note: See TracChangeset for help on using the changeset viewer.