• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ NAString函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中NAString函数的典型用法代码示例。如果您正苦于以下问题:C++ NAString函数的具体用法?C++ NAString怎么用?C++ NAString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了NAString函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: sprintf

const NAString 
ElemDDLFileAttrMVCommitEach::displayLabel1() const
{
  char buffer[80];
  sprintf(buffer, "%d", getNRows());
  return NAString("nrows:         ") + NAString(buffer);
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:7,代码来源:ElemDDLFileAttr.cpp


示例2: sprintf

const NAString
ElemDDLFileAttrLockLength::displayLabel1() const
{
  char buffer[80];
  sprintf(buffer, "%d", getLockLength());
  return NAString("Lock length: ") + NAString(buffer);
}
开发者ID:RuoYuHP,项目名称:incubator-trafodion,代码行数:7,代码来源:ElemDDLFileAttr.cpp


示例3: NAString

const NAString
ElemDDLPartitionRange::displayLabel1() const
{
  if (getLocationName().length() NEQ 0)
    return NAString("Location name: ") + getLocationName();
  else
    return NAString("Location name not specified.");
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:8,代码来源:ElemDDLPartition.cpp


示例4: NAString

const NAString
ElemDDLConstraint::displayLabel1() const
{
  if (getConstraintName().length() NEQ 0)
    return NAString("Constraint name: ") + getConstraintName();
  else
    return NAString("Constraint name not specified.");
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:8,代码来源:ElemDDLConstraint.cpp


示例5: NAString

const NAString
ElemDDLLike::displayLabel1() const
{
  if (getSourceTableName().length() NEQ 0)
    return NAString("Source table name: ") + getSourceTableName();
  else
    return NAString();
}
开发者ID:XueminZhu,项目名称:incubator-trafodion,代码行数:8,代码来源:ElemDDLLike.cpp


示例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).");
    }
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:12,代码来源:StmtDDLNode.cpp


示例7: NAString

const NAString
ElemDDLColViewDef::displayLabel2() const
{
  if (isHeadingSpecified())
  {
    return NAString("Heading:   ") + getHeading();
  }
  else
  {
    return NAString("Heading not spec.");
  }
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:12,代码来源:ElemDDLCol.cpp


示例8: return

const NAString
ElemDDLColDefault::displayLabel2() const
{
  if (getColumnDefaultType() EQU COL_DEFAULT)
  {
    return (NAString("Default value: ") +
            getDefaultValueExpr()->getText());
  }
  else
  {
    return NAString();
  }
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:13,代码来源:ElemDDLCol.cpp


示例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();
  }
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:14,代码来源:ElemDDLCol.cpp


示例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;
}
开发者ID:lanbb,项目名称:incubator-trafodion,代码行数:49,代码来源:hiveHook.cpp


示例11: location

const NAString
ElemDDLPartitionRange::displayLabel2() const
{
  ElemDDLLocation location(getLocationNameType(), getLocationName());
  return (NAString("Location name type: ") +
          location.getLocationNameTypeAsNAString());
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:7,代码来源:ElemDDLPartition.cpp


示例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();
  }
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:16,代码来源:ElemDDLPartition.cpp


示例13: getExtendedQualNameObj

//## inline?
const NAString CorrName::getText() const
{
  NAString result = getExtendedQualNameObj().getText();
  if (getCorrNameAsString() != "")
    result += NAString(" ") + ToAnsiIdentifier(getCorrNameAsString());
  return result;
}
开发者ID:RuoYuHP,项目名称:incubator-trafodion,代码行数:8,代码来源:ObjectNames.cpp


示例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();
  }
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:16,代码来源:ElemDDLConstraint.cpp


示例15: makeTableName

// warning elimination (removed "inline")
static NAString makeTableName(const NATable *table,
			      const TrafColumnsDesc *column_desc)
{
  return NAString(
       table ?
       table->getTableName().getQualifiedNameAsAnsiString().data() : "");
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:8,代码来源:NAColumn.cpp


示例16: switch

//
// given a size unit enumerated constant,
// return an appropriate NAString.
//
NAString
ElemDDLFileAttr::convertSizeUnitToNAString(ComUnits sizeUnit) const
{
  switch (sizeUnit)
  {
  case COM_BYTES :
    return NAString(COM_BYTES_LIT);
  case COM_GBYTES :
    return NAString(COM_GBYTES_LIT);
  case COM_KBYTES :
    return NAString(COM_KBYTES_LIT);
  case COM_MBYTES :
    return NAString(COM_MBYTES_LIT);
  default :
    ABORT("internal logic error");
    return NAString();
  }
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:22,代码来源:ElemDDLFileAttr.cpp


示例17: makeTableName

// warning elimination (removed "inline")
static NAString makeTableName(const NATable *table,
			      const columns_desc_struct *column_desc)
{
  return NAString(
	      table ?
		table->getTableName().getQualifiedNameAsAnsiString().data() :
	      column_desc->tablename ?
		column_desc->tablename : "");
}
开发者ID:robertamarton,项目名称:incubator-trafodion,代码行数:10,代码来源:NAColumn.cpp


示例18: applyDefaults

NABoolean StmtModule::unparse(NAString &result, NABoolean wantR18behavior)
{
  NABoolean err = applyDefaults(wantR18behavior);

  result += NAString("MODULE ") + 
            name().getQualifiedNameAsAnsiNTFilenameString() +
  	    " NAMES ARE " + charSet() + ";";

  return err;
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:10,代码来源:StmtNode.cpp


示例19: str_sprintf

// ****************************************************************************
// method: getListOfDirectlyReferencedObjects
//
// Returns a list of objects that are being directly referenced by the passed 
// in objectUID
//
// Parameters:
//    cliInterface - used to get the list of object usages
//    objectUID - the UID being processed
//    objectList - a list of objectRefdByMe structures describing each usage
//
// returns:
//    0 - successful
//   -1 - unexpected error occurred
// ****************************************************************************
short CmpSeabaseDDL::getListOfDirectlyReferencedObjects (
  ExeCliInterface *cliInterface,
  const Int64 objectUID,
  NAList<objectRefdByMe> &objectsList)
{
  // Select all the rows from views_usage associated with the passed in
  // objectUID
  Lng32 cliRC = 0;
  char buf[4000];
  str_sprintf(buf, "select object_type, object_uid, catalog_name," 
                   "schema_name, object_name from %s.\"%s\".%s T, %s.\"%s\".%s VU " 
                   "where VU.using_view_uid = %Ld "
                   "and T.object_uid = VU.used_object_uid",
              getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
              getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS_USAGE,
              objectUID);

  Queue * usingObjectsQueue = NULL;
  cliRC = cliInterface->fetchAllRows(usingObjectsQueue, buf, 0, FALSE, FALSE, TRUE);
  if (cliRC < 0)
    {
      cliInterface->retrieveSQLDiagnostics(CmpCommon::diags());
      return -1;
    }

  // set up an objectRefdByMe struct for each returned row
  usingObjectsQueue->position();
  for (int idx = 0; idx < usingObjectsQueue->numEntries(); idx++)
    {
      OutputInfo * oi = (OutputInfo*)usingObjectsQueue->getNext();
      objectRefdByMe objectInfo;
      objectInfo.objectType = NAString(oi->get(0));
      objectInfo.objectUID = *(Int64*)oi->get(1);
      objectInfo.catalogName = NAString(oi->get(2));
      objectInfo.schemaName = NAString(oi->get(3));
      objectInfo.objectName = NAString(oi->get(4));
      objectsList.insert(objectInfo);
    }

  return 0;
}
开发者ID:RuoYuHP,项目名称:incubator-trafodion,代码行数:56,代码来源:CmpSeabaseDDLview.cpp


示例20: label2

const NAString
StmtDDLDropView::displayLabel2() const
{
  NAString label2("Drop behavior: ");
  switch (getDropBehavior())
  {
  case COM_CASCADE_DROP_BEHAVIOR :
    return label2 + "Cascade";

  case COM_RESTRICT_DROP_BEHAVIOR :
    return label2 + "Restrict";

  default :
    NAAbort("StmtDDLDrop.C", __LINE__, "internal logic error");
    return NAString();
  }
}
开发者ID:RuoYuHP,项目名称:incubator-trafodion,代码行数:17,代码来源:StmtDDLDrop.cpp



注:本文中的NAString函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ NATIVE_PROFILE_PAL_COM函数代码示例发布时间:2022-05-30
下一篇:
C++ NAS_WARNING_LOG函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap