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>

Inherits Puma::PreTreeComposite.

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:
i The #include or #include_next token.
tl The 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:
v The visitor object on which to call the visiting functions.

Implements Puma::PreTreeComposite.

void Puma::PreIncludeDirective::depth ( int  d  )  [inline]

Set the depth of nested inclusion.

Parameters:
d The depth of inclusion.
int Puma::PreIncludeDirective::depth (  )  const [inline]

Get the depth of nested inclusion.

Returns:
The depth or -1 for a top-level include.
bool Puma::PreIncludeDirective::is_forced (  )  const [inline]

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




Puma Reference Manual. Created on 18 Sep 2009.