本文整理汇总了C++中TCfg::name方法的典型用法代码示例。如果您正苦于以下问题:C++ TCfg::name方法的具体用法?C++ TCfg::name怎么用?C++ TCfg::name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCfg
的用法示例。
在下文中一共展示了TCfg::name方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cfgChange
bool TMdContr::cfgChange( TCfg &co, const TVariant &pc )
{
TController::cfgChange(co, pc);
if(startStat() && (co.name() == "CARD" || co.name() == "SMPL_RATE" || co.name() == "SMPL_TYPE")) stop();
return true;
}
示例2: cfgChange
bool TMdContr::cfgChange( TCfg &icfg )
{
TController::cfgChange(icfg);
try
{
if(icfg.name() == "EndPoint" && enableStat())
{
tr.at().setAddr("TCP:"+epParse());
ResAlloc res(nodeRes(), false);
SecuritySetting ss("", -1);
if(epLst.find(icfg.getS()) != epLst.end()) ss = epLst[icfg.getS()];
res.release();
if(ss.policy.size() && mSecPol.fld().values().find(ss.policy) != string::npos)
{
setSecPolicy(ss.policy);
setSecMessMode(ss.messageMode);
}
XML_N req("opc.tcp");
//> Send FindServers request for EndPoints list provide
req.setAttr("id", "FindServers");
reqService(req);
res.request(true);
epLst.clear();
for(unsigned i_s = 0; i_s < req.childSize(); i_s++)
for(unsigned i_d = 0; i_d < req.childGet(i_s)->childSize(); i_d++)
epLst[req.childGet(i_s)->childGet(i_d)->text()] = SecuritySetting();
res.release();
//> Send GetEndpoints request for EndPoints list provide
req.clear()->setAttr("id", "GetEndpoints");
reqService(req);
res.request(true);
for(unsigned i_ch = 0; i_ch < req.childSize(); i_ch++)
{
XML_N *xep = req.childGet(i_ch);
string ep = xep->attr("endpointUrl");
if(epLst.find(ep) != epLst.end()) ep += "/"+TSYS::strParse(xep->attr("securityPolicyUri"),1,"#")+"/"+xep->attr("securityMode");
epLst[ep] = SecuritySetting(TSYS::strParse(xep->attr("securityPolicyUri"),1,"#"), atoi(xep->attr("securityMode").c_str()));
}
}
else if(icfg.name() == "SecPolicy")
{
if(icfg.getS() == "None" && secMessMode() != MS_None) setSecMessMode(MS_None);
if(icfg.getS() != "None" && secMessMode() == MS_None) setSecMessMode(MS_Sign);
}
else if(icfg.name() == "SecMessMode" &&
((icfg.getI() != MS_None && secPolicy() == "None") || (icfg.getI() == MS_None && secPolicy() != "None")))
return false;
} catch(...) { }
return true;
}
示例3: fieldPrmSet
void MTable::fieldPrmSet( TCfg &e_cfg, db_str_rec &n_rec )
{
memset(&n_rec, 0, sizeof(db_str_rec));
strncpy(n_rec.name, e_cfg.name().c_str(), 10);
switch(e_cfg.fld().type())
{
case TFld::String:
n_rec.tip_fild = 'C';
n_rec.len_fild = vmin(255,e_cfg.fld().len());
n_rec.dec_field = 0;
break;
case TFld::Integer:
n_rec.tip_fild = 'N';
n_rec.len_fild = (e_cfg.fld().len() == 0) ? 5 : vmin(255,e_cfg.fld().len());
n_rec.dec_field = 0;
break;
case TFld::Real:
n_rec.tip_fild = 'N';
n_rec.len_fild = (e_cfg.fld().len() == 0) ? 7 : vmin(255,e_cfg.fld().len());
n_rec.dec_field = (e_cfg.fld().dec() == 0) ? 2 : vmin(255,e_cfg.fld().dec());
break;
case TFld::Boolean:
n_rec.tip_fild = 'L';
n_rec.len_fild = 1;
n_rec.dec_field = 0;
break;
default: break;
}
}
示例4: cfgChange
bool TMdPrm::cfgChange( TCfg &co, const TVariant &pc )
{
//Change TYPE parameter
if(co.name() == "TYPE") { setType(co.getS()); return true; }
if(mDA) mDA->cfgChange(co, pc);
if(!autoC()) modif();
return true;
}
示例5: setVal
void MTable::setVal( TCfg &cf, const string &ival, bool tr )
{
string val = (ival==DB_NULL) ? EVAL_STR : ival;
switch(cf.fld().type()) {
case TFld::String:
if(!cf.extVal()) {
if(!tr || (cf.fld().flg()&TFld::TransltText && !cf.noTransl())) cf.setS(val);
if(!tr && cf.fld().flg()&TFld::TransltText && !cf.noTransl()) Mess->translReg(val, "db:"+fullDBName()+"#"+cf.name());
}
else {
if(!tr) {
cf.setS(val, TCfg::ExtValOne);
cf.setS("", TCfg::ExtValTwo); //!! Sets for clean up from previous Two value
cf.setS("db:"+fullDBName()+"#"+cf.name(), TCfg::ExtValThree);
} else cf.setS(val, TCfg::ExtValTwo);
}
break;
default: cf.setS(val); break;
}
}
示例6: setVal
void MTable::setVal( TCfg &cf, const string &val, bool tr )
{
if(!cf.dblVal()) {
cf.setS(val);
if(!tr && cf.fld().flg()&TCfg::TransltText && !cf.noTransl()) Mess->translReg(val, "db:"+fullDBName()+"#"+cf.name());
}
else cf.setS(val, (tr?TCfg::DblValTwo:TCfg::DblValOne));
}