Skip to content

CPreproc::If::Case

Stores one case of a preprocessor '#if' directive.

Synopsis

Declared in <src/midend/programTransformation/astOutlining/If.hh>

class Case;

Member Functions

Name

Description

Case [constructor]

Constructors

appendChild

Makes the given '#if' a child of this case.

begin

dump

end

getCondition

Get the condition represented by this case.

getDirective

Returns the directive as a string (i.e., '#if').

getIf

getInfo

getNode

getRaw

Returns the complete, raw directive, as a string.

isElif

Returns 'true' if this case is an '#elif'.

isElse

Returns 'true' if this case is an '#else'.

isEndif

Returns 'true' if this case is an '#endif'.

isIf

Returns 'true' if this case is a '#if'.

isIfdef

Returns 'true' if this case is a '#ifdef'.

isIfndef

Returns 'true' if this case is a '#ifndef'.

rbegin

rend

setIf

Associates this case with a particular directive.

Protected Member Functions

Name

Description

Case [constructor]

The default constructor, hidden to prevent users from instantiating a case without specifying the actual directive (PreprocessingInfo object and AST node).

Private Data Members

Name

Description

info_

Raw preprocessing info object that this case represents.

kids_

Child directives.

node_

AST node to which this case is physically attached.

parent_

The directive of which this case is a part.

Description

A If::Case object stores a particular case, identified through a (PreprocessingInfo, SgLocatedNode) pair. It also stores pointers to child If objects, representing nested '#if' directives.

Created with MrDocs