本文整理汇总了C++中StringAttr::sget方法的典型用法代码示例。如果您正苦于以下问题:C++ StringAttr::sget方法的具体用法?C++ StringAttr::sget怎么用?C++ StringAttr::sget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringAttr
的用法示例。
在下文中一共展示了StringAttr::sget方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: matchCommandLineOption
eclCmdOptionMatchIndicator EclCmdCommon::matchCommandLineOption(ArgvIterator &iter, bool finalAttempt)
{
bool boolValue;
if (iter.matchFlag(boolValue, ECLOPT_VERSION))
{
fprintf(stdout, "%s\n", BUILD_TAG);
return EclCmdOptionCompletion;
}
if (iter.matchOption(optServer, ECLOPT_SERVER)||iter.matchOption(optServer, ECLOPT_SERVER_S))
return EclCmdOptionMatch;
if (iter.matchOption(optPort, ECLOPT_PORT))
return EclCmdOptionMatch;
if (iter.matchOption(optUsername, ECLOPT_USERNAME)||iter.matchOption(optUsername, ECLOPT_USERNAME_S))
return EclCmdOptionMatch;
if (iter.matchOption(optPassword, ECLOPT_PASSWORD)||iter.matchOption(optPassword, ECLOPT_PASSWORD_S))
return EclCmdOptionMatch;
if (iter.matchFlag(optVerbose, ECLOPT_VERBOSE) || iter.matchFlag(optVerbose, ECLOPT_VERBOSE_S))
return EclCmdOptionMatch;
StringAttr tempArg;
if (iter.matchOption(tempArg, "-brk"))
{
#if defined(_WIN32) && defined(_DEBUG)
unsigned id = atoi(tempArg.sget());
if (id == 0)
DebugBreak();
else
_CrtSetBreakAlloc(id);
#endif
return EclCmdOptionMatch;
}
if (finalAttempt)
fprintf(stderr, "\n%s option not recognized\n", iter.query());
return EclCmdOptionNoMatch;
}
示例2: validate
bool CPackageNode::validate(StringArray &warn, StringArray &err) const
{
if (!node)
return true;
StringAttr packageId = node->queryProp("@id");
if (packageId.isEmpty())
err.append("Package has no id attribute");
Owned<IPropertyTreeIterator> files = node->getElements("SuperFile");
ForEach(*files)
{
IPropertyTree &super = files->query();
StringAttr superId = super.queryProp("@id");
if (superId.isEmpty())
err.append("SuperFile has no id attribute");
if (!super.hasProp("SubFile"))
{
VStringBuffer msg("Package['%s']/SuperFile['%s'] has no SubFiles defined", packageId.sget(), superId.sget());
warn.append(msg.str());
}
}
return true;
}
示例3: getWsResource
bool WsEclWuInfo::getWsResource(const char *name, StringBuffer &out)
{
if (strieq(name, "SOAP"))
{
out.appendf("<message name=\"%s\">", queryname.sget());
IConstWUResultIterator &vars = ensureWorkUnit()->getVariables();
Owned<IResultSetFactory> resultSetFactory(getResultSetFactory(username, password));
ForEach(vars)
{
IConstWUResult &var = vars.query();
SCMStringBuffer varname;
var.getResultName(varname);
int seq = var.getResultSequence();
WUResultFormat fmt = var.getResultFormat();
SCMStringBuffer eclschema;
var.getResultEclSchema(eclschema);
SCMStringBuffer s;
Owned<IResultSetMetaData> meta = resultSetFactory->createResultSetMeta(&var);
if (!var.isResultScalar())
{
meta->getXmlSchema(s, false);
out.appendf("<part name=\"%s\" type=\"tns:XmlDataSet\" />", varname.str());
}
else
{
meta->getColumnEclType(s, 0);
DisplayType dt = meta->getColumnDisplayType(0);
StringAttr ptype;
switch (dt)
{
case TypeBoolean:
ptype.set("xsd:boolean");
break;
case TypeInteger:
ptype.set("xsd:integer");
break;
case TypeUnsignedInteger:
ptype.set("xsd:integer");
break;
case TypeReal:
ptype.set("xsd:real");
break;
case TypeSet:
ptype.set("tns:EspStringArray");
break;
case TypeDataset:
case TypeData:
ptype.set("tns:XmlDataSet");
break;
case TypeUnicode:
case TypeString:
ptype.set("xsd:string");
break;
case TypeUnknown:
case TypeBeginIfBlock:
case TypeEndIfBlock:
case TypeBeginRecord:
default:
ptype.set("xsd:string");
break;
}
out.appendf("<part name=\"%s\" type=\"%s\" />", varname.str(), ptype.sget());
}
}
out.append("</message>");
}