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


C++ ON_TextLog::PushIndent方法代码示例

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


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

示例1: Dump

void ON_PlugInRef::Dump(ON_TextLog& text_log) const
{
  text_log.Print("Plug-in executable information:\n");
  text_log.PushIndent();
  text_log.Print("id = ");text_log.Print(m_plugin_id);text_log.Print("\n");
  text_log.Print("type = %d\n",m_plugin_type);
  text_log.Print("platform = %d\n",m_plugin_platform);
  text_log.Print("sdk version = %d.%d\n",m_plugin_sdk_version,m_plugin_sdk_service_release);
  text_log.Print("name = "); text_log.Print(m_plugin_name); text_log.Print("\n");
  text_log.Print("version = "); text_log.Print(m_plugin_version); text_log.Print("\n");
  text_log.Print("file name = "); text_log.Print(m_plugin_filename); text_log.Print("\n");
  text_log.PopIndent();

  text_log.Print("Developer information:\n");
  text_log.PushIndent();
  text_log.Print("website url = ");text_log.Print(m_developer_website); text_log.Print("\n");
  text_log.Print("update url = ");text_log.Print(m_developer_updateurl); text_log.Print("\n");
  text_log.Print("organization = ");text_log.Print(m_developer_organization); text_log.Print("\n");
  text_log.Print("address = ");text_log.Print(m_developer_address); text_log.Print("\n");
  text_log.Print("country = ");text_log.Print(m_developer_country); text_log.Print("\n");
  text_log.Print("voice = ");text_log.Print(m_developer_phone); text_log.Print("\n");
  text_log.Print("email = ");text_log.Print(m_developer_email); text_log.Print("\n");
  text_log.Print("fax = ");text_log.Print(m_developer_fax); text_log.Print("\n");
  text_log.PopIndent();

}
开发者ID:jl2,项目名称:ONView,代码行数:26,代码来源:opennurbs_pluginlist.cpp

示例2:

void ON_3dmProperties::Dump( ON_TextLog& dump ) const
{
    dump.Print("Revision history:\n");
    dump.PushIndent();
    m_RevisionHistory.Dump(dump);
    dump.PopIndent();

    dump.Print("\n");
    dump.Print("Notes:\n");
    if ( m_Notes.m_notes.Length() > 0 ) {
        dump.PushIndent();
        m_Notes.Dump(dump);
        dump.PopIndent();
    }

    dump.Print("\n");
    dump.Print("Application information:\n");
    dump.PushIndent();
    m_Application.Dump(dump);
    dump.PopIndent();

    if ( m_PreviewImage.IsValid() ) {
        dump.Print("\n");
        dump.Print("Preview image:\n");
        dump.PushIndent();
        m_PreviewImage.Dump(dump);
        dump.PopIndent();
    }
}
开发者ID:raazui,项目名称:3D-Surface-Reconstruction,代码行数:29,代码来源:opennurbs_3dm_properties.cpp

示例3: Dump

void ON_ClippingPlaneSurface::Dump( ON_TextLog& text_log ) const
{
  text_log.Print("Clipping plane surface\n");
  text_log.PushIndent();  
  text_log.Print("Enabled = %d",m_clipping_plane.m_bEnabled);
  text_log.Print("View IDs =\n");
  {
    text_log.PushIndent();
    ON_SimpleArray<ON_UUID> uuid_list;
    m_clipping_plane.m_viewport_ids.GetUuids(uuid_list);
    for( int i=0; i<uuid_list.Count(); i++ )
    {
      text_log.Print( uuid_list[i] );
      text_log.Print("\n");
    }
    text_log.PopIndent();
  }
  text_log.Print("Plane ID = ");
  text_log.Print(m_clipping_plane.m_plane_id);
  text_log.Print("\n");  

  text_log.Print("Plane surface\n");
  text_log.PushIndent();  
  ON_PlaneSurface::Dump(text_log);
  text_log.PopIndent();  
  text_log.PopIndent();  
}
开发者ID:2php,项目名称:pcl,代码行数:27,代码来源:opennurbs_planesurface.cpp

示例4: Dump

void ON_CheckSum::Dump(ON_TextLog& text_log) const
{
  // Using %llu so this code is portable for both 32 and 64 bit
  // builds on a wide range of compilers.

  unsigned long long u; // 8 bytes in windows and gcc - should be at least as big
                        // as a size_t or time_t.

  text_log.Print("Checksum:");
  if ( !IsSet() )
    text_log.Print("zero (not set)\n");
  else
  {
    text_log.PushIndent();
    text_log.Print("\n");
    u = (unsigned long long)m_size;
    text_log.Print("Size: %llu bytes\n",u);
    u = (unsigned long long)m_time;
    text_log.Print("Last Modified Time: %u (seconds since January 1, 1970, UCT)\n",u);
    text_log.Print("CRC List: %08x, %08x, %08x, %08x, %08x, %08x, %08x, %08x\n",
                   m_crc[0],m_crc[1],m_crc[2],m_crc[3],m_crc[4],m_crc[5],m_crc[6],m_crc[7]
                   );
    text_log.PopIndent();
  }
}
开发者ID:behollis,项目名称:brlcad-svn-rev65072-gsoc2015,代码行数:25,代码来源:opennurbs_string.cpp

示例5: DumpInstanceDefinition

void CCommandSampleDumpBlockTree::DumpInstanceDefinition( const CRhinoInstanceDefinition* idef, ON_TextLog& dump, bool bRoot )
{
  if( idef && ! idef->IsDeleted() )
  {
    ON_wString node;
    if( bRoot )
      node = L"\u2500";
    else
      node = L"\u2514";
    dump.Print(L"%s Instance definition %d = %s\n", node, idef->Index(), idef->Name() );

    const int idef_object_count = idef->ObjectCount();
    if( idef_object_count )
    {
      dump.PushIndent();
      for( int i = 0; i < idef->ObjectCount(); i++ )
      {
        const CRhinoObject* obj = idef->Object( i );
        if( obj )
        {
          const CRhinoInstanceObject* iref = CRhinoInstanceObject::Cast( obj );
          if( iref )
            DumpInstanceDefinition( iref->InstanceDefinition(), dump, false );
          else
            dump.Print(L"\u2514 Object %d = %s\n", i, obj->ShortDescription(false) );
        }
      }
      dump.PopIndent();
    }
  }
}
开发者ID:619486,项目名称:Rhino5Samples_CPP,代码行数:31,代码来源:cmdSampleDumpBlockTree.cpp

示例6: Dump

void ON_UserData::Dump( ON_TextLog& text_log ) const
{
  text_log.Print("User Data:\n");
  text_log.PushIndent();

  // print class name and class uuid
  ON_Object::Dump(text_log);

  // developer's user data description
  ON_wString description;
  const_cast<ON_UserData*>(this)->GetDescription(description);
  if ( description.IsEmpty() )
    description = L"none";
  const wchar_t* ws = description;
  text_log.Print("user data description: %S\n",ws);
  text_log.Print("user data uuid: ");
  text_log.Print(m_userdata_uuid);
  text_log.Print("\n");
  text_log.Print("user data copy count: %d\n",this->m_userdata_copycount);

  // archive setting
  text_log.Print("user data saved in 3dm archive: %s\n",Archive() ? "yes" : "no");

  text_log.PopIndent();
}
开发者ID:cciechad,项目名称:brlcad,代码行数:25,代码来源:opennurbs_userdata.cpp

示例7: Dump

void ON_ArcCurve::Dump( ON_TextLog& dump ) const
{
  dump.Print( "ON_ArcCurve:  domain = [%g,%g]\n",m_t[0],m_t[1]);
  dump.PushIndent();
  dump.Print( "center = ");
  dump.Print( m_arc.plane.origin );
  dump.Print( "\nradius = %g\n",m_arc.radius);
  dump.Print( "length = %g\n",m_arc.Length());
  dump.PopIndent();
}
开发者ID:Bardo91,项目名称:pcl,代码行数:10,代码来源:opennurbs_arccurve.cpp

示例8: Dump

void CExampleWriteUserData::Dump( ON_TextLog& text_log ) const
{
  ON_UserData::Dump(text_log);
  text_log.PushIndent();
  const wchar_t* s = m_str;
  if ( 0 == s ) 
    s = L"";
  text_log.Print("m_str: %ls\n",s);
  text_log.Print("m_sn: %d\n",m_sn);
  text_log.PopIndent();
}
开发者ID:behollis,项目名称:brlcad-svn-rev65072-gsoc2015,代码行数:11,代码来源:example_ud.cpp

示例9: Dump

void ON_LineCurve::Dump( ON_TextLog& dump ) const
{
  dump.Print( "ON_LineCurve:  domain = [%g,%g]\n",m_t[0],m_t[1]);
  dump.PushIndent();
  dump.Print( "start = ");
  dump.Print( m_line.from );
  dump.Print( "\nend = ");
  dump.Print( m_line.to );
  dump.Print( "\n");
  dump.Print( "length = %g\n",m_line.Length());
  dump.PopIndent();
}
开发者ID:2php,项目名称:pcl,代码行数:12,代码来源:opennurbs_linecurve.cpp

示例10: Dump

bool ON__ClassIdDumpNode::Dump( int depth, ON_TextLog& text_log )
{
  bool rc = true;
  if ( 0 == m_class_id || m_depth != 0 || depth < 1)
    rc = false;
  else
  {
    m_depth = depth;
    const char* class_name = m_class_id->ClassName();
    if ( 0 == class_name )
    {
      class_name = "!!ERROR!!";
      rc = false;
    }
    text_log.Print("%s::ClassId: ",m_class_id->ClassName());
    text_log.Print( "mark=%d ",m_class_id->Mark() );
    text_log.Print( m_class_id->Uuid() );
    text_log.Print("  (%08x)\n",m_class_id);
    int i, count = m_child_nodes.Count();
    if ( count > 0 )
    {
      // dump children names alphabetically
      m_child_nodes.HeapSort( ON__ClassIdDumpNode_CompareName );

      text_log.PushIndent();
      for ( i = 0; i < count; i++ )
      {
        ON__ClassIdDumpNode* child_node = m_child_nodes[i];
        if ( 0 == child_node )
          rc = false;
        else
        {
          if ( !child_node->Dump(depth+1,text_log) )
            rc = false;
        }
      }
      text_log.PopIndent();
    }
  }
  return rc;
}
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:41,代码来源:opennurbs_object.cpp

示例11: file

static bool Dump3dmFileHelper( 
        const wchar_t* sFileName, // full name of file
        ON_TextLog& dump
        )
{
  dump.Print("====== FILENAME: %ls\n",sFileName);
  ON_Workspace ws;
  FILE* fp = ws.OpenFile( sFileName, L"rb" ); // file automatically closed by ~ON_Workspace()
  if ( !fp ) {
    dump.Print("**ERROR** Unable to open file.\n");
    return false;
  }

  ON_BinaryFile file( ON::read3dm, fp );

  int version = 0;
  ON_String comment_block;
  ON_BOOL32 rc = file.Read3dmStartSection( &version, comment_block );
  if (!rc) {
    dump.Print("**ERROR** Read3dmStartSection() failed\n");
    return false;
  }
  dump.Print("====== VERSION: %d\n",version );
  dump.Print("====== COMMENT BLOCK:\n",version );
  dump.PushIndent();
  dump.Print(comment_block);
  dump.PopIndent();
  dump.Print("====== CHUNKS:\n",version );
  unsigned int typecode;
  while ( !file.AtEnd() ) {
    typecode = file.Dump3dmChunk( dump, 0 );
    if ( !typecode )
      break;
    if ( typecode == TCODE_ENDOFFILE )
      break;
  }
  dump.Print("====== FINISHED: %ls\n",sFileName);

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

示例12: Dump

void ON_PointCloud::Dump( ON_TextLog& dump ) const
{
  int i;
  const bool bHasNormals = HasPointNormals();
  const bool bHasHiddenPoints = (HiddenPointCount() > 0);
  const int point_count = m_P.Count();
  dump.Print("ON_PointCloud: %d points\n",point_count);
  dump.PushIndent();
  for ( i = 0; i < point_count; i++ ) {
    dump.Print("point[%2d]: ",i);
    dump.Print( m_P[i] );
    if ( bHasNormals )
    {
      dump.Print(", normal = ");
      dump.Print(m_N[i]);
    }
    if ( bHasHiddenPoints && m_H[i])
    {
      dump.Print(" (hidden)");
    }
    dump.Print("\n");
  }
  dump.PopIndent();
}
开发者ID:jl2,项目名称:ONView,代码行数:24,代码来源:opennurbs_pointcloud.cpp

示例13: Dump

void ON_InstanceDefinition::Dump( ON_TextLog& text_log ) const
{
  const wchar_t* s;

  s = m_name;
  if ( 0 == s ) 
    s = L"";
  text_log.Print(L"Name: \"%s\"\n",s);


  text_log.Print("Type: ");
  switch(m_idef_update_type)
  {
  case ON_InstanceDefinition::static_def:
    text_log.Print("embedded.");
    break;
  case ON_InstanceDefinition::embedded_def:
    text_log.Print("embedded - definition from source archive.");
    break;
  case ON_InstanceDefinition::linked_and_embedded_def:
    text_log.Print("embedded and linked - definition from source archive.");
    break;
  case ON_InstanceDefinition::linked_def:
    text_log.Print("linked - definition from source archive.");
    break;
  default:
    text_log.Print("not valid");
    break;
  }
  text_log.Print("\n");


  text_log.Print(L"Id: "); text_log.Print(m_uuid); text_log.Print(L"\n");

  s = m_description;
  if ( 0 != s && 0 != s[0]) 
    text_log.Print(L"Description: \"%s\"\n",s);

  s = m_url;
  if ( 0 != s && 0 != s[0]) 
    text_log.Print(L"URL: \"%s\"\n",s);

  s = m_url_tag;
  if ( 0 != s && 0 != s[0]) 
    text_log.Print(L"URL tag: \"%s\"\n",s);

  m_us.Dump(text_log);

  s = SourceArchive();
  text_log.Print(L"Source archive: ");
  if ( 0 == s || 0 == s[0] )
  {
    text_log.Print(L"none.\n");
  }
  else
  {
    bool bRel = m_source_bRelativePath;
    text_log.Print(L"\"%s\" (%s)\n",s,bRel?L"relative":L"absolute");

    text_log.PushIndent();
    ON_wString str;
    bRel = false;
    if ( GetAlternateSourceArchivePath(str,bRel) )
    {
      s = str;
      if ( 0 == s || 0 == s[0] )
        s = L"";
      text_log.Print(L"Alternate archive: \"%s\" (%s)\n",s,bRel?L"relative":L"absolute");
    }

    text_log.Print(L"Update depth: %d\n",m_idef_update_type);

    text_log.Print(L"Archive ");
    m_source_archive_checksum.Dump(text_log);    
    text_log.PopIndent();
  }

  const int id_count = m_object_uuid.Count();
  text_log.Print(L"Contains: %d objects\n",id_count);

  if ( id_count > 0 )
  {
    text_log.PushIndent();

    text_log.Print(m_object_uuid[0]); 
    text_log.Print(L"\n");

    if ( id_count > 4 )
    {
      text_log.Print(L"...\n");
    }
    else
    {
      for ( int i = 1; i < id_count; i++ )
      {
        text_log.Print(m_object_uuid[i]);
        text_log.Print(L"\n");
      }
    }

//.........这里部分代码省略.........
开发者ID:Bastl34,项目名称:PCL,代码行数:101,代码来源:opennurbs_instance.cpp

示例14: switch

void
DumpSSXEvent(ON_SSX_EVENT &x, ON_TextLog &text_log)
{
    text_log.Print("m_type: ");
    switch (x.m_type) {
	case ON_SSX_EVENT::no_ssx_event:
	    text_log.Print("no_ssx_event");
	    break;
	case ON_SSX_EVENT::ssx_transverse:
	    text_log.Print("ssx_transverse");
	    break;
	case ON_SSX_EVENT::ssx_tangent:
	    text_log.Print("ssx_tangent");
	    break;
	case ON_SSX_EVENT::ssx_overlap:
	    text_log.Print("ssx_overlap");
	    break;
	case ON_SSX_EVENT::ssx_transverse_point:
	    text_log.Print("ssx_transverse_point");
	    break;
	case ON_SSX_EVENT::ssx_tangent_point:
	    text_log.Print("ssx_tangent_point");
	    break;
	default:
	    text_log.Print("illegal value");
	    break;
    }
    text_log.Print("\n");
    text_log.PushIndent();

    switch (x.m_type) {
	case ON_SSX_EVENT::ssx_transverse_point:
	case ON_SSX_EVENT::ssx_tangent_point:
	    // don't use %g so the text_log double format can control display precision
	    text_log.Print("SurfaceA(");
	    text_log.Print(x.m_pointA[0]);
	    text_log.Print(",");
	    text_log.Print(x.m_pointA[1]);
	    text_log.Print(") = \n");

	    text_log.Print("SurfaceB(");
	    text_log.Print(x.m_pointB[0]);
	    text_log.Print(",");
	    text_log.Print(x.m_pointB[1]);
	    text_log.Print(") = \n");

	    text_log.PushIndent();
	    text_log.Print(x.m_point3d);
	    text_log.Print("\n");
	    text_log.PopIndent();
	    break;

	case ON_SSX_EVENT::ssx_transverse:
	case ON_SSX_EVENT::ssx_tangent:
	case ON_SSX_EVENT::ssx_overlap:
	    text_log.Print("SurfaceA:\n");
	    text_log.PushIndent();
	    x.m_curveA->Dump(text_log);
	    text_log.PopIndent();

	    text_log.Print("SurfaceB:\n");
	    text_log.PushIndent();
	    x.m_curveB->Dump(text_log);
	    text_log.PopIndent();

	    text_log.Print("3D curves:\n");
	    text_log.PushIndent();
	    x.m_curve3d->Dump(text_log);
	    text_log.PopIndent();
	    break;

	case ON_SSX_EVENT::no_ssx_event:
	case ON_SSX_EVENT::ssx_32bit_enum:
	    // these extra cses keep gcc happy and quiet
	    break;
    }
}
开发者ID:behollis,项目名称:brlcad-svn-rev65072-gsoc2015,代码行数:77,代码来源:ssx_event.cpp

示例15: if

unsigned int Dump3dmChunk( ON_BinaryArchive& file, ON_TextLog& dump, int recursion_depth )
{
  BOOL bShortChunk = FALSE;
  const size_t offset0 = file.CurrentPosition();
  unsigned int typecode = 0;
  int value;
  BOOL rc = file.BeginRead3dmChunk( &typecode, &value );
  if (!rc) {
    ErrorReport(offset0,"BeginRead3dmChunk() failed.",dump);
  }
  else {
    if ( !typecode ) {
      ErrorReport(offset0,"BeginRead3dmChunk() returned typecode = 0.",dump);
      file.EndRead3dmChunk();
      return 0;
    }
    else {
      if ( 0 == recursion_depth )
      {
        dump.Print("\n");
      }

      bShortChunk = (0 != (typecode & TCODE_SHORT));
      if ( bShortChunk )
      {
        dump.Print("%6d: %08X %s: value = %d (%08X)\n", offset0, typecode, TypeCodeString(typecode), value, value );
      }
      else
      {
        // long chunk value = length of chunk data
        if ( value < 0 )
        {
          ErrorReport(offset0,"BeginRead3dmChunk() returned length < 0.",dump);
          file.EndRead3dmChunk();
          return 0;
        }
        dump.Print("%6d: %08X %s: length = %d bytes\n", offset0, typecode, TypeCodeString(typecode), value );
      }

      int major_userdata_version = -1;
      int minor_userdata_version = -1;

      switch( typecode )
      {
      case TCODE_PROPERTIES_TABLE:
      case TCODE_SETTINGS_TABLE:
      case TCODE_BITMAP_TABLE:
      case TCODE_MATERIAL_TABLE:
      case TCODE_LAYER_TABLE:
      case TCODE_GROUP_TABLE:
      case TCODE_LIGHT_TABLE:
      case TCODE_FONT_TABLE:
      case TCODE_DIMSTYLE_TABLE:
      case TCODE_HATCHPATTERN_TABLE:
      case TCODE_LINETYPE_TABLE:
      case TCODE_TEXTURE_MAPPING_TABLE:
      case TCODE_HISTORYRECORD_TABLE:
      case TCODE_USER_TABLE:
      case TCODE_INSTANCE_DEFINITION_TABLE:
      case TCODE_OBJECT_TABLE:
        // start of a table
        {
          dump.PushIndent();
          unsigned int record_typecode = 0;
          for (;;) {
            record_typecode = Dump3dmChunk( file, dump, recursion_depth+1 );
            if ( !record_typecode ) {
              break;
            }
            if ( TCODE_ENDOFTABLE == record_typecode ) {
              break;
            }
          }
          dump.PopIndent();
        }
        break;

      case TCODE_BITMAP_RECORD:
        {
          dump.PushIndent();
          unsigned int bitmap_chunk_typecode = Dump3dmChunk( file, dump, recursion_depth+1 );
          if ( !typecode )
            typecode = bitmap_chunk_typecode;
          dump.PopIndent();
        }
        break;

      case TCODE_MATERIAL_RECORD:
        {
          dump.PushIndent();
          unsigned int material_chunk_typecode = Dump3dmChunk( file, dump, recursion_depth+1 );
          if ( !typecode )
            typecode = material_chunk_typecode;
          dump.PopIndent();
        }
        break;

      case TCODE_LAYER_RECORD:
        {
          dump.PushIndent();
//.........这里部分代码省略.........
开发者ID:cciechad,项目名称:brlcad,代码行数:101,代码来源:example_dump.cpp


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