当前位置: 首页>>代码示例>>C++>>正文


C++ ON_wString::Length方法代码示例

本文整理汇总了C++中ON_wString::Length方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_wString::Length方法的具体用法?C++ ON_wString::Length怎么用?C++ ON_wString::Length使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ON_wString的用法示例。


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

示例1:

QString gfxRhino3D::convertONstring(ON_wString ONs){
  int j;
  QString line;
  line="";
  for (j=0;j<ONs.Length();j++){
    line+=ONs[j];
  }
  return line;
}
开发者ID:TimB-QNA,项目名称:AeroTelemetry,代码行数:9,代码来源:gfxRhino3D.cpp

示例2: Internal_Test

static ONX_ErrorCounter Internal_Test( 
  unsigned int max_directory_tree_depth,
  ON_wString full_path,
  bool bVerbose,
  ON_TextLog& text_log,
  unsigned int& directory_counter,
  unsigned int& file_count,
  unsigned int& folder_count
)
{

  ONX_ErrorCounter err = ONX_ErrorCounter::Zero;

  if (ON_FileSystem::IsFile(full_path))
  {
    if (ON_FileStream::Is3dmFile(full_path, false))
    {
      text_log.Print(L"Testing 3dm file: %ls\n", static_cast<const wchar_t*>(full_path));
      err = Internal_TestFileRead(text_log, full_path, ON_wString::EmptyString, bVerbose);
      file_count++;
    }
  }
  else if ( max_directory_tree_depth > 0 )
  {
    if (full_path.Length() != 1 || false == ON_FileSystemPath::IsDirectorySeparator(full_path[0], true))
    {
      const wchar_t dir_seps[3] = { ON_FileSystemPath::DirectorySeparator,ON_FileSystemPath::AlternateDirectorySeparator,0 };
      full_path.TrimRight(dir_seps);
    }
    if (ON_FileSystem::IsDirectory(full_path))
    {
      text_log.Print(L"Testing 3dm files in folder: %ls\n", static_cast<const wchar_t*>(full_path));
      Internal_CTestContext test_context;
      directory_counter++;
      test_context.SetInitialDirecory(full_path,directory_counter);
      test_context.m_max_directory_tree_depth = max_directory_tree_depth;

      err = Internal_TestReadFolder(text_log, full_path, 1, bVerbose, test_context);
      file_count += test_context.m_file_count;
      folder_count += test_context.m_directory_count;
    }
  }

  return err;
}
开发者ID:jiapei100,项目名称:opennurbs,代码行数:45,代码来源:example_test.cpp

示例3: IsDirectory

bool ON::IsDirectory( const wchar_t* pathname )
{
  bool rc = false;

  if ( 0 != pathname && 0 != pathname[0] )
  {
    ON_wString buffer;
    const wchar_t* stail = pathname;
    while ( 0 != *stail )
      stail++;
    stail--;
    if ( '\\' == *stail || '/' == *stail ) 
    {
      const wchar_t trim[2] = {*stail,0};
      buffer = pathname;
      buffer.TrimRight(trim);
      if ( buffer.Length() > 0 )
        pathname = buffer;
    }
#if defined(ON_COMPILER_MSC)
    // this works on Windows
    struct _stat64 buf;
    memset(&buf,0,sizeof(buf));
    int stat_errno = _wstat64( pathname, &buf );
    if ( 0 == stat_errno && 0 != (_S_IFDIR & buf.st_mode) )
    {
      rc = true;
    }
#else
    ON_String s = pathname;
    const char* utf8pathname = s;
    rc = ON::IsDirectory(utf8pathname);
#endif
  }

  return rc;
}
开发者ID:behollis,项目名称:brlcad-svn-rev65072-gsoc2015,代码行数:37,代码来源:opennurbs_string.cpp

示例4: AppendToArray

void ON_wString::AppendToArray( const ON_wString& s )
{
  AppendToArray( s.Length(), s.Array() );
}
开发者ID:ckvk,项目名称:opennurbs,代码行数:4,代码来源:opennurbs_wstring.cpp

示例5: CopyToArray

void ON_wString::CopyToArray( const ON_wString& s )
{
  CopyToArray( s.Length(), s.Array() );
}
开发者ID:ckvk,项目名称:opennurbs,代码行数:4,代码来源:opennurbs_wstring.cpp


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