OpenMD 3.1
Molecular Dynamics in the Open
|
ASTPair: utility class used for manipulating a pair of ASTs representing the current AST root and current AST sibling. More...
#include <ASTPair.hpp>
Public Member Functions | |
void | advanceChildToEnd () |
Make sure that child is the last sibling. | |
std::string | toString () const |
Copy an ASTPair. | |
Public Attributes | |
RefAST | root |
RefAST | child |
ASTPair: utility class used for manipulating a pair of ASTs representing the current AST root and current AST sibling.
This exists to compensate for the lack of pointers or 'var' arguments in Java.
OK, so we can do those things in C++, but it seems easier to stick with the Java way for now.
Definition at line 26 of file ASTPair.hpp.
|
inline |
Make sure that child is the last sibling.
Definition at line 32 of file ASTPair.hpp.
References antlr::AST::getNextSibling().
Referenced by antlr::ASTFactory::addASTChild(), and antlr::ASTFactory::makeASTRoot().
|
inline |
Copy an ASTPair.
Don't call it clone() because we want type-safety
Definition at line 46 of file ASTPair.hpp.
References antlr::AST::getText().
RefAST antlr::ASTPair::child |
Definition at line 29 of file ASTPair.hpp.
RefAST antlr::ASTPair::root |
Definition at line 28 of file ASTPair.hpp.