Puma Reference Manual Puma: Puma::PreIncludeDirective Class Reference



Puma::PreIncludeDirective Class Reference

Preprocessor tree node representing an #include or #include_next directive. More...

#include <Puma/PreTreeNodes.h>

Inheritance diagram for Puma::PreIncludeDirective:
Inheritance graph

List of all members.

Public Member Functions

 PreIncludeDirective (PreTree *i, PreTree *tl)
 Constructor.
void accept (PreVisitor &v)
 Part of the tree visitor pattern.
int depth () const
 Get the depth of nested inclusion.
void depth (int d)
 Set the depth of nested inclusion.
bool is_forced () const
 Check if this is a forced include (given by command line).

Detailed Description

Preprocessor tree node representing an #include or #include_next directive.

Example:

 #include <stdio.h> 

Constructor & Destructor Documentation

Puma::PreIncludeDirective::PreIncludeDirective ( PreTree i,
PreTree tl 
) [inline]

Constructor.

Parameters:
iThe #include or #include_next token.
tlThe remaining tokens of the line containing the file to include.

Member Function Documentation

void Puma::PreIncludeDirective::accept ( PreVisitor v) [inline, virtual]

Part of the tree visitor pattern.

Calls the node visiting functions suitable for this node type.

Parameters:
vThe visitor object on which to call the visiting functions.

Implements Puma::PreTreeComposite.

int Puma::PreIncludeDirective::depth ( ) const [inline]

Get the depth of nested inclusion.

Returns:
The depth or -1 for a top-level include.
void Puma::PreIncludeDirective::depth ( int  d) [inline]

Set the depth of nested inclusion.

Parameters:
dThe depth of inclusion.
bool Puma::PreIncludeDirective::is_forced ( ) const [inline]

Check if this is a forced include (given by command line).