本文整理汇总了C++中ON_TextLog类的典型用法代码示例。如果您正苦于以下问题:C++ ON_TextLog类的具体用法?C++ ON_TextLog怎么用?C++ ON_TextLog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ON_TextLog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void ON_3dmNotes::Dump(ON_TextLog& dump) const
{
const wchar_t* s = static_cast< const wchar_t* >(m_notes);
if ( s )
dump.PrintWrappedText(s);
dump.Print("\n");
}
示例2: 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();
}
}
}
示例3:
void ON_3dmNotes::Dump(ON_TextLog& dump) const
{
const wchar_t* s = m_notes;
if ( s )
dump.PrintWrappedText(s);
dump.Print("\n");
}
示例4: Dump
void ON_Hatch::Dump( ON_TextLog& dump) const
{
dump.Print( "Hatch: Solid fill");
int count = m_loops.Count();
dump.Print( "Loop count = %d\n", count);
for( int i = 0; i < count; i++)
m_loops[i]->Dump( dump);
}
示例5: Dump
void ON_AnnotationArrow::Dump( ON_TextLog& log ) const
{
log.Print("ON_AnnotationArrow: ");
log.Print(m_tail);
log.Print(" to ");
log.Print(m_head);
log.Print("\n");
}
示例6: Dump
void ON_Group::Dump( ON_TextLog& dump ) const
{
const wchar_t* name = GroupName();
if ( !name )
name = L"";
dump.Print("group index = %d\n",m_group_index);
dump.Print("group name = \"%ls\"\n",name);
}
示例7: 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();
}
示例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();
}
示例9: Dump
void ON_Font::Dump( ON_TextLog& dump ) const
{
const wchar_t* name = FontName();
if ( !name )
name = L"";
dump.Print("font index = %d\n",m_font_index);
dump.Print("font name = \"%S\"\n",name);
dump.Print("font face name = \"%S\"\n",m_facename);
dump.Print("font weight = \"%d\"\n",m_font_weight);
dump.Print("font is italic = \"%d\"\n",m_font_italic);
dump.Print("font linefeed ratio = \"%g\"\n", m_linefeed_ratio);
}
示例10: Dump
void ON_LinetypeSegment::Dump( ON_TextLog& dump) const
{
switch( m_seg_type)
{
case stLine:
dump.Print( "Segment type = Line: %g\n", m_length);
break;
case stSpace:
dump.Print( "Segment type = Space: %g\n", m_length);
break;
}
}
示例11: Dump
void ON_Layer::Dump( ON_TextLog& dump ) const
{
const wchar_t* sName = LayerName();
if ( !sName )
sName = L"";
dump.Print("index = %d\n",m_layer_index);
dump.Print("name = \"%S\"\n",sName);
dump.Print("display = %s\n",m_bVisible?"visible":"hidden");
dump.Print("picking = %s\n",m_bLocked?"locked":"unlocked");
dump.Print("display color rgb = "); dump.PrintRGB(m_color); dump.Print("\n");
dump.Print("plot color rgb = "); dump.PrintRGB(m_plot_color); dump.Print("\n");
dump.Print("default material index = %d\n",m_material_index);
}
示例12: Internal_TestFileRead
static const ONX_ErrorCounter Internal_TestFileRead(
ON_TextLog& text_log,
const ON_wString fullpath,
const ON_wString text_log_path,
bool bVerbose
)
{
FILE* fp = nullptr;
fp = ON_FileStream::Open3dmToRead(fullpath);
ONX_ErrorCounter error_counter;
error_counter.ClearLibraryErrorsAndWarnings();
const ON_wString path_to_print
= (text_log_path.IsNotEmpty())
? text_log_path
: fullpath;
for (;;)
{
if (nullptr == fp)
{
text_log.Print(
L"Skipped file: %ls\n",
static_cast<const wchar_t*>(path_to_print)
);
error_counter.IncrementFailureCount();
break;
}
text_log.Print(
L"File name: %ls\n",
static_cast<const wchar_t*>(path_to_print)
);
ON_BinaryFile source_archive(ON::archive_mode::read3dm, fp);
source_archive.SetArchiveFullPath(fullpath);
error_counter += Internal_TestModelRead(text_log, path_to_print, source_archive, bVerbose);
break;
}
if ( nullptr != fp )
{
ON_FileStream::Close(fp);
fp = nullptr;
}
return error_counter;
}
示例13: 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();
}
}
示例14: Dump
void ON_PointGrid::Dump( ON_TextLog& dump ) const
{
dump.Print( "ON_PointGrid size = %d X %d\n",
m_point_count[0], m_point_count[1] );
if ( m_point.Count() < 1 ) {
dump.Print(" NO point array\n");
}
else {
dump.PrintPointGrid( 3, false, m_point_count[0], m_point_count[1],
3*m_point_stride0, 3,
&m_point[0].x,
" point"
);
}
}
示例15:
void
ON_SurfaceProxy::Dump( ON_TextLog& dump ) const
{
dump.Print("ON_SurfaceProxy uses %x\n",m_surface);
if (m_surface )
m_surface->Dump(dump);
}