Gromacs  2019-beta2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
#include "parsetree.h"
#include "selelem.h"
+ Include dependency graph for keywords.h:
+ This graph shows which files directly or indirectly include this file:

Description

Definitions of generic keyword evaluation structures.

This is an implementation header: there should be no need to use it outside this directory.

Author
Teemu Murtola teemu.nosp@m..mur.nosp@m.tola@.nosp@m.gmai.nosp@m.l.com

Functions

void _gmx_selelem_print_compare_info (FILE *fp, void *data)
 Prints information about a comparison expression. More...
 
bool _gmx_selelem_is_default_kwpos (const gmx::SelectionTreeElement &sel)
 Returns whether the selection element is a default position keyword. More...
 
void _gmx_selelem_set_kwpos_type (gmx::SelectionTreeElement *sel, const char *type)
 Sets the position type for position keyword evaluation. More...
 
void _gmx_selelem_set_kwpos_flags (gmx::SelectionTreeElement *sel, int flags)
 Sets the flags for position keyword evaluation. More...
 
void _gmx_selelem_set_kwstr_match_type (const gmx::SelectionTreeElementPointer &sel, gmx::SelectionStringMatchType matchType)
 Sets the string match type for string keyword evaluation. More...
 
void _gmx_selelem_custom_init_same (struct gmx_ana_selmethod_t **method, const gmx::SelectionParserParameterListPointer &params, void *scanner)
 Does custom processing for parameters of the same selection method. More...
 
gmx::SelectionTreeElementPointer _gmx_sel_init_keyword_evaluator (struct gmx_ana_selmethod_t *method, const gmx::SelectionTreeElementPointer &child, void *scanner)
 Initializes a selection element for evaluating a keyword in a given group. More...
 

Variables

struct gmx_ana_selmethod_t sm_compare
 Selection method data for comparison expression evaluation. More...
 
struct gmx_ana_selmethod_t sm_keyword_int
 Selection method data for integer keyword evaluation. More...
 
struct gmx_ana_selmethod_t sm_keyword_real
 Selection method data for real keyword evaluation. More...
 
struct gmx_ana_selmethod_t sm_keyword_str
 Selection method data for string keyword evaluation. More...
 
struct gmx_ana_selmethod_t sm_keyword_pos
 Selection method data for position keyword evaluation. More...
 

Function Documentation

gmx::SelectionTreeElementPointer _gmx_sel_init_keyword_evaluator ( struct gmx_ana_selmethod_t method,
const gmx::SelectionTreeElementPointer child,
void *  scanner 
)

Initializes a selection element for evaluating a keyword in a given group.

Parameters
[in]methodKeyword selection method to evaluate.
[in]childThe group/positions to evaluate method in.
[in]scannerScanner data structure.
Returns
Pointer to the created selection element.

Creates a SEL_EXPRESSION selection element that evaluates the keyword method given by method in the group/positions given by child.

child should be a selection tree that evaluates to GROUP_VALUE or POS_VALUE.

void _gmx_selelem_custom_init_same ( gmx_ana_selmethod_t **  method,
const gmx::SelectionParserParameterListPointer params,
void *  scanner 
)

Does custom processing for parameters of the same selection method.

Parameters
[in,out]methodThe method to initialize.
[in,out]paramsPointer to the first parameter.
[in]scannerScanner data structure.

If *method is not a same method, this function returns immediately.

bool _gmx_selelem_is_default_kwpos ( const gmx::SelectionTreeElement sel)

Returns whether the selection element is a default position keyword.

Parameters
[in]selSelection element to query.
Returns
true if sel represents a position keyword evaluation that uses the default (implicit) position keyword.

This method only works before the selection has been compiled.

void _gmx_selelem_print_compare_info ( FILE *  fp,
void *  data 
)

Prints information about a comparison expression.

Parameters
[in]fpFile to receive the output.
[in]dataShould point to a t_methoddata_compare.
void _gmx_selelem_set_kwpos_flags ( gmx::SelectionTreeElement sel,
int  flags 
)

Sets the flags for position keyword evaluation.

Parameters
[in,out]selSelection element to initialize.
[in]flagsDefault completion flags (see PositionCalculationCollection::typeFromEnum()).

Initializes the flags for position evaluation. If called multiple times, the first setting takes effect, and later calls are neglected.

void _gmx_selelem_set_kwpos_type ( gmx::SelectionTreeElement sel,
const char *  type 
)

Sets the position type for position keyword evaluation.

Parameters
[in,out]selSelection element to initialize.
[in]typeOne of the enum values acceptable for PositionCalculationCollection::typeFromEnum().

Initializes the reference position type for position evaluation. If called multiple times, the first setting takes effect, and later calls are neglected.

void _gmx_selelem_set_kwstr_match_type ( const gmx::SelectionTreeElementPointer sel,
gmx::SelectionStringMatchType  matchType 
)

Sets the string match type for string keyword evaluation.

Parameters
[in,out]selSelection element to initialize.
[in]matchTypeMethod to use to match string values.

Sets the string matching method for string keyword matching.

Variable Documentation

struct gmx_ana_selmethod_t sm_compare

Selection method data for comparison expression evaluation.

Selection method data for comparison expression evaluation.

struct gmx_ana_selmethod_t sm_keyword_int

Selection method data for integer keyword evaluation.

struct gmx_ana_selmethod_t sm_keyword_pos

Selection method data for position keyword evaluation.

struct gmx_ana_selmethod_t sm_keyword_real

Selection method data for real keyword evaluation.

struct gmx_ana_selmethod_t sm_keyword_str

Selection method data for string keyword evaluation.