Piethon  1.0
A Python-like interpreter using flex and bison.
Public Member Functions | List of all members
Negation Class Reference

#include <expression.h>

Inheritance diagram for Negation:
Inheritance graph
Collaboration diagram for Negation:
Collaboration graph

Public Member Functions

 Negation (Expression *e)
 
 ~Negation ()
 
virtual Number eval (const SymbolTable &, const FunctionTable &) const
 
- Public Member Functions inherited from Expression
virtual ~Expression ()
 

Additional Inherited Members

- Protected Member Functions inherited from Expression
 Expression ()
 

Detailed Description

Definition at line 49 of file expression.h.

Constructor & Destructor Documentation

◆ Negation()

Negation::Negation ( Expression e)
inline

Definition at line 51 of file expression.h.

51 : op(e) { }

◆ ~Negation()

Negation::~Negation ( )

Definition at line 14 of file expression.cpp.

14  {
15  delete op;
16 }

Member Function Documentation

◆ eval()

Number Negation::eval ( const SymbolTable st,
const FunctionTable ft 
) const
virtual

Implements Expression.

Definition at line 18 of file expression.cpp.

18  {
19  return -(op->eval(st, ft));
20 }
virtual Number eval(const SymbolTable &, const FunctionTable &) const =0

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