Changeset 1230 for cpp/frams/genetics/f4/f4_general.h
- Timestamp:
- 05/01/23 02:14:27 (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/f4/f4_general.h
r1229 r1230 40 40 #define CELL_NEURON 42 ///<differentiated to neuron, can divide 41 41 //@} 42 43 /**44 * TODO MacKo 2023-04: not sure if this function is needed and if f4_processRecur() would not suffice45 * if it advanced the string pointer (in/out parameter) while processing. Its returned value is always used after46 * f4_processRecur() anyway, and in two cases likely incorrectly (for [...] to detect closing ']'47 * and for :...: to detect closing ':') - we don't need recursion in these cases, a simple linear48 * scan would suffice, but even this would not be needed - since we are parsing the actual characters in these cases,49 * we do scanning anyway. So looks like this function doubles the work already done more thoroughly by f4_processRecur().50 *51 * Scans f4 genotype string for a stopping character and returns the position of52 * this stopping character or 1 if the end of string was reached. This method is used53 * for closing braces, like ), >, ]. It runs recursively when opening braces54 * like (, <, # are found.55 * @param s string with the f4 genotype56 * @param slen length of a given string57 * @param stopchar character to be found58 * @return 1 if end of string was reached, or position of found character in sequence59 */60 int scanRecur(const char* s, int slen, char stopchar);61 42 62 43 … … 501 482 * @return 0 if processing was successful, otherwise returns the position of an error in the genotype 502 483 */ 503 int f4_processRecur(const char *genot, unsigned int pos0, f4_Node *parent);484 int f4_processRecur(const char *genot, int &pos_inout, f4_Node *parent); 504 485 505 486 /**
Note: See TracChangeset
for help on using the changeset viewer.