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

#include <Arithmetic.hh>

Public Member Functions

virtual ~ArithmeticScanner ()
 Automatically generated virtual destructor for class deriving directly from ReferenceCount. More...
 
 ArithmeticScanner ()
 Constructor which adds the "standard" set of min, max and sqrt functions. More...
 
 ArithmeticScanner (bool)
 Constructor which does not add the "standard" set of min, max and sqrt functions. More...
 
void add_standard_functions ()
 Add the functions min, max and sqrt. More...
 
void add_variable (std::string const &name)
 
void add_function (std::string const &name, numeric::Size nargs)
 
TokenSetOP scan (std::string const &input_string)
 
- Public Member Functions inherited from utility::pointer::ReferenceCount
void ctor ()
 
virtual ~ReferenceCount ()
 Destructor. More...
 
Size ref_count () const
 Reference count. More...
 

Private Member Functions

LiteralTokenOP scan_literal (std::string const &input_string) const
 
TokenOP scan_identifier (std::string const &input_string) const
 
void log_error () const
 print the contents of functions_ and variables_ to std error More...
 

Private Attributes

std::map< std::string,
numeric::Size
functions_
 
std::map< std::string,
numeric::Size
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::ArithmeticScanner::~ArithmeticScanner ( )
virtual

Automatically generated virtual destructor for class deriving directly from ReferenceCount.

Auto-generated virtual destructor

numeric::expression_parser::ArithmeticScanner::ArithmeticScanner ( )

Constructor which adds the "standard" set of min, max and sqrt functions.

References add_standard_functions().

numeric::expression_parser::ArithmeticScanner::ArithmeticScanner ( bool  )

Constructor which does not add the "standard" set of min, max and sqrt functions.

Member Function Documentation

void numeric::expression_parser::ArithmeticScanner::add_function ( std::string const &  name,
numeric::Size  nargs 
)
void numeric::expression_parser::ArithmeticScanner::add_standard_functions ( )

Add the functions min, max and sqrt.

References add_function().

Referenced by ArithmeticScanner().

void numeric::expression_parser::ArithmeticScanner::add_variable ( std::string const &  name)
void numeric::expression_parser::ArithmeticScanner::log_error ( ) const
private

print the contents of functions_ and variables_ to std error

References utility::io::oc::cerr, functions_, and variables_.

Referenced by scan_identifier().

TokenSetOP numeric::expression_parser::ArithmeticScanner::scan ( std::string const &  input_string)
TokenOP numeric::expression_parser::ArithmeticScanner::scan_identifier ( std::string const &  input_string) const
private
LiteralTokenOP numeric::expression_parser::ArithmeticScanner::scan_literal ( std::string const &  input_string) const
private

Member Data Documentation

std::map< std::string, numeric::Size > numeric::expression_parser::ArithmeticScanner::functions_
private
std::map< std::string, numeric::Size > numeric::expression_parser::ArithmeticScanner::variables_
private

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