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

#include <Arithmetic.hh>

Public Member Functions

virtual ~TokenSet ()
 Automatically generated virtual destructor for class deriving directly from ReferenceCount. More...
 
 TokenSet ()
 
void append (TokenCOP token)
 
bool empty () const
 Are there no more tokens remaining? More...
 
TokenCOP top () const
 
void pop ()
 
void log_error () const
 Print contents after parser has encountered an error. More...
 
std::string print () const
 
- Public Member Functions inherited from utility::pointer::ReferenceCount
void ctor ()
 
virtual ~ReferenceCount ()
 Destructor. More...
 
Size ref_count () const
 Reference count. More...
 

Protected Member Functions

void print_to_curr_pos () const
 in the event of an error message, print the tokens up to the current token. More...
 
- Protected Member Functions inherited from utility::pointer::ReferenceCount
 ReferenceCount ()
 Default constructor. More...
 
 ReferenceCount (ReferenceCount const &)
 Copy constructor. More...
 
ReferenceCountoperator= (ReferenceCount const &)
 Copy assignment. More...
 

Private Attributes

std::list< TokenCOPtokens_
 
std::list< TokenCOP >::iterator curr_pos_
 

Additional Inherited Members

- Public Types inherited from utility::pointer::ReferenceCount
typedef platform::Size Size
 
typedef platform::Size size_type
 

Constructor & Destructor Documentation

numeric::expression_parser::TokenSet::~TokenSet ( )
virtual

Automatically generated virtual destructor for class deriving directly from ReferenceCount.

Auto-generated virtual destructor

numeric::expression_parser::TokenSet::TokenSet ( )

Member Function Documentation

void numeric::expression_parser::TokenSet::append ( TokenCOP  token)

Appends the new token to the list and resets the token iterator to the beginning of the list

References curr_pos_, and tokens_.

bool numeric::expression_parser::TokenSet::empty ( ) const
void numeric::expression_parser::TokenSet::log_error ( ) const
void numeric::expression_parser::TokenSet::pop ( )
std::string numeric::expression_parser::TokenSet::print ( ) const

References tokens_.

void numeric::expression_parser::TokenSet::print_to_curr_pos ( ) const
protected

in the event of an error message, print the tokens up to the current token.

References utility::io::oc::cerr, curr_pos_, and tokens_.

Referenced by log_error(), and pop().

TokenCOP numeric::expression_parser::TokenSet::top ( ) const

Member Data Documentation

std::list< TokenCOP >::iterator numeric::expression_parser::TokenSet::curr_pos_
private
std::list< TokenCOP > numeric::expression_parser::TokenSet::tokens_
private

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