CPreproc::If¶
Stores a preprocessor '#if' directive and nested directives.
Synopsis¶
Declared in <src/midend/programTransformation/astOutlining/If.hh>
class If; Description¶
If represents one instance of a preprocessor '#if' directive, including all its cases. That is, a If object corresponding to the following '#if' directive,
#if C_1 ... #elif C_2 ... #elif C_k ... #endif // k+1
stores a sequence of k cases plus the final '#endif'. One may view a If object as a container of cases (If::Cases).
In addition, If represents the complete tree of nested '#if' directives. See the case object, If::Case, for more information.
Types¶
| Name | Description |
|---|---|
Case | Stores one case of a preprocessor '#if' directive. |
Type Aliases¶
| Name | Description |
|---|---|
Cases_t | Stores the cases composing an '#if' directive. |
const_iterator | |
const_reverse_iterator | |
iterator | |
reverse_iterator |
Member Functions¶
| Name | Description |
|---|---|
IfIf(); [constructor] | Default constructor. |
~If~If(); [destructor] | Destructor---frees memory associated with cases. |
appendCaseCase* appendCase( PreprocessingInfo*, SgLocatedNode*); | Appends a new case. |
beginiterator begin(); | |
enditerator end(); | |
firstCaseCase* firstCase(); | |
getParentCase* getParent(); | |
isValidbool isValid() const; | Returns 'true' if this appears to be a complete '#if' directive. |
lastCaseCase* lastCase(); | |
rbeginreverse_iterator rbegin(); | |
rendreverse_iterator rend(); | |
setParentvoid setParent(If::Case*); | Sets the parent directive. |
Private Data Members¶
| Name | Description |
|---|---|
cases_ | Stores the cases composing this directive. |
parent_ | Parent directive (may be NULL). |
Created with MrDocs