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


C++ ON_String::Array方法代码示例

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


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

示例1: ON_CorrectBase32StringTypos

int ON_CorrectBase32StringTypos( const wchar_t* sBase32, ON_wString& sBase32clean )
{
  if ( 0 == sBase32 || 0 == sBase32[0] )
    return 0;
  ON_String s = sBase32;
  int length = ON_CorrectBase32StringTypos(s.Array(),s.Array());
  if ( length > 0 )
    sBase32clean = s;
  else
    sBase32clean.SetLength(0);
  return length;
}
开发者ID:Bastl34,项目名称:PCL,代码行数:12,代码来源:opennurbs_base32.cpp

示例2: PrintPointList

void ON_TextLog::PrintPointList( int dim, int is_rat, int count, int stride, const double* P,
                                const char* sPreamble )
{
  double w, x;
  int i, j, cvdim;

  ON_String preamble = "";
  if ( sPreamble && *sPreamble )
    preamble += sPreamble;
  cvdim = (is_rat) ? dim+1 : dim;

  if ( count == 0 ) {
    Print( "%sEMPTY point list\n", preamble.Array() );
  }
  else if ( !P ) {
    Print( "%sNULL point list\n", preamble.Array() );
  }

  for ( i = 0; i < count; i++ ) {
    Print( "%s[%2d] %c", preamble.Array(), i, (is_rat) ? '[' : '(' );
    Print( m_double_format, P[0] );
    for ( j = 1; j < cvdim; j++ ) {
      Print( ", ");
      Print(m_double_format, P[j] );
    }
    Print("%c", (is_rat) ? ']' : ')' );
    if ( is_rat ) 
    {
      w = P[dim];
      if ( w != 0.0 ) 
      {
        // print euclidean coordinates
        w = 1.0/w;
        x = w*P[0];
        Print( " = (");
        Print( m_double_format, x );
        for ( j = 1; j < dim; j++ ) 
        {
          x = w*P[j];
          Print( ", ");
          Print( m_double_format, x );
        }
        Print(")");
      }
    }
    Print("\n");
    P += stride;
  }
}
开发者ID:Bardo91,项目名称:pcl,代码行数:49,代码来源:opennurbs_textlog.cpp

示例3: log

/**
 *			R T _ B R E P _ D E S C R I B E
 */
int
rt_brep_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
{
    BU_CK_VLS(str);
    RT_CK_DB_INTERNAL(ip);

    ON_wString wonstr;
    ON_TextLog log(wonstr);

    struct rt_brep_internal* bi;
    bi = (struct rt_brep_internal*)ip->idb_ptr;
    RT_BREP_CK_MAGIC(bi);
    if (bi->brep != NULL)
	bi->brep->Dump(log);

    ON_String onstr = ON_String(wonstr);
    bu_vls_strcat(str, "Boundary Representation (BREP) object\n");

    const char *description = onstr.Array();
    // skip the first "ON_Brep:" line
    while (description && description[0] && description[0] != '\n') {
	description++;
    }
    if (description && description[0] && description[0] == '\n') {
	description++;
    }
    bu_vls_strcat(str, description);

    return 0;
}
开发者ID:cciechad,项目名称:brlcad,代码行数:33,代码来源:brep.cpp

示例4: ON_Base32ToString

bool ON_Base32ToString( const ON_SimpleArray<unsigned char>& base32_digits, ON_String& sBase32 )
{
  int digit_count = base32_digits.Count();
  sBase32.ReserveArray(digit_count);
  sBase32.SetLength(digit_count);
  bool rc = ON_Base32ToString( base32_digits, digit_count, sBase32.Array() );
  if (!rc)
    sBase32.SetLength(0);
  return rc;
}
开发者ID:Bastl34,项目名称:PCL,代码行数:10,代码来源:opennurbs_base32.cpp

示例5: AppendText

void ON_TextLog::AppendText( const wchar_t* s )
{
  // This is a virtual function 
  if ( m_pString )
  {
    (*m_pString) += s;
  }
  else
  {
    // To properly handle conversion of UNICODE values > 255, 
    // you will probably have to derive a class from ON_TextLog, 
    // override ON_TextLog::AppendText(const wchar_t* s ),
    // and do whatever is appropriate for your OS and compiler.
    ON_String str = s;
    AppendText(str.Array());
  }
}
开发者ID:Bardo91,项目名称:pcl,代码行数:17,代码来源:opennurbs_textlog.cpp

示例6: AppendToArray

void ON_String::AppendToArray( const ON_String& s )
{
  AppendToArray( s.Length(), s.Array() );
}
开发者ID:behollis,项目名称:brlcad-svn-rev65072-gsoc2015,代码行数:4,代码来源:opennurbs_string.cpp

示例7: CopyToArray

void ON_String::CopyToArray( const ON_String& s )
{
  CopyToArray( s.Length(), s.Array() );
}
开发者ID:behollis,项目名称:brlcad-svn-rev65072-gsoc2015,代码行数:4,代码来源:opennurbs_string.cpp

示例8: main


//.........这里部分代码省略.........
        // read the contents of the file into "model"
        bool rc = model.Read( archive, dump );

        // close the file
        ON::CloseFile( archive_fp );

        // print diagnostic
        if ( rc )
            dump->Print("Successfully read.\n");
        else
            dump->Print("Errors during reading.\n");

        // see if everything is in good shape
        if ( model.IsValid(dump) )
            dump->Print("Model is valid.\n");
        else
        {
            model.Polish();
            if ( model.IsValid() )
            {
                dump->Print("Model is valid after calling Polish().\n");
            }
            else
            {
                dump->Print("Model is not valid.\n");
            }
        }

        /*
        int oi = 14;
        if ( oi >=0 && oi < model.m_object_table.Count() )
        {
          dump->Print("m_object_table[%d].m_object:\n",oi);
          dump->PushIndent();
          model.m_object_table[oi].m_object->Dump(*dump);
          dump->PopIndent();
        }
        */

        int version = 0; // write current Rhino file

        ON_String outfile = sFileName;
        int len = outfile.Length() - 4;
        outfile.SetLength(len);
        outfile += "_roundtrip.3dm";
        bool outrc = model.Write( outfile, version, "roundtrip", dump );
        if ( outrc )
        {
            dump->Print("model.Write(%s) succeeded.\n",outfile.Array());
            ONX_Model model2;
            if ( model2.Read( outfile, dump ) )
            {
                dump->Print("model2.Read(%s) succeeded.\n",outfile.Array());
                if ( model2.IsValid(dump) )
                {
                    dump->Print("Model2 is valid.\n");
                }
                else
                {
                    dump->Print("Model2 is not valid.\n");
                }
                /*
                if ( oi >=0 && oi < model2.m_object_table.Count() )
                {
                  dump->Print("m_object_table[%d].m_object:\n",oi);
                  dump->PushIndent();
                  model2.m_object_table[oi].m_object->Dump(*dump);
                  dump->PopIndent();
                }
                */
            }
            else
            {
                dump->Print("model2.Read(%s) failed.\n",outfile.Array());
            }
        }
        else
            dump->Print("model.Write(%s) failed.\n",outfile.Array());

        // destroy this model
        model.Destroy();

        dump->PopIndent();
    }

    if ( dump_fp )
    {
        // close the text dump file
        delete dump;
        ON::CloseFile( dump_fp );
    }

    // OPTIONAL: Call just before your application exits to clean
    //           up opennurbs class definition information.
    //           Opennurbs will not work correctly after ON::End()
    //           is called.
    ON::End();

    return 0;
}
开发者ID:TimB-QNA,项目名称:AeroTelemetry,代码行数:101,代码来源:example_roundtrip.cpp

示例9: s

ON_wString ON_wString::operator+(const ON_String& s2) const
{
	ON_wString s(*this);
  s.AppendToArray( s2.Length(), s2.Array() );
	return s;
}
开发者ID:ckvk,项目名称:opennurbs,代码行数:6,代码来源:opennurbs_wstring.cpp


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