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


C++ ON_BinaryArchive::WriteInt方法代码示例

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


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

示例1: Write

BOOL ON_HatchPattern::Write( ON_BinaryArchive& ar) const
{
  BOOL rc = ar.Write3dmChunkVersion(1,2);

  if (rc) rc = ar.WriteInt( m_hatchpattern_index);
  if (rc) rc = ar.WriteInt( m_type);
  if (rc) rc = ar.WriteString( m_hatchpattern_name);
  if (rc) rc = ar.WriteString( m_description);
  if( rc)
  {
    if( m_type == ftLines)
    {
      int i, count = m_lines.Count();
      if ( count < 0 )
        count = 0;
      rc = ar.WriteInt( count );
      for( i = 0; i < count && rc; i++)
        rc = m_lines[i].Write( ar);
    }
  }
  // version 1.2 field
  if (rc) rc = ar.WriteUuid(m_hatchpattern_id);

  return rc;
}
开发者ID:cciechad,项目名称:brlcad,代码行数:25,代码来源:opennurbs_hatch.cpp

示例2: Write

bool ON_PlugInRef::Write( ON_BinaryArchive& file ) const
{
  bool rc = file.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,2);
  if (rc)
  {
    //version 1.0 fields
    if (rc) rc = file.WriteUuid(m_plugin_id);
    if (rc) rc = file.WriteInt(m_plugin_type);
    if (rc) rc = file.WriteString(m_plugin_name);
    if (rc) rc = file.WriteString(m_plugin_version);
    if (rc) rc = file.WriteString(m_plugin_filename);

    // version 1.1 fields 
    if (rc) rc = file.WriteString(m_developer_organization);
    if (rc) rc = file.WriteString(m_developer_address);
    if (rc) rc = file.WriteString(m_developer_country);
    if (rc) rc = file.WriteString(m_developer_phone);
    if (rc) rc = file.WriteString(m_developer_email);
    if (rc) rc = file.WriteString(m_developer_website);
    if (rc) rc = file.WriteString(m_developer_updateurl);
    if (rc) rc = file.WriteString(m_developer_fax);

    // version 1.2 fields
    if (rc) rc = file.WriteInt(m_plugin_platform);
    if (rc) rc = file.WriteInt(m_plugin_sdk_version);
    if (rc) rc = file.WriteInt(m_plugin_sdk_service_release);

    if( !file.EndWrite3dmChunk() )
      rc = false;
  }
  return rc;
}
开发者ID:jl2,项目名称:ONView,代码行数:32,代码来源:opennurbs_pluginlist.cpp

示例3: Write

ON_BOOL32 ON_SurfaceArray::Write( ON_BinaryArchive& file ) const
{
  ON_BOOL32 rc = file.BeginWrite3dmChunk( TCODE_ANONYMOUS_CHUNK, 0 );
  if (rc) rc = file.Write3dmChunkVersion(1,0);
  if (rc ) 
  {
    int i;
    rc = file.WriteInt( Count() );
    for ( i = 0; rc && i < Count(); i++ ) {
      if ( m_a[i] ) 
      {
        rc = file.WriteInt(1);
        if ( rc ) 
          rc = file.WriteObject( *m_a[i] ); // polymorphic surfaces
      }
      else 
      {
        // NULL surface
        rc = file.WriteInt(0);
      }
    }
    if ( !file.EndWrite3dmChunk() )
      rc = false;
  }
  return rc;
}
开发者ID:Bastl34,项目名称:PCL,代码行数:26,代码来源:opennurbs_surface.cpp

示例4: Write

ON_BOOL32 ON_Light::Write(
       ON_BinaryArchive& file
     ) const
{
  int i;
  ON_BOOL32 rc = file.Write3dmChunkVersion(1,2);
  // version 1.0 fields
  if ( rc ) rc = file.WriteInt( m_bOn );
  i = m_style;
  if ( rc ) rc = file.WriteInt( i );
  if ( rc ) rc = file.WriteDouble( m_intensity );
  if ( rc ) rc = file.WriteDouble( m_watts );
  if ( rc ) rc = file.WriteColor( m_ambient );
  if ( rc ) rc = file.WriteColor( m_diffuse );
  if ( rc ) rc = file.WriteColor( m_specular );
  if ( rc ) rc = file.WriteVector( m_direction );
  if ( rc ) rc = file.WritePoint( m_location );
  if ( rc ) rc = file.WriteDouble( m_spot_angle );
  if ( rc ) rc = file.WriteDouble( m_spot_exponent );
  if ( rc ) rc = file.WriteVector( m_attenuation );
  if ( rc ) rc = file.WriteDouble( m_shadow_intensity );
  if ( rc ) rc = file.WriteInt( m_light_index );
  if ( rc ) rc = file.WriteUuid( m_light_id );
  if ( rc ) rc = file.WriteString( m_light_name );
  // version 1.1 added support for linear and rectangular
  if ( rc ) rc = file.WriteVector( m_length );
  if ( rc ) rc = file.WriteVector( m_width );
  // version 1.2 added m_hotspot support
  if ( rc ) rc = file.WriteDouble( m_hotspot );
  return rc;
}
开发者ID:ckvk,项目名称:opennurbs,代码行数:31,代码来源:opennurbs_light.cpp

示例5: Write

BOOL ON_BrepFace::Write( ON_BinaryArchive& file ) const
{
  bool rc = file.WriteInt( m_face_index );
  if ( rc )
    rc = file.WriteArray( m_li );
  if ( rc )
    rc = file.WriteInt( m_si );
  if ( rc )
    rc = file.WriteInt( m_bRev );
  if ( rc )
    rc = file.WriteInt( m_face_material_channel );
  return rc;
}
开发者ID:cciechad,项目名称:brlcad,代码行数:13,代码来源:opennurbs_brep_io.cpp

示例6: Write

bool ON_BezierCage::Write(ON_BinaryArchive& archive) const
{
  bool rc = archive.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,0);

  if (rc)
  {
    rc = archive.WriteInt(m_dim);
    if(rc)
      rc = archive.WriteInt(m_is_rat);
    if (rc)
      rc = archive.WriteInt(m_order[0]);
    if (rc)
      rc = archive.WriteInt(m_order[1]);
    if (rc)
      rc = archive.WriteInt(m_order[2]);
    int i,j,k;
    const int cv_dim = m_is_rat?(m_dim+1):m_dim;
    double* bogus_cv = 0;
    for(i = 0; i < m_order[0] && rc; i++)
    {
      for(j = 0; j < m_order[1] && rc; j++)
      {
        for ( k = 0; k < m_order[2] && rc; k++)
        {
          const double* cv = CV(i,j,k);
          if ( !cv )
          {
            if ( 0 == bogus_cv )
            {
              bogus_cv = (double*)onmalloc(cv_dim*sizeof(*bogus_cv));
              for ( int n = 0; n < cv_dim; n++ )
                bogus_cv[n] = ON_UNSET_VALUE;
            }
            cv = bogus_cv;
          }
          rc = archive.WriteDouble(cv_dim,cv);
        }
      }
    }

    if ( 0 != bogus_cv )
      onfree(bogus_cv);

    if ( !archive.EndWrite3dmChunk() )
    {
      rc = false;
    }
  }

  return rc;
}
开发者ID:raazui,项目名称:3D-Surface-Reconstruction,代码行数:51,代码来源:opennurbs_beziervolume.cpp

示例7: Write

BOOL ON_UserStringList::Write(ON_BinaryArchive& archive) const
{
  bool rc = archive.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,0);
  if ( !rc )
    return false;

  for(;;)
  {
    int count = m_e.Count();
    rc = archive.WriteInt(count);
    if(!rc) break;

    for ( int i = 0; i < count && rc; i++ )
    {
      rc = m_e[i].Write(archive);
    }
    if (!rc) break;

    break;
  }

  if ( !archive.EndWrite3dmChunk() )
    rc = false;

  return rc;
}
开发者ID:cciechad,项目名称:brlcad,代码行数:26,代码来源:opennurbs_userdata.cpp

示例8: WriteDocument

BOOL CSampleDocumentUserDataPlugIn::WriteDocument( CRhinoDoc& doc, ON_BinaryArchive& archive, const CRhinoFileWriteOptions& options )
{
  // Write plug-in document data.  See rhinoSdkPlugIn.h details.

  // If the user is exporting selected geometry, just return
  bool bSelectedMode = options.Mode( CRhinoFileWriteOptions::SelectedMode );
  if( bSelectedMode )
    return TRUE;

  // Write the major and minor version of document as document data
  if( !archive.Write3dmChunkVersion(1, 0) )
    return FALSE;

  // Write the number of string we intend to write as document data
  if( !archive.WriteInt(m_string_table.Count()) )
    return FALSE;
  
  // Write our string table as document data
  for( int i = 0; i < m_string_table.Count(); i++ )
  {
    if( !archive.WriteString(m_string_table[i]) )
      return FALSE;
  }

  return TRUE;
}
开发者ID:619486,项目名称:Rhino5Samples_CPP,代码行数:26,代码来源:SampleDocumentUserDataPlugIn.cpp

示例9: Write

ON_BOOL32 ON_Linetype::Write( ON_BinaryArchive& file) const
{
  bool rc = file.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,1);
  if (rc)
  {
    for(;;)
    {
      // chunk version 1.0 fields
      rc = file.WriteInt( LinetypeIndex());
      if(!rc) break;

      rc = file.WriteString( m_linetype_name );
      if (!rc) break;

      rc = file.WriteArray( m_segments );
      if(!rc) break;

      // chunk version 1.1 fields
      rc = file.WriteUuid( m_linetype_id );
      if (!rc) break;

      break;
    }

    if ( !file.EndWrite3dmChunk() )
      rc = false;
  }
  return rc;
}
开发者ID:ckvk,项目名称:opennurbs,代码行数:29,代码来源:opennurbs_linetype.cpp

示例10: Write

ON_BOOL32 ON_Font::Write(
       ON_BinaryArchive& file // serialize definition to binary archive
     ) const
{
  bool rc = file.Write3dmChunkVersion(1,2);
  while(rc)
  {
    rc = file.WriteInt(m_font_index);
    if  (!rc) break;
    rc = file.WriteString(m_font_name);
    if  (!rc) break;
    {
      // 18 October 2002 Dale Lear:
      //   Lowell, wchar_t has different sizes on different OSs.
      //   When writing a wchar_t string, you should use one
      //   of the WriteString functions.  This function must continue
      //   to use WriteShort(64,...) so old files will remain valid.
      unsigned short sh[64];
      memset(sh,0,sizeof(sh));
      int i;
      for ( i = 0; i < 64 && i < face_name_size-1; i++ )
        sh[i] = m_facename[i];
      rc = file.WriteShort(64, sh);
      if  (!rc) break;
    }

    // 1.1 additions
    rc = file.WriteInt( m_font_weight);
    if  (!rc) break;
    rc = file.WriteInt( m_font_italic);
    if  (!rc) break;
    rc = file.WriteDouble( m_linefeed_ratio);
    if  (!rc) break;

    // 1.2 addition
    rc = file.WriteUuid( m_font_id);
    if (!rc) break;

    // 1.3 addition
//    rc = file.WriteInt( m_font_underlined);
//    if  (!rc) break;

    break;
  }

  return rc;
}
开发者ID:ToMadoRe,项目名称:v4r,代码行数:47,代码来源:opennurbs_font.cpp

示例11:

ON_BOOL32 ON_3dmRevisionHistory::Write( ON_BinaryArchive& file ) const
{
    ON_BOOL32 rc = file.Write3dmChunkVersion( 1, 0 );
    if (rc) rc = file.WriteString( m_sCreatedBy );
    if (rc) rc = file.WriteTime( m_create_time );
    if (rc) rc = file.WriteString( m_sLastEditedBy );
    if (rc) rc = file.WriteTime(m_last_edit_time );
    if (rc) rc = file.WriteInt( m_revision_count );
    return rc;
}
开发者ID:raazui,项目名称:3D-Surface-Reconstruction,代码行数:10,代码来源:opennurbs_3dm_properties.cpp

示例12: Write

ON_BOOL32 ON_TextEntity::Write( ON_BinaryArchive& file ) const
{
  ON_BOOL32 rc = ON_Annotation::Write( file );
  if( rc )
    rc = file.WriteString( m_facename );
  if( rc )
    rc = file.WriteInt( m_fontweight );
  if( rc )
    rc = file.WriteDouble( m_height );
  return rc;
}
开发者ID:2php,项目名称:pcl,代码行数:11,代码来源:opennurbs_annotation.cpp

示例13: Write

ON_BOOL32 MyUserData::Write( ON_BinaryArchive& file ) const
{
  ON_BOOL32 rc = true;
  if ( rc ) 
    rc = file.WriteInt(m_my_int);
  if ( rc ) 
    rc = file.WriteLine(m_my_line);
  if ( rc ) 
    rc = file.WriteString(m_my_string);
  return rc;
}
开发者ID:behollis,项目名称:brlcad-svn-rev65072-gsoc2015,代码行数:11,代码来源:example_userdata.cpp

示例14: Write

ON_BOOL32 ON_Group::Write(
       ON_BinaryArchive& file // serialize definition to binary archive
     ) const
{
  ON_BOOL32 rc = file.Write3dmChunkVersion(1,1);
  // version 1.0 fields
  if (rc) rc = file.WriteInt(m_group_index);
  if (rc) rc = file.WriteString(m_group_name);
  // version 1.1 fields
  if (rc) rc = file.WriteUuid(m_group_id);
  return rc;
}
开发者ID:2php,项目名称:pcl,代码行数:12,代码来源:opennurbs_group.cpp

示例15: Write

ON_BOOL32 ON_LineCurve::Write(
       ON_BinaryArchive& file // open binary file
     ) const
{
  ON_BOOL32 rc = file.Write3dmChunkVersion(1,0);
  if (rc) {
    rc = file.WriteLine( m_line );
    if (rc) rc = file.WriteInterval( m_t );
    if (rc) rc = file.WriteInt(m_dim);
  }
  return rc;
}
开发者ID:2php,项目名称:pcl,代码行数:12,代码来源:opennurbs_linecurve.cpp


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