|
souffle
2.0.2-371-g6315b36
|
Wrapper for the single branch declaration (product type) inside ADT declaration. More...
#include <BranchDeclaration.h>


Public Member Functions | |
| BranchDeclaration (std::string constructor, VecOwn< Attribute > fields, SrcLocation loc={}) | |
| BranchDeclaration * | clone () const override |
| Create a clone (i.e. More... | |
| const std::string & | getConstructor () const |
| std::vector< Attribute * > | getFields () |
Public Member Functions inherited from souffle::ast::Node | |
| virtual void | apply (const NodeMapper &) |
| Apply the mapper to all child nodes. More... | |
| std::string | extloc () const |
| Return source location of the syntactic element. More... | |
| virtual std::vector< const Node * > | getChildNodes () const |
| Obtain a list of all embedded AST child nodes. More... | |
| const SrcLocation & | getSrcLoc () const |
| Return source location of the Node. More... | |
| Node (SrcLocation loc={}) | |
| bool | operator!= (const Node &other) const |
| Inequality check for two AST nodes. More... | |
| bool | operator== (const Node &other) const |
| Equivalence check for two AST nodes. More... | |
| void | setSrcLoc (SrcLocation l) |
| Set source location for the Node. More... | |
| virtual | ~Node ()=default |
Protected Member Functions | |
| void | print (std::ostream &os) const override |
| Output to a given output stream. More... | |
Protected Member Functions inherited from souffle::ast::Node | |
| virtual bool | equal (const Node &) const |
| Abstract equality check for two AST nodes. More... | |
Private Attributes | |
| std::string | constructor |
| VecOwn< Attribute > | fields |
Wrapper for the single branch declaration (product type) inside ADT declaration.
| constructor | An entity used to create a variant type. Can be though of as a name of the branch. |
| fields | Branch arguments and their types. |
A branch declaration corresponds to a product type and forms a part of ADT declaration. Currently it's required for all the branches to have unique names.
Definition at line 48 of file BranchDeclaration.h.
|
inline |
Definition at line 50 of file BranchDeclaration.h.
References fields, and souffle::toPtrVector().

|
inlineoverridevirtual |
Create a clone (i.e.
deep copy) of this node
Implements souffle::ast::Node.
Definition at line 61 of file BranchDeclaration.h.
|
inline |
Definition at line 53 of file BranchDeclaration.h.
|
inline |
Definition at line 57 of file BranchDeclaration.h.
|
inlineoverrideprotectedvirtual |
Output to a given output stream.
Implements souffle::ast::Node.
Definition at line 66 of file BranchDeclaration.h.
|
private |
Definition at line 71 of file BranchDeclaration.h.
Definition at line 72 of file BranchDeclaration.h.
Referenced by BranchDeclaration().
1.8.17