#include <SymbolTable.h>
Public Methods | |
SymbolTable (VMDApp *vmdapp) | |
~SymbolTable (void) | |
ParseTree * | parse (const char *seltext) |
parse selection text, return a new ParseTree on success, NULL on error. More... | |
void | add_keyword (const char *visible, SymbolTableElement::int_fctn get, SymbolTableElement::set_int_fctn set) |
void | add_keyword (const char *visible, SymbolTableElement::double_fctn get, SymbolTableElement::set_double_fctn set) |
void | add_keyword (const char *visible, SymbolTableElement::string_fctn get, SymbolTableElement::set_string_fctn set) |
void | add_singleword (const char *visible, SymbolTableElement::single_fctn get, SymbolTableElement::set_single_fctn set) |
void | add_stringfctn (const char *visible, SymbolTableElement::stringfctn_fctn get) |
void | add_cfunction (const char *visible, c_ddfunc fctn) |
Register C functions that take a double and return a double as atom selection functions. Note: These functions must return the same output for given input. Functions like rand() will break some optimizations in the atom selection code otherwise. More... | |
int | find_attribute (const char *attrib) |
find keyword/function matching the name and return function index, or -1. More... | |
int | is_changeable (int fctnidx) |
returns '1' if the variable can be changed/ modified. More... | |
int | num_custom_singleword () |
Query what custom singlewords have been defined. Note: these include those have been deleted, because the implementation of remove_custom only sets the string to "". Text API's will want to only return the strings that have nonzero length. More... | |
const char * | custom_singleword_name (int) |
Return name with given index, or NULL if not defined. More... | |
int | add_custom_singleword (const char *name, const char *macro) |
add a new singleword macro. More... | |
const char * | get_custom_singleword (const char *name) |
get the macro for the given singleword. More... | |
int | remove_custom_singleword (const char *name) |
delete the given singleword macro. More... | |
Public Attributes | |
VMDApp * | app |
NameList< SymbolTableElement * > | fctns |
Definition at line 124 of file SymbolTable.h.
|
Definition at line 133 of file SymbolTable.h. |
|
Definition at line 32 of file SymbolTable.C. References NameList< char * >::data, NameList< SymbolTableElement * >::data, fctns, NameList< char * >::num, NameList< SymbolTableElement * >::num, and num. |
|
Register C functions that take a double and return a double as atom selection functions. Note: These functions must return the same output for given input. Functions like rand() will break some optimizations in the atom selection code otherwise.
Definition at line 207 of file SymbolTable.h. References NameList::add_name, and c_ddfunc. Referenced by atomSelParser_init. |
|
add a new singleword macro.
Definition at line 65 of file SymbolTable.C. References NameList< char * >::add_name, add_singleword, atomsel_custom_singleword, NameList< char * >::data, find_attribute, ParseTree::find_recursion, NameList< char * >::name, NULL, parse, NameList< char * >::set_data, stringdup, and NameList< char * >::typecode. Referenced by make_tcl_atomsel, parseAtomselMacros, and py_addmacro. |
|
Definition at line 166 of file SymbolTable.h. References NameList::add_name, NameList::data, NameList::set_data, SymbolTableElement::set_string_fctn, SymbolTableElement::string_fctn, and NameList::typecode. |
|
Definition at line 154 of file SymbolTable.h. References NameList::add_name, NameList::data, SymbolTableElement::double_fctn, NameList::set_data, SymbolTableElement::set_double_fctn, and NameList::typecode. |
|
Definition at line 142 of file SymbolTable.h. References NameList::add_name, NameList::data, SymbolTableElement::int_fctn, NameList::set_data, SymbolTableElement::set_int_fctn, and NameList::typecode. Referenced by atomSelParser_init. |
|
Definition at line 178 of file SymbolTable.h. References NameList::add_name, NameList::data, NameList::set_data, SymbolTableElement::set_single_fctn, SymbolTableElement::single_fctn, and NameList::typecode. Referenced by add_custom_singleword, and atomSelParser_init. |
|
Definition at line 190 of file SymbolTable.h. References NameList::add_name, NameList::data, NameList::set_data, SymbolTableElement::stringfctn_fctn, and NameList::typecode. Referenced by atomSelParser_init. |
|
Return name with given index, or NULL if not defined.
Definition at line 61 of file SymbolTable.C. References NameList< char * >::name. Referenced by make_tcl_atomsel, and py_allmacros. |
|
find keyword/function matching the name and return function index, or -1.
Definition at line 212 of file SymbolTable.h. References NameList::typecode. Referenced by add_custom_singleword, atomsel_get, atomsel_set, get_attribute_index, get_weights_from_attribute, remove_custom_singleword, split_tcl_atomsel_info, tcl_get_weights, vmd_measure_cluster, and vmd_measure_clustsize. |
|
get the macro for the given singleword.
Definition at line 102 of file SymbolTable.C. References NameList< char * >::data, NULL, and NameList< char * >::typecode. Referenced by make_tcl_atomsel, py_getmacro, and SelectionBuilder::update_macrobrowser. |
|
returns '1' if the variable can be changed/ modified.
Definition at line 46 of file SymbolTable.C. References NameList< SymbolTableElement * >::data, fctns, NameList< SymbolTableElement * >::num, and SymbolTableElement::set_fctn. Referenced by atomsel_set, and py_list_attrs. |
|
Query what custom singlewords have been defined. Note: these include those have been deleted, because the implementation of remove_custom only sets the string to "". Text API's will want to only return the strings that have nonzero length.
Definition at line 57 of file SymbolTable.C. References NameList< char * >::num. Referenced by make_tcl_atomsel, and py_allmacros. |
|
parse selection text, return a new ParseTree on success, NULL on error.
Definition at line 127 of file SymbolTable.C. References app, atomparser_yystring, NULL, and yyparse. Referenced by add_custom_singleword, AtomSel::change, MoleculeList::change_repsel, MoleculeList::set_default_selection, and MoleculeList::set_selection. |
|
delete the given singleword macro.
Definition at line 108 of file SymbolTable.C. References fctns, find_attribute, NameList< SymbolTableElement * >::set_name, NameList< char * >::set_name, and NameList< char * >::typecode. Referenced by make_tcl_atomsel, and py_delmacro. |
|
Definition at line 130 of file SymbolTable.h. Referenced by parse. |
|
Definition at line 131 of file SymbolTable.h. Referenced by access_tcl_atomsel, atomsel_get, atomsel_set, get_weights_from_attribute, is_changeable, make_tcl_atomsel, py_list_attrs, remove_custom_singleword, SelectionBuilder::SelectionBuilder, split_tcl_atomsel_info, tcl_get_weights, SelectionBuilder::update_macrobrowser, vmd_measure_cluster, vmd_measure_clustsize, and ~SymbolTable. |