本文整理汇总了C++中ON_BinaryArchive::ArchiveFullPath方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_BinaryArchive::ArchiveFullPath方法的具体用法?C++ ON_BinaryArchive::ArchiveFullPath怎么用?C++ ON_BinaryArchive::ArchiveFullPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_BinaryArchive
的用法示例。
在下文中一共展示了ON_BinaryArchive::ArchiveFullPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool ON_3dmProperties::Write(ON_BinaryArchive& file) const
{
bool rc = true;
// This short chunk identifies the version of OpenNURBS that was used to write this file.
const unsigned int version_number_to_write = ON_BinaryArchive::ArchiveOpenNURBSVersionToWrite(file.Archive3dmVersion(), ON::Version());
rc = file.BeginWrite3dmChunk(TCODE_PROPERTIES_OPENNURBS_VERSION, version_number_to_write);
if (rc)
rc = file.EndWrite3dmChunk();
if (!rc)
return false;
// This chunk added November 5, 2015
const ON_wString archive_full_path
= file.ArchiveFullPath().IsEmpty()
? m_3dmArchiveFullPathName
: file.ArchiveFullPath();
if (archive_full_path.IsNotEmpty())
{
if (!file.BeginWrite3dmChunk(TCODE_PROPERTIES_AS_FILE_NAME, 0))
return false;
rc = file.WriteString(file.ArchiveFullPath());
if (!file.EndWrite3dmChunk())
rc = false;
if (!rc)
return false;
}
// optional TCODE_PROPERTIES_REVISIONHISTORY chunk - file creation/revision information
if ( rc && m_RevisionHistory.IsValid() ) {
rc = file.BeginWrite3dmChunk(TCODE_PROPERTIES_REVISIONHISTORY,0);
if ( rc ) {
rc = m_RevisionHistory.Write(file);
if ( !file.EndWrite3dmChunk() )
rc = false;
}
}
// optional TCODE_PROPERTIES_NOTES chunk - file notes
if ( rc && m_Notes.IsValid() ) {
rc = file.BeginWrite3dmChunk(TCODE_PROPERTIES_NOTES,0);
if ( rc ) {
rc = m_Notes.Write(file);
if ( !file.EndWrite3dmChunk() )
rc = false;
}
}
//// When merging Mac code please note that the
//// TCODE_PROPERTIES_PREVIEWIMAGE chunk is OBSOLETE.
//// DO NOT WRITE THEM IN V6 FILES. If performance is an
//// issue, we will address it some other way.
// optional TCODE_PROPERTIES_COMPRESSED_PREVIEWIMAGE chunk - bitmap preview
if ( rc && m_PreviewImage.IsValid() && file.Save3dmPreviewImage())
{
rc = file.BeginWrite3dmChunk(TCODE_PROPERTIES_COMPRESSED_PREVIEWIMAGE,0);
if ( rc )
{
rc = m_PreviewImage.WriteCompressed(file);
if ( !file.EndWrite3dmChunk() )
rc = false;
}
}
// optional TCODE_PROPERTIES_APPLICATION chunk - application information
if ( rc && m_Application.IsValid() )
{
rc = file.BeginWrite3dmChunk(TCODE_PROPERTIES_APPLICATION,0);
if ( rc )
{
rc = m_Application.Write(file);
if ( !file.EndWrite3dmChunk() )
rc = false;
}
}
// required TCODE_ENDOFTABLE chunk - marks end of properties table
if ( rc ) {
rc = file.BeginWrite3dmChunk( TCODE_ENDOFTABLE, 0 );
if ( rc ) {
if ( !file.EndWrite3dmChunk() )
rc = false;
}
}
return rc;
}