Cppcheck
Public Member Functions | Public Attributes | List of all members
Directive Struct 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 46 of file preprocessor.cpp.

Member Data Documentation

◆ file

std::string Directive::file

name of (possibly included) file where directive is defined

Definition at line 51 of file preprocessor.h.

◆ linenr

unsigned int Directive::linenr

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

Definition at line 54 of file preprocessor.h.

Referenced by Preprocessor::createDirectives().

◆ str

std::string Directive::str

the actual directive text

Definition at line 57 of file preprocessor.h.

Referenced by Preprocessor::createDirectives().


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