23 for(
const VarMap::value_type &
v: m_gPromptVars) {
24 if(
name ==
v.second) {
30 std::pair<VarMap::iterator, bool> vit = m_gPromptVars.insert(VarMap::value_type(
var,
name));
45 for(
const Prompt::VarMap::value_type &
v: m_gPromptVars) {
46 if(
name ==
v.second) {
52 last_key = std::max<unsigned>(last_key,
v.first);
58 if(!registerVar(new_key,
name)) {
69 if(m_varEnums.empty()) {
70 for(
const Prompt::VarMap::value_type &
v: m_gPromptVars) {
71 m_varEnums.push_back(
v.first);
79 const VarMap::const_iterator vit = m_gPromptVars.find(
var);
81 if(vit == m_gPromptVars.end()) {
92 for (
const VarMap::value_type &
v: m_gPromptVars) {
130 std::vector<std::string>
keys;
133 std::vector<Prompt::Def::Var> vars;
135 for(
const std::string &
key:
keys) {
150 const std::vector<std::string> &
keys
156 std::vector<Prompt::Def::Var> vars;
158 for(
const std::string &
key:
keys) {
174 return convert2Str(
var);
185 s << asStr(
var) <<
": " <<
val;
196 const std::string&
str,
197 const std::string& tok)
203 const std::string::size_type
S =
str.size();
204 std::string::size_type
i = 0;
208 while (
i <
S && tok.find(
str[
i]) != std::string::npos) {
214 std::string::size_type j =
i+1;
215 while (j <
S && tok.find(
str[j]) == std::string::npos) {
220 ls.push_back(
str.substr(
i,j-
i));