Loading [MathJax]/extensions/tex2jax.js
libSBML C++ API  5.20.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MultiASTPlugin.cpp File Reference

Implementation of MultiASTPlugin, the plugin class of multi package for the AST element. More...

Include dependency graph for MultiASTPlugin.cpp:

Macros

#define GET_NTH_CHILD(result, n, node)
 
#define GET_NUM_CHILDREN(result, node)
 

Detailed Description

Implementation of MultiASTPlugin, the plugin class of multi package for the AST element.

Author
Sarah Keating

Macro Definition Documentation

◆ GET_NTH_CHILD

#define GET_NTH_CHILD (   result,
  n,
  node 
)
Value:
{\
ASTFunction* tmp = dynamic_cast<ASTFunction*>(node); \
if (tmp != NULL) result = tmp->getChild(n); \
else\
{\
ASTNode* tmp2 = dynamic_cast<ASTNode*>(node);\
if (tmp2 != NULL)\
result= tmp2->getChild(n); \
else result = NULL;\
}\
}
Definition: ASTNode.h:221
ASTNode * getChild(unsigned int n) const
Returns the child at index n of this node.
Definition: ASTNode.cpp:1019

◆ GET_NUM_CHILDREN

#define GET_NUM_CHILDREN (   result,
  node 
)
Value:
{\
ASTFunction* tmp = dynamic_cast<ASTFunction*>(node);\
if (tmp != NULL) result= tmp->getNumChildren(); \
else\
{\
ASTNode* tmp2 = dynamic_cast<ASTNode*>(node);\
if (tmp2 != NULL)\
result= tmp2->getNumChildren(); \
else result = 0;\
}\
}
unsigned int getNumChildren() const
Returns the number of children of this node.
Definition: ASTNode.cpp:1060