elftosb::SizeofOperatorASTNode Class Reference

Returns an integer that is the size in bytes of the operand. More...

`#include <ElftosbAST.h>`

Inheritance diagram for elftosb::SizeofOperatorASTNode:
[legend]
Collaboration diagram for elftosb::SizeofOperatorASTNode:
[legend]

## Public Member Functions

| SizeofOperatorASTNode (std::string *constantName)
| SizeofOperatorASTNode (SymbolASTNode *symbol)
| SizeofOperatorASTNode (const SizeofOperatorASTNode &other)
virtual ASTNode * | clone () const
| Returns an exact duplicate of this object.
virtual std::string | nodeName () const
| Returns the name of the object's class.
virtual void | printTree (int indent) const
virtual ExprASTNode * | reduce (EvalContext &context)
| Evaluate the expression and produce a result node to replace this one. More...
std::string * | getConstantName ()
SymbolASTNode * | getSymbol ()
Public Member Functions inherited from elftosb::ExprASTNode
| ExprASTNode (const ExprASTNode &other)
int_size_t | resultIntSize (int_size_t a, int_size_t b)
Public Member Functions inherited from elftosb::ASTNode
| ASTNode ()
| Default constructor.
| ASTNode (ASTNode *parent)
| Constructor taking a parent node.
| ASTNode (const ASTNode &other)
| Copy constructor.
virtual | ~ASTNode ()
| Destructor.
virtual ASTNode * | getParent () const
virtual void | setParent (ASTNode *newParent)
virtual void | printTree () const
virtual void | setLocation (token_loc_t &loc)
virtual void | setLocation (token_loc_t &first, token_loc_t &last)
virtual void | setLocation (ASTNode *loc)
virtual void | setLocation (ASTNode *first, ASTNode *last)
virtual token_loc_t & | getLocation ()
virtual const token_loc_t & | getLocation () const
virtual int | getFirstLine ()
virtual int | getLastLine ()

## Protected Attributes

smart_ptr< std::string > | m_constantName
| Name of the constant.
smart_ptr< SymbolASTNode > | m_symbol
| Symbol reference. If this is non-NULL then the constant name is used instead.
Protected Attributes inherited from elftosb::ASTNode
ASTNode * | m_parent
| Pointer to parent node of this object. May be NULL.
token_loc_t | m_location
| Location of this node in the source file.

## Additional Inherited Members

Protected Member Functions inherited from elftosb::ASTNode
void | printIndent (int indent) const
| Prints indent number of spaces.

## Detailed Description

Returns an integer that is the size in bytes of the operand.

## Member Function Documentation

ExprASTNode * SizeofOperatorASTNode::reduce | ( | EvalContext & | context | ) |

virtual

Evaluate the expression and produce a result node to replace this one.

The default implementation simply return this node unmodified. This method is responsible for deleting any nodes that are no longer needed. (?) how to delete this?

Reimplemented from elftosb::ExprASTNode.

The documentation for this class was generated from the following files:

- ElftosbAST.h
- ElftosbAST.cpp