coan  6.0.1
A C/C++ Configuration Analyzer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
hash_include Struct Reference

struct hash_include encapsulates an #include directive. More...

#include <hash_include.h>

Inheritance diagram for hash_include:
no_copy

Public Member Functions

 hash_include (std::string const &arg)
 Explicitly construct from the argument of an #include directive. More...
 
 hash_include (chewer< parse_buffer > &chew)
 Explicitly construct from the argument of an #include directive. More...
 
std::shared_ptr< referencesymbolic_argument () const
 Say whether the body of an #include directive is a macro-reference. More...
 
std::string filename () const
 Return the header file expression. More...
 
bool system_header () const
 Test whether the #include specifies a system header, i.e. <headername> More...
 
bool local_header () const
 Test whether the #include specifies a local header, i.e. "headername". More...
 
bool valid () const
 Say whether the #include directive is valid.
 
void report ()
 Report the #include directive.
 

Private Member Functions

std::string read (chewer< parse_buffer > &chew)
 Read the body of an #include directive. More...
 

Private Attributes

std::shared_ptr< reference_ref
 A pointer to the #include argument as a reference, if it one, else a null pointer.
 
directive< HASH_INCLUDE_directive
 The member handles reporting the #include directive.
 

Detailed Description

struct hash_include encapsulates an #include directive.

Definition at line 50 of file hash_include.h.

Constructor & Destructor Documentation

hash_include::hash_include ( std::string const &  arg)
inlineexplicit

Explicitly construct from the argument of an #include directive.

Parameters
argThe body of the #include directive

Definition at line 58 of file hash_include.h.

hash_include::hash_include ( chewer< parse_buffer > &  chew)
inlineexplicit

Explicitly construct from the argument of an #include directive.

Parameters
chewOn entry, a chewer<parse_buffer> positioned at the offset in the associated parse_buffer from which to scan. On returnchew is positioned to the first offset not consumed.

Definition at line 67 of file hash_include.h.

Member Function Documentation

std::string hash_include::filename ( ) const
inline

Return the header file expression.

Returns
If the body of the #include is a macro-reference of a configured symbol then result of resolving that reference is returned. Otherwise the returned string is the same as returned by argument().

Definition at line 88 of file hash_include.h.

bool hash_include::local_header ( ) const
inline

Test whether the #include specifies a local header, i.e. "headername".

Returns
True iff the #include specifies a local header.

system_header() and local_header() are not mutually exclusive, as a symbolic #include argument may fail to resolve as either.

Definition at line 111 of file hash_include.h.

string hash_include::read ( chewer< parse_buffer > &  chew)
private

Read the body of an #include directive.

Parameters
chewOn entry, a chewer<parse_buffer> positioned at the offset in the associated parse_buffer from which to scan. On returnchew is positioned to the first offset not consumed.
Returns
The parsed argument.

Definition at line 63 of file hash_include.cpp.

std::shared_ptr<reference> hash_include::symbolic_argument ( ) const
inline

Say whether the body of an #include directive is a macro-reference.

Returns
If the body of the directive is a putative macro reference a pointer to that reference is returned, else a null pointer.

Definition at line 77 of file hash_include.h.

bool hash_include::system_header ( ) const
inline

Test whether the #include specifies a system header, i.e. <headername>

Returns
True iff the #include specifies a system header.

Definition at line 98 of file hash_include.h.


The documentation for this struct was generated from the following files: