CPreproc::If::Case¶
Stores one case of a preprocessor '#if' directive.
Synopsis¶
Declared in <src/midend/programTransformation/astOutlining/If.hh>
class Case; 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.
Type Aliases¶
| Name |
|---|
const_iterator |
const_reverse_iterator |
iterator |
reverse_iterator |
Member Functions¶
| Name | Description |
|---|---|
CaseCase(Case const& other); [constructor] | Constructors |
~Case~Case(); [destructor] | Destructor |
appendChildvoid appendChild(If*); | Makes the given '#if' a child of this case. |
beginiterator begin(); | |
dumpvoid dump(size_t level = 0); | |
enditerator end(); | |
getConditionstd::string getCondition() const; | Get the condition represented by this case. |
getDirectivestd::string getDirective() const; | Returns the directive as a string (i.e., '#if'). |
getIfIf* getIf(); | |
getInfoPreprocessingInfo* getInfo(); | |
getNodeSgLocatedNode* getNode(); | |
getRawstd::string getRaw() const; | Returns the complete, raw directive, as a string. |
isElifbool isElif() const; | Returns 'true' if this case is an '#elif'. |
isElsebool isElse() const; | Returns 'true' if this case is an '#else'. |
isEndifbool isEndif() const; | Returns 'true' if this case is an '#endif'. |
isIfbool isIf() const; | Returns 'true' if this case is a '#if'. |
isIfdefbool isIfdef() const; | Returns 'true' if this case is a '#ifdef'. |
isIfndefbool isIfndef() const; | Returns 'true' if this case is a '#ifndef'. |
rbeginreverse_iterator rbegin(); | |
rendreverse_iterator rend(); | |
setIfvoid setIf(If*); | Associates this case with a particular directive. |
Protected Member Functions¶
| Name | Description |
|---|---|
CaseCase(); [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. |
Created with MrDocs