Cppcheck
Public Member Functions | Public Attributes | List of all members
Directive Class Reference

A preprocessor directive Each preprocessor directive (#include, #define, #undef, #if, #ifdef, #else, #endif) will be recorded as an instance of this class. More...

#include <preprocessor.h>

Public Member Functions

 Directive (std::string _file, const int _linenr, const std::string &_str)
 record a directive (possibly filtering src) More...
 

Public Attributes

std::string file
 name of (possibly included) file where directive is defined More...
 
unsigned int linenr
 line number in (possibly included) file where directive is defined More...
 
std::string str
 the actual directive text More...
 

Detailed Description

A preprocessor directive Each preprocessor directive (#include, #define, #undef, #if, #ifdef, #else, #endif) will be recorded as an instance of this class.

file and linenr denote the location where where the directive is defined.

Definition at line 49 of file preprocessor.h.

Constructor & Destructor Documentation

◆ Directive()

Directive::Directive ( std::string  _file,
const int  _linenr,
const std::string &  _str 
)

record a directive (possibly filtering src)

Definition at line 60 of file preprocessor.cpp.

Member Data Documentation

◆ file

std::string Directive::file

name of (possibly included) file where directive is defined

Definition at line 52 of file preprocessor.h.

◆ linenr

unsigned int Directive::linenr

line number in (possibly included) file where directive is defined

Definition at line 55 of file preprocessor.h.

Referenced by Preprocessor::setDirectives().

◆ str

std::string Directive::str

the actual directive text

Definition at line 58 of file preprocessor.h.

Referenced by Preprocessor::setDirectives().


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