本文整理汇总了C++中NAString函数的典型用法代码示例。如果您正苦于以下问题:C++ NAString函数的具体用法?C++ NAString怎么用?C++ NAString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NAString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sprintf
const NAString
ElemDDLFileAttrMVCommitEach::displayLabel1() const
{
char buffer[80];
sprintf(buffer, "%d", getNRows());
return NAString("nrows: ") + NAString(buffer);
}
示例2: sprintf
const NAString
ElemDDLFileAttrLockLength::displayLabel1() const
{
char buffer[80];
sprintf(buffer, "%d", getLockLength());
return NAString("Lock length: ") + NAString(buffer);
}
示例3: NAString
const NAString
ElemDDLPartitionRange::displayLabel1() const
{
if (getLocationName().length() NEQ 0)
return NAString("Location name: ") + getLocationName();
else
return NAString("Location name not specified.");
}
示例4: NAString
const NAString
ElemDDLConstraint::displayLabel1() const
{
if (getConstraintName().length() NEQ 0)
return NAString("Constraint name: ") + getConstraintName();
else
return NAString("Constraint name not specified.");
}
示例5: NAString
const NAString
ElemDDLLike::displayLabel1() const
{
if (getSourceTableName().length() NEQ 0)
return NAString("Source table name: ") + getSourceTableName();
else
return NAString();
}
示例6: NAString
const NAString
StmtDDLRegisterComponent::displayLabel2() const
{
if (NOT getRegisterComponentDetailInfo().isNull())
{
return NAString("Detail Information: ") + getRegisterComponentDetailInfo();
}
else
{
return NAString("No Detail Information (i.e., an empty string).");
}
}
示例7: NAString
const NAString
ElemDDLColViewDef::displayLabel2() const
{
if (isHeadingSpecified())
{
return NAString("Heading: ") + getHeading();
}
else
{
return NAString("Heading not spec.");
}
}
示例8: return
const NAString
ElemDDLColDefault::displayLabel2() const
{
if (getColumnDefaultType() EQU COL_DEFAULT)
{
return (NAString("Default value: ") +
getDefaultValueExpr()->getText());
}
else
{
return NAString();
}
}
示例9: switch
const NAString
ElemDDLColHeading::displayLabel2() const
{
switch (getColumnHeadingType())
{
case COL_HEADING :
return NAString("Heading: ") + getColumnHeading();
case COL_NO_HEADING :
return NAString();
default :
ABORT("internal logic error");
return NAString();
}
}
示例10: splitURL
static NABoolean splitURL(const char *url,
NAString &host,
Int32 &port,
NAString &options)
{
NABoolean result = TRUE;
// split the url into host and file name, proto://host:port/file,
// split point is at the third slash in the URL
const char *c = url;
const char *hostMark = NULL;
const char *portMark = NULL;
const char *dirMark = NULL;
int numSlashes = 0;
int numColons = 0;
while (*c && dirMark == NULL)
{
if (*c == '/')
numSlashes++;
else if (*c == ':')
numColons++;
c++;
if (hostMark == NULL && numSlashes == 2)
hostMark = c;
else if (portMark == NULL && hostMark && numColons == 2)
portMark = c;
else if (numSlashes == 3 || // regular URL
(numSlashes == 1 && c == url+1)) // just a file name
dirMark = c-1; // include the leading slash
}
if (dirMark == NULL)
{
dirMark = c; // point to end of string
options = "";
}
else
options = NAString(dirMark);
if (hostMark)
host = NAString(hostMark, (portMark ? portMark-hostMark-1
: dirMark-hostMark));
if (portMark)
port = atoi(portMark);
else
port = 0;
return result;
}
示例11: location
const NAString
ElemDDLPartitionRange::displayLabel2() const
{
ElemDDLLocation location(getLocationNameType(), getLocationName());
return (NAString("Location name type: ") +
location.getLocationNameTypeAsNAString());
}
示例12: switch
NAString
ElemDDLPartitionSystem::getOptionAsNAString() const
{
switch (getOption())
{
case ADD_OPTION :
return NAString("ADD");
case DROP_OPTION :
return NAString("DROP");
default :
ABORT("internal logic error");
return NAString();
}
}
示例13: getExtendedQualNameObj
//## inline?
const NAString CorrName::getText() const
{
NAString result = getExtendedQualNameObj().getText();
if (getCorrNameAsString() != "")
result += NAString(" ") + ToAnsiIdentifier(getCorrNameAsString());
return result;
}
示例14: switch
NAString
ElemDDLConstraintRI::getMatchTypeAsNAString() const
{
switch (getMatchType())
{
case COM_NONE_MATCH_OPTION :
return NAString("Match phrase not specified");
case COM_FULL_MATCH_OPTION :
return NAString("MATCH FULL");
case COM_PARTIAL_MATCH_OPTION :
return NAString("MATCH PARTIAL");
default :
ABORT("internal logic error");
return NAString();
}
}
示例15: makeTableName
// warning elimination (removed "inline")
static NAString makeTableName(const NATable *table,
const TrafColumnsDesc *column_desc)
{
return NAString(
table ?
table->getTableName().getQualifiedNameAsAnsiString().data() : "");
}