Rosetta Utilities  2014.35
Public Member Functions | Private Attributes | List of all members
numeric::expression_parser::SimpleExpressionCreator Class Reference

#include <Arithmetic.hh>

Public Member Functions

 SimpleExpressionCreator ()
 
 SimpleExpressionCreator (std::list< std::string > const &varnames)
 
void add_variable (std::string const &varname)
 
virtual ExpressionCOP handle_variable_expression (ArithmeticASTValue const &)
 Factory method to be implemented by derived classes which may wish to handle variable expressions in a specific manner. More...
 
VariableExpressionOP get_variable (std::string const &varname)
 
std::map< std::string,
VariableExpressionOP
variables () const
 
- Public Member Functions inherited from numeric::expression_parser::ExpressionCreator
 ExpressionCreator ()
 
 ~ExpressionCreator ()
 
virtual void visit (ArithmeticASTExpression const &)
 
virtual void visit (ArithmeticASTFunction const &)
 
virtual void visit (ArithmeticASTTerm const &)
 
virtual void visit (ArithmeticASTFactor const &)
 
virtual void visit (ArithmeticASTValue const &)
 
virtual void visit (ArithmeticASTRestTerm const &)
 
virtual void visit (ArithmeticASTRestExpression const &)
 
virtual void visit (ArithmeticASTNode const &)
 
ExpressionCOP create_expression_tree (ArithmeticASTExpression const &)
 
virtual ExpressionCOP handle_function_expression (FunctionTokenCOP function, utility::vector1< ExpressionCOP > const &args)
 Factory method to be implemented by derived classes which may wish to handle function expressions in a specific manner. More...
 
- Public Member Functions inherited from numeric::expression_parser::ASTVisitor
virtual ~ASTVisitor ()
 Automatically generated virtual destructor for class deriving directly from ReferenceCount. More...
 
- Public Member Functions inherited from utility::pointer::ReferenceCount
void ctor ()
 
virtual ~ReferenceCount ()
 Destructor. More...
 
Size ref_count () const
 Reference count. More...
 

Private Attributes

std::map< std::string,
VariableExpressionOP
variables_
 

Additional Inherited Members

- Public Types inherited from utility::pointer::ReferenceCount
typedef platform::Size Size
 
typedef platform::Size size_type
 
- Protected Member Functions inherited from utility::pointer::ReferenceCount
 ReferenceCount ()
 Default constructor. More...
 
 ReferenceCount (ReferenceCount const &)
 Copy constructor. More...
 
ReferenceCountoperator= (ReferenceCount const &)
 Copy assignment. More...
 

Constructor & Destructor Documentation

numeric::expression_parser::SimpleExpressionCreator::SimpleExpressionCreator ( )
numeric::expression_parser::SimpleExpressionCreator::SimpleExpressionCreator ( std::list< std::string > const &  varnames)

References add_variable().

Member Function Documentation

void numeric::expression_parser::SimpleExpressionCreator::add_variable ( std::string const &  varname)
VariableExpressionOP numeric::expression_parser::SimpleExpressionCreator::get_variable ( std::string const &  varname)
ExpressionCOP numeric::expression_parser::SimpleExpressionCreator::handle_variable_expression ( ArithmeticASTValue const &  )
virtual

Factory method to be implemented by derived classes which may wish to handle variable expressions in a specific manner.

Factory method to be implemented by derived classes which may wish to handle variable expressions differently.

Reimplemented from numeric::expression_parser::ExpressionCreator.

References numeric::expression_parser::ArithmeticASTValue::is_literal(), numeric::expression_parser::ArithmeticASTValue::literal_value(), utility::to_string(), utility_exit_with_message, numeric::expression_parser::ArithmeticASTValue::variable_name(), and variables_.

std::map< std::string, VariableExpressionOP > numeric::expression_parser::SimpleExpressionCreator::variables ( ) const

References variables_.

Member Data Documentation

std::map< std::string, VariableExpressionOP > numeric::expression_parser::SimpleExpressionCreator::variables_
private

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