Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
core::select::residue_selector::SelectorLogicParser Class Reference

Class to traverse the abstract syntax tree produced by the parsing of a properly-formed string in the Arithmetic expression language. Produces a ResidueSelector tree capable of logically joining together already-defined ResidueSelectors. More...

#include <SelectorLogicParser.hh>

Inheritance diagram for core::select::residue_selector::SelectorLogicParser:
Inheritance graph
[legend]

Public Member Functions

 SelectorLogicParser ()
 
 ~SelectorLogicParser () override
 
ResidueSelectorOP parse_string_to_residue_selector (basic::datacache::DataMap const &dm, std::string const &selector_logic_string)
 
ResidueSelectorOP parse_string_to_residue_selector (std::string const &input_string, std::map< std::string, ResidueSelectorOP > const &selectors)
 
void add_named_selector (std::string const &name, ResidueSelectorOP selector)
 
void visit (numeric::expression_parser::ArithmeticASTExpression const &) override
 
void visit (numeric::expression_parser::ArithmeticASTAndClause const &) override
 
void visit (numeric::expression_parser::ArithmeticASTOrClause const &) override
 
void visit (numeric::expression_parser::ArithmeticASTFunction const &) override
 
void visit (numeric::expression_parser::ArithmeticASTTerm const &) override
 
void visit (numeric::expression_parser::ArithmeticASTFactor const &) override
 
void visit (numeric::expression_parser::ArithmeticASTValue const &) override
 
void visit (numeric::expression_parser::ArithmeticASTRestTerm const &) override
 
void visit (numeric::expression_parser::ArithmeticASTRestAndClause const &) override
 
void visit (numeric::expression_parser::ArithmeticASTRestOrClause const &) override
 
void visit (numeric::expression_parser::ArithmeticASTRestExpression const &) override
 
void visit (numeric::expression_parser::ArithmeticASTNode const &) override
 
ResidueSelectorOP create_selector (numeric::expression_parser::ArithmeticASTExpression const &)
 
virtual ResidueSelectorOP handle_variable_expression (numeric::expression_parser::ArithmeticASTValue const &)
 Factory method to be implemented by derived classes which may wish to handle variable expressions in a specific manner. More...
 
virtual ResidueSelectorOP handle_function_expression (numeric::expression_parser::FunctionTokenCOP function, utility::vector1< ResidueSelectorOP > const &args)
 Factory method to be implemented by derived classes which may wish to handle function expressions in a specific manner. More...
 

Private Member Functions

ResidueSelectorOP finish_parse_string_to_residue_selector (std::string const &input_string, numeric::expression_parser::ArithmeticScanner &as)
 After creating an ArithmeticScanner and loading both it and this with the set of available ResidueSelectors, complete the scanning, parsing, and residue-selector construction steps of converting a string to a ResidueSelector. More...
 

Private Attributes

std::map< std::string,
ResidueSelectorOP
variables_
 
ResidueSelectorOP last_constructed_selector_
 
ResidueSelectorOP semi_constructed_selector_
 

Detailed Description

Class to traverse the abstract syntax tree produced by the parsing of a properly-formed string in the Arithmetic expression language. Produces a ResidueSelector tree capable of logically joining together already-defined ResidueSelectors.

Constructor & Destructor Documentation

core::select::residue_selector::SelectorLogicParser::SelectorLogicParser ( )
default
core::select::residue_selector::SelectorLogicParser::~SelectorLogicParser ( )
overridedefault

Member Function Documentation

void core::select::residue_selector::SelectorLogicParser::add_named_selector ( std::string const &  name,
ResidueSelectorOP  selector 
)

References variables_.

Referenced by parse_string_to_residue_selector().

ResidueSelectorOP core::select::residue_selector::SelectorLogicParser::create_selector ( numeric::expression_parser::ArithmeticASTExpression const &  expr)
ResidueSelectorOP core::select::residue_selector::SelectorLogicParser::finish_parse_string_to_residue_selector ( std::string const &  input_string,
numeric::expression_parser::ArithmeticScanner &  as 
)
private

After creating an ArithmeticScanner and loading both it and this with the set of available ResidueSelectors, complete the scanning, parsing, and residue-selector construction steps of converting a string to a ResidueSelector.

References create_selector(), and variables_.

Referenced by parse_string_to_residue_selector().

ResidueSelectorOP core::select::residue_selector::SelectorLogicParser::handle_function_expression ( numeric::expression_parser::FunctionTokenCOP  function,
utility::vector1< ResidueSelectorOP > const &  args 
)
virtual

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

Referenced by visit().

ResidueSelectorOP core::select::residue_selector::SelectorLogicParser::handle_variable_expression ( numeric::expression_parser::ArithmeticASTValue const &  node)
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.

References variables_.

Referenced by visit().

ResidueSelectorOP core::select::residue_selector::SelectorLogicParser::parse_string_to_residue_selector ( basic::datacache::DataMap const &  dm,
std::string const &  selector_logic_string 
)
ResidueSelectorOP core::select::residue_selector::SelectorLogicParser::parse_string_to_residue_selector ( std::string const &  input_string,
std::map< std::string, ResidueSelectorOP > const &  selectors 
)
void core::select::residue_selector::SelectorLogicParser::visit ( numeric::expression_parser::ArithmeticASTExpression const &  node)
override
void core::select::residue_selector::SelectorLogicParser::visit ( numeric::expression_parser::ArithmeticASTAndClause const &  node)
override
void core::select::residue_selector::SelectorLogicParser::visit ( numeric::expression_parser::ArithmeticASTOrClause const &  node)
override
void core::select::residue_selector::SelectorLogicParser::visit ( numeric::expression_parser::ArithmeticASTFunction const &  node)
override
void core::select::residue_selector::SelectorLogicParser::visit ( numeric::expression_parser::ArithmeticASTTerm const &  node)
override
void core::select::residue_selector::SelectorLogicParser::visit ( numeric::expression_parser::ArithmeticASTFactor const &  node)
override
void core::select::residue_selector::SelectorLogicParser::visit ( numeric::expression_parser::ArithmeticASTValue const &  node)
override
void core::select::residue_selector::SelectorLogicParser::visit ( numeric::expression_parser::ArithmeticASTRestTerm const &  node)
override
void core::select::residue_selector::SelectorLogicParser::visit ( numeric::expression_parser::ArithmeticASTRestAndClause const &  node)
override
void core::select::residue_selector::SelectorLogicParser::visit ( numeric::expression_parser::ArithmeticASTRestOrClause const &  node)
override
void core::select::residue_selector::SelectorLogicParser::visit ( numeric::expression_parser::ArithmeticASTRestExpression const &  node)
override
void core::select::residue_selector::SelectorLogicParser::visit ( numeric::expression_parser::ArithmeticASTNode const &  )
override

Member Data Documentation

ResidueSelectorOP core::select::residue_selector::SelectorLogicParser::last_constructed_selector_
private

Referenced by create_selector(), and visit().

ResidueSelectorOP core::select::residue_selector::SelectorLogicParser::semi_constructed_selector_
private

Referenced by create_selector(), and visit().

std::map< std::string, ResidueSelectorOP > core::select::residue_selector::SelectorLogicParser::variables_
private

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