|
Gromacs
2025.3
|
#include "gmxpre.h"#include "selelem.h"#include <cstring>#include <filesystem>#include "gromacs/math/vectypes.h"#include "gromacs/selection/indexutil.h"#include "gromacs/selection/position.h"#include "gromacs/selection/selectionenums.h"#include "gromacs/selection/selparam.h"#include "gromacs/selection/selvalue.h"#include "gromacs/utility/exceptions.h"#include "gromacs/utility/fatalerror.h"#include "gromacs/utility/gmxassert.h"#include "gromacs/utility/smalloc.h"#include "gromacs/utility/stringutil.h"#include "keywords.h"#include "mempool.h"#include "poscalc.h"#include "selmethod.h"
Include dependency graph for selelem.cpp:Implements functions in selelem.h.
Functions | |
| const char * | _gmx_selelem_type_str (const gmx::SelectionTreeElement &sel) |
| Returns a string representation of the type of a gmx::SelectionTreeElement. More... | |
| const char * | _gmx_sel_value_type_str (const gmx_ana_selvalue_t *val) |
Returns a string representation of the type of a gmx_ana_selvalue_t. More... | |
| const char * | _gmx_selelem_boolean_type_str (const gmx::SelectionTreeElement &sel) |
| Returns a string representation of the type of a gmx::SelectionTreeElement. More... | |
| void | _gmx_selelem_set_vtype (const gmx::SelectionTreeElementPointer &sel, e_selvalue_t vtype) |
| Sets the value type of a gmx::SelectionTreeElement. More... | |
| void | _gmx_selelem_free_param (gmx_ana_selparam_t *param) |
| Frees the memory allocated for a selection method parameter. More... | |
| void | _gmx_selelem_free_method (gmx_ana_selmethod_t *method, void *mdata) |
| Frees the memory allocated for a selection method. More... | |
| void | _gmx_selelem_print_tree (FILE *fp, const gmx::SelectionTreeElement &sel, bool bValues, int level) |
| Prints a human-readable version of a selection element subtree. More... | |
| const char* _gmx_sel_value_type_str | ( | const gmx_ana_selvalue_t * | val | ) |
Returns a string representation of the type of a gmx_ana_selvalue_t.
| [in] | val | Value structore for which the string is requested. |
val->type, NULL if the type value is invalid.The return value points to a string constant and should not be free'd.
| const char* _gmx_selelem_boolean_type_str | ( | const gmx::SelectionTreeElement & | sel | ) |
Returns a string representation of the type of a gmx::SelectionTreeElement.
Returns a string representation of the boolean type of a SEL_BOOLEAN gmx::SelectionTreeElement.
| [in] | sel | Selection for which the string is requested |
sel->type.The return value points to a string constant and should not be free'd.
The function returns NULL if sel->type is not one of the valid values.
| void _gmx_selelem_free_method | ( | struct gmx_ana_selmethod_t * | method, |
| void * | mdata | ||
| ) |
Frees the memory allocated for a selection method.
| [in] | method | Method to free. |
| [in] | mdata | Method data to free. |
| void _gmx_selelem_free_param | ( | struct gmx_ana_selparam_t * | param | ) |
Frees the memory allocated for a selection method parameter.
| [in] | param | Parameter to free. |
| void _gmx_selelem_print_tree | ( | FILE * | fp, |
| const gmx::SelectionTreeElement & | sel, | ||
| bool | bValues, | ||
| int | level | ||
| ) |
Prints a human-readable version of a selection element subtree.
| [in] | fp | File handle to receive the output. |
| [in] | sel | Root of the selection subtree to print. |
| [in] | bValues | If true, the evaluated values of selection elements are printed as well. |
| [in] | level | Indentation level, starting from zero. |
| void _gmx_selelem_set_vtype | ( | const gmx::SelectionTreeElementPointer & | sel, |
| e_selvalue_t | vtype | ||
| ) |
Sets the value type of a gmx::SelectionTreeElement.
| [in,out] | sel | Selection element to set the type for. |
| [in] | vtype | Value type for the selection element. |
If the new type is GROUP_VALUE or POS_VALUE, the SEL_ALLOCDATA flag is also set.
This function should only be called at most once for each element, preferably right after calling _gmx_selelem_create().
| const char* _gmx_selelem_type_str | ( | const gmx::SelectionTreeElement & | sel | ) |
Returns a string representation of the type of a gmx::SelectionTreeElement.
| [in] | sel | Selection for which the string is requested |
sel->type.The return value points to a string constant and should not be free'd.
The function returns NULL if sel->type is not one of the valid values.
1.8.5