template <typename ContextT, typename TokenT>
bool found_directive(ContextT const& ctx, TokenT const &directive);
+ template <typename ContextT, typename TokenT>
bool found_directive(ContextT const& ctx, TokenT const &directive);
The function found_directive is called, whenever the preprocessor has detected one of the preprocessing directives (#define, #undef, #if, #idef, #ifndef, #elif, #endif, #error, #include, #pragma or #warning) .
@@ -83,14 +100,14 @@
value is false, the directive is processed in the normal manner.
throw_exception
- template <typename ContextT, typename ExceptionT>
void throw_exception(ContextT const &ctx,
ExceptionT const& e);
+ template <typename ContextT, typename ExceptionT>
void throw_exception(ContextT const &ctx,
ExceptionT const& e);
he function throw_exception is called, whenever a preprocessing exception occurs .
The ctx parameter provides a reference to the context_type used during instantiation of the preprocessing iterators by the user.
The parameter e is the exception object containing detailed error information.
may_skipwhitespace
- template <typename ContextT, typename TokenT>
bool may_skip_whitespace(ContextT const& ctx, TokenT &token,
bool& skipped_newline);
+ template <typename ContextT, typename TokenT>
bool may_skip_whitespace(ContextT const& ctx, TokenT &token,
bool& skipped_newline);
The function may_skipwhitespace will be called by the library, whenever a token is about to be returned to the calling application.
@@ -104,7 +121,8 @@
Conditional compilation hook functions
evaluated_conditional_expression
- template <typename ContextT, typename TokenT, typename ContainerT>
bool evaluated_conditional_expression(ContextT const& ctx,
TokenT const& directive, ContainerT const& expression,
bool expression_value);
+ template <typename ContextT, typename TokenT, typename ContainerT>
+ bool evaluated_conditional_expression(ContextT const& ctx,
TokenT const& directive, ContainerT const& expression,
bool expression_value);
The function evaluated_conditional_expression is called, whenever the preprocessor has encountered a #if, #elif, #ifdef or #ifndef directive. This hook gets passed the non-expanded conditional
@@ -124,7 +142,7 @@
skipped_token
- template <typename ContextT, typename TokenT>
void skipped_token(ContextT const& ctx, TokenT const& token);
+ template <typename ContextT, typename TokenT>
void skipped_token(ContextT const& ctx, TokenT const& token);
The function skipped_token is called, whenever a token is about to be skipped due to a false preprocessor condition (code fragments to be
@@ -134,7 +152,7 @@
The parameter token refers to the token to be skipped.
generated_token
- template <typename ContextT, typename TokenT>
TokenT const& generated_token(ContextT const& ctx, TokenT const& token);
+ template <typename ContextT, typename TokenT>
TokenT const& generated_token(ContextT const& ctx, TokenT const& token);
The function generated_token is called, whenever a token is about to be returned from the library.
@@ -148,7 +166,7 @@
Macro expansion tracking functions
expanding_function_like_macro
- template <typename ContextT, typename TokenT, typename ContainerT>
bool expanding_function_like_macro(
ContextT const& ctx, TokenT const ¯odef,
std::vector<TokenT> const &formal_args,
ContainerT const &definition, TokenT const ¯ocall,
std::vector<ContainerT> const &arguments,
IteratorT const &seqstart, Iterator const &seqend);
+ template <typename ContextT, typename TokenT, typename ContainerT>
bool expanding_function_like_macro(
ContextT const& ctx, TokenT const ¯odef,
std::vector<TokenT> const &formal_args,
ContainerT const &definition, TokenT const ¯ocall,
std::vector<ContainerT> const &arguments,
IteratorT const &seqstart, Iterator const &seqend);
The function expanding_function_like_macro is called, whenever a
function-like macro is to be expanded, i.e. before the actual expansion
@@ -181,7 +199,7 @@
expanding_object_like_macro
- template <typename ContextT, typename TokenT, typename ContainerT>
bool expanding_object_like_macro(
ContextT const& ctx, TokenT const ¯o,
ContainerT const &definition, TokenT const ¯ocall);
+ template <typename ContextT, typename TokenT, typename ContainerT>
bool expanding_object_like_macro(
ContextT const& ctx, TokenT const ¯o,
ContainerT const &definition, TokenT const ¯ocall);
The function expanding_object_like_macro is called, whenever a object-like
@@ -201,7 +219,7 @@
expanded_macro
- template <typename ContextT, typename ContainerT>
void expanded_macro(ContextT const& ctx, ContainerT const &result);
+ template <typename ContextT, typename ContainerT>
void expanded_macro(ContextT const& ctx, ContainerT const &result);
The function expanded_macro is called whenever the expansion of
@@ -213,7 +231,7 @@
so far. This is a standard STL container containing the generated token sequence.
rescanned_macro
- template <typename ContextT, typename ContainerT>
void rescanned_macro(ContextT const& ctx, ContainerT const &result);
+ template <typename ContextT, typename ContainerT>
void rescanned_macro(ContextT const& ctx, ContainerT const &result);
The function rescanned_macro is called whenever the rescanning
@@ -226,7 +244,7 @@
Include file tracing functions
found_include_directive
- template <typename ContextT>
bool found_include_directive(ContextT const& ctx,
std::string const &filename, bool include_next);
+ template <typename ContextT>
bool found_include_directive(ContextT const& ctx,
std::string const &filename, bool include_next);
The function found_include_directive is called whenever whenever a #include directive was located..
@@ -246,7 +264,7 @@
opened_include_file
- template <typename ContextT>
void opened_include_file(ContextT const& ctx,
std::string const &rel_filename, std::string const &abs_filename,
bool is_system_include);
+ template <typename ContextT>
void opened_include_file(ContextT const& ctx,
std::string const &rel_filename, std::string const &abs_filename,
bool is_system_include);
The function opened_include_file is called whenever a file referred
@@ -263,7 +281,7 @@
as a result of a #include <...> directive.
returning_from_include_file
- template <typename ContextT>
void returning_from_include_file(ContextT const& ctx);
+ template <typename ContextT>
void returning_from_include_file(ContextT const& ctx);
The function returning_from_include_file is called whenever an
@@ -271,6 +289,43 @@
The ctx parameter provides a reference to the context_type used during instantiation of the preprocessing iterators by the user.
Note, this parameter was added for the Boost V1.35.0 release.
+detected_include_guard
+ template <typename ContextT>
void detected_include_guard(ContextT const& ctx,
+ std::string const& filename,
+ std::string const& include_guard);
+
+
+ The function detected_include_guard is called whenever an
+ include file is about to be added to the list of #pragma once headers as the
+ result of a detected include guard scheme. That means this header file will
+ not be opened and parsed again even if it is specified in a later
+ #include directive.
+ The ctx parameter provides a reference to the context_type
+ used during instantiation of the preprocessing iterators by the user.
+ The parameter filename contains the file system path of the opened file
+ (this is relative to the directory of the currently processed file or a
+ absolute path depending on the paths given as the include search paths).
+ The parameter include_guard contains the name of the detected include guard.
+
+detected_pragma_once
+ template <typename ContextT, typename TokenT>
void detected_pragma_once(ContextT const& ctx,
+ TokenT const& pragma_token,
+ std::string const& filename);
+
+ The function detected_pragma_once is called whenever either an
+ include file is about to be added to the list of #pragma once headers as the
+ result of a detected #pragma once
+ directive. That means this header file will not be opened and parsed
+ again even if it is specified in a later #include
+ directive.
+ The ctx parameter provides a reference to the context_type
+ used during instantiation of the preprocessing iterators by the user.
+ The parameter pragma_token refers to the token "#pragma"
+ triggering this preprocessing hook.
+ The parameter filename contains the file system path of the opened file
+ (this is relative to the directory of the currently processed file or a
+ absolute path depending on the paths given as the include search paths).
+
Interpretation of #pragma's
interpret_pragma
template <typename ContextT, typename ContextT, typename ContainerT>
bool interpret_pragma(ContextT const &ctx, ContainerT &pending,
typename ContextT::token_type const &option,
ContainerT const &values,
typename ContextT::token_type const &pragma_token);
@@ -346,7 +401,7 @@
exception of the type error_directive (normal execution continues), if the return value is true the execution continues as if no #error directive has been found and the overall directive is replaced by a single newline.
found_line_drective
- template <typename ContextT, typename ContainerT>
void found_line_drective(ContextT const& ctx,
ContainerT const &arguments, unsigned int line,
std::string const& filename);
+ template <typename ContextT, typename ContainerT>
void found_line_drective(ContextT const& ctx,
ContainerT const &arguments, unsigned int line,
std::string const& filename);
The function found_line_directive is called whenever a #line directive has been encountered. Note, this function was added for the Boost V1.35.0 release.
@@ -373,7 +428,8 @@
1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
Last updated:
- Tuesday, October 14, 2008 18:45
+ Thursday, September 18, 2009
+09:10