50 size_t iend = nset.find_first_of(
'|', ibeg);
52 string name(nset, ibeg, iend-ibeg);
53 auto ret =
fSet.insert(name);
54 if (ret.second ==
false)
55 throw Rexception(
"RtclNameSet::<ctor>",
"Bad args: " +
56 string(
"duplicate name '") + name +
57 "' in set '" + nset +
"'");
59 if (iend == string::npos)
break;
74 const std::string& tval)
const
76 return CheckMatch(interp, rval, tval,
true) > 0;
86 const std::string& tval,
bool misserr)
const
89 auto it =
fSet.lower_bound(tval);
92 if (it==
fSet.end() || tval!=it->substr(0,tval.length())) {
94 Tcl_AppendResult(interp,
"-E: bad option '", tval.c_str(),
95 "': must be ",
nullptr);
96 const char* delim =
"";
98 Tcl_AppendResult(interp, delim, o.c_str(),
nullptr);
109 if (it1!=
fSet.end() && tval==it1->substr(0,tval.length())) {
110 Tcl_AppendResult(interp,
"-E: ambiguous option '", tval.c_str(),
111 "': must be ",
nullptr);
112 const char* delim =
"";
113 for (it1=it; it1!=
fSet.end() &&
114 tval==it1->substr(0,tval.length()); it1++) {
115 Tcl_AppendResult(interp, delim, it1->c_str(),
nullptr);
~RtclNameSet()
Destructor.
int CheckMatch(Tcl_Interp *interp, std::string &rval, const std::string &tval, bool misserr) const
FIXME_docs.
bool Check(Tcl_Interp *interp, std::string &rval, const std::string &tval) const
FIXME_docs.
RtclNameSet()
Default constructor.
Declaration of class ReventLoop.