MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <string>
#include <vector>
Go to the source code of this file.
Functions | |
int | allChildren (ObjId start, unsigned int index, const string &insideBrace, vector< ObjId > &ret) |
bool | matchBeforeBrace (ObjId id, const string &wild) |
int | simpleWildcardFind (const string &path, vector< ObjId > &ret) |
int | wildcardFind (const string &n, vector< ObjId > &ret) |
int allChildren | ( | ObjId | start, |
unsigned int | index, | ||
const string & | insideBrace, | ||
vector< ObjId > & | ret | ||
) |
Recursive function to compare all descendants and cram matches into ret. Returns number of matches. Index is either ALLDATA == ~0U, or a specified number. insideBrace is a string that can be empty, or specify one of the expressions: [TYPE==<string>] [TYPE=<string>] [CLASS=<string>] [ISA=<string>] [ISA==<string>] [TYPE!=<string>] [CLASS!=<string>] [ISA!=<string>] [FIELD(<fieldName)=<string>]
Recursive function to compare all descendants and cram matches into ret. Returns number of matches.
Definition at line 495 of file Wildcard.cpp.
References allChildren(), ALLDATA, Neutral::children(), ObjId::dataIndex, ObjId::eref(), and matchInsideBrace().
Referenced by allChildren(), moose::CompartmentBase::setGeomAndElec(), and singleLevelWildcard().
bool matchBeforeBrace | ( | ObjId | id, |
const string & | wild | ||
) |
matchBeforeBrace checks to see if the wildcard string 'name' matches up with the name of the id. Rules:
It substitutes for any number of characters.
? may be used any number of times in the wildcard, and must substitute exactly for characters.
If bracesInName, then the Id name itself includes braces.
Definition at line 432 of file Wildcard.cpp.
References Shell::chopString(), and findWithSingleCharWildcard().
Referenced by Neuron::getSpinesFromExpression(), matchName(), and testWildcard().
int simpleWildcardFind | ( | const string & | path, |
vector< ObjId > & | ret | ||
) |
simpleWildcardFind returns the number of Ids found. This is the basic wildcardFind function, working on a single tree. It adds entries into the vector 'ret' with Ids found according to the path string. It preserves the order of the returned Ids as the order of elements traversed in the search. It does NOT eliminate duplicates. This is a depth-first search. Note that it does NOT list every entry in arrays, only the base Element.
Wildcard search rules are like this:
This is the basic wildcardFind function, working on a single tree. It adds entries into the vector 'ret' with Ids found according to the path string. It preserves the order of the returned Ids as the order of elements traversed in the search. It does NOT eliminate duplicates. This is a depth-first search. Note that it does the dumb but backward compatible thing with Ids of arrays: it lists every entry.
It returns the number of Ids found here.
Definition at line 137 of file Wildcard.cpp.
References Shell::chopString(), and innerFind().
Referenced by setMethod(), Dsolve::setPath(), testWildcard(), wildcardFind(), and wildcardTestFunc().
int wildcardFind | ( | const string & | n, |
vector< ObjId > & | ret | ||
) |
wildcardFind returns the number of Ids found. This behaves the same as simpleWildcardFind, except that it eliminates non-unique entries, and in the process will scramble the ordering.
Definition at line 169 of file Wildcard.cpp.
References myUnique(), and simpleWildcardFind().
Referenced by Neuron::buildElist(), doClassSpecificMessaging(), Shell::doStart(), ReadKkit::dumpPlots(), Neuron::getExprElist(), Neuron::getExprVal(), Shell::innerUseClock(), moose_wildcardFind(), Stoich::setPath(), Dsolve::setStoich(), NeuroMesh::setSubTreePath(), writeGroup(), and writeKkit().