Gromacs  2025.0-dev-20241011-013a99c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
gmx::SelectionParserParameter Class Reference

#include <gromacs/selection/parsetree.h>

Description

Describes a parsed method parameter.

Public Member Functions

const std::string & name () const
 Returns the name of the parameter (may be empty).
 
const SelectionLocationlocation () const
 Returns the location of this parameter in the parsed selection text.
 
const SelectionParserValueListvalues () const
 Returns the values for the parameter.
 

Static Public Member Functions

static
SelectionParserParameterListPointer 
createList ()
 Allocates and initializes an empty parameter list.
 
static SelectionParserParameter create (const char *name, SelectionParserValueListPointer values, const SelectionLocation &location)
 Allocates and initializes a parsed method parameter. More...
 
static SelectionParserParameter create (const std::string &name, SelectionParserValueListPointer values, const SelectionLocation &location)
 Allocates and initializes a parsed method parameter. More...
 
static SelectionParserParameter create (const char *name, const SelectionParserValue &value, const SelectionLocation &location)
 Allocates and initializes a parsed method parameter. More...
 
static SelectionParserParameter createFromExpression (const char *name, const SelectionTreeElementPointer &expr)
 Allocates and initializes a parsed method parameter. More...
 
static SelectionParserParameter createFromExpression (const std::string &name, const SelectionTreeElementPointer &expr)
 Allocates and initializes a parsed method parameter. More...
 

Public Attributes

SelectionParserValueListPointer values_
 Values for this parameter.
 

Member Function Documentation

static SelectionParserParameter gmx::SelectionParserParameter::create ( const char *  name,
SelectionParserValueListPointer  values,
const SelectionLocation location 
)
inlinestatic

Allocates and initializes a parsed method parameter.

Parameters
[in]nameName for the new parameter (can be NULL).
[in]valuesList of values for the parameter.
[in]locationLocation of the parameter.
Returns
Pointer to the newly allocated parameter.
Exceptions
std::bad_allocif out of memory.
static SelectionParserParameter gmx::SelectionParserParameter::create ( const std::string &  name,
SelectionParserValueListPointer  values,
const SelectionLocation location 
)
inlinestatic

Allocates and initializes a parsed method parameter.

Parameters
[in]nameName for the new parameter (can be NULL).
[in]valuesList of values for the parameter.
[in]locationLocation of the parameter.
Returns
Pointer to the newly allocated parameter.
Exceptions
std::bad_allocif out of memory.
static SelectionParserParameter gmx::SelectionParserParameter::create ( const char *  name,
const SelectionParserValue value,
const SelectionLocation location 
)
inlinestatic

Allocates and initializes a parsed method parameter.

Parameters
[in]nameName for the new parameter (can be NULL).
[in]valueValue for the parameter.
[in]locationLocation of the parameter.
Returns
Pointer to the newly allocated parameter.
Exceptions
std::bad_allocif out of memory.

This overload is a convenience wrapper for the case when creating parameters outside the actual Bison parser and only a single value is necessary.

static SelectionParserParameter gmx::SelectionParserParameter::createFromExpression ( const char *  name,
const SelectionTreeElementPointer expr 
)
inlinestatic

Allocates and initializes a parsed method parameter.

Parameters
[in]nameName for the new parameter (can be NULL).
[in]exprExpression value for the parameter.
Returns
Pointer to the newly allocated parameter.
Exceptions
std::bad_allocif out of memory.

This overload is a convenience wrapper for the case when creating parameters outside the actual Bison parser and only a single expression value is necessary.

static SelectionParserParameter gmx::SelectionParserParameter::createFromExpression ( const std::string &  name,
const SelectionTreeElementPointer expr 
)
inlinestatic

Allocates and initializes a parsed method parameter.

Parameters
[in]nameName for the new parameter (can be NULL).
[in]exprExpression value for the parameter.
Returns
Pointer to the newly allocated parameter.
Exceptions
std::bad_allocif out of memory.

This overload is a convenience wrapper for the case when creating parameters outside the actual Bison parser and only a single expression value is necessary.


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