Foxit PDF SDK
foxit::ofd::Attachment类 参考
类 foxit::ofd::Attachment 继承关系图:
foxit::Base

Public 成员函数

 Attachment (const Attachment &other)
 构造函数,通过另一个附件对象。 更多...
 
 ~Attachment ()
 析构函数。
 
void EnableDeletable (bool deletable)
 设置附件可删除性。 更多...
 
void EnableEditable (bool editable)
 设置附件可编辑性。 更多...
 
void EnableExportable (bool exportable)
 设置附件可导出性。 更多...
 
void EnableVisible (bool visible)
 设置附件可见性。 更多...
 
AttachmentInfo GetAttachmentInfo ()
 获取附件信息。 更多...
 
String GetDescription ()
 获取描述。 更多...
 
bool GetFile (const String &file_path)
 导出文件到指定路径。 更多...
 
bool GetFile (const WString &file_path)
 导出文件到指定路径。 更多...
 
bool GetFile (foxit::common::file::WriterCallback *file_writer)
 通过文件写入回调导出文件。 更多...
 
foxit::uint32 GetID ()
 获取ID。 更多...
 
String GetModifier ()
 获取修改者名称。 更多...
 
bool IsDeletable ()
 检查附件是否可删除。 更多...
 
bool IsEditable ()
 检查附件是否可编辑。 更多...
 
bool IsEmpty () const
 检查当前对象是否为空。 更多...
 
bool IsExportable ()
 检查附件是否可导出。 更多...
 
bool IsVisible ()
 检查附件是否可见。 更多...
 
bool operator != (const Attachment &other) const
 不相等操作符。 更多...
 
Attachmentoperator= (const Attachment &other)
 赋值操作符。 更多...
 
bool operator== (const Attachment &other) const
 相等操作符。 更多...
 
void SetAttachmentInfo (const AttachmentInfo &info)
 设置附件信息。 更多...
 
void SetCreationDate (const foxit::DateTime &creation_date)
 设置创建日期。 更多...
 
void SetDescription (const String &description)
 设置描述。 更多...
 
bool SetFile (const String &file_path, const String &name=String())
 通过文件设置附件内容。 更多...
 
bool SetFile (const WString &file_path, const String &name=String())
 通过文件设置附件内容。 更多...
 
bool SetFile (foxit::common::file::ReaderCallback *file_reader, const String &name=String())
 通过文件读取回调设置附件内容。 更多...
 
void SetFormat (const String &format)
 设置格式。 更多...
 
void SetModDate (const foxit::DateTime &modification_date)
 设置修改日期。 更多...
 
void SetModifier (const String &modifier)
 设置修改者名称。 更多...
 
void SetName (const String &name)
 设置名称。 更多...
 
void SetUsage (const String &usage)
 设置用途。 更多...
 
- Public 成员函数 继承自 foxit::Base
FS_HANDLE Handle () const
 获取当前对象的句柄。 更多...
 

详细描述

此类表示和OFD附件相关的操作。

构造及析构函数说明

◆ Attachment()

foxit::ofd::Attachment::Attachment ( const Attachment other)

构造函数,通过另一个附件对象。

参数
[in]other另一个附件对象。

成员函数说明

◆ EnableDeletable()

void foxit::ofd::Attachment::EnableDeletable ( bool  deletable)

设置附件可删除性。

参数
[in]deletable是否可删除。true表示可删除,false表示不可删除。
返回
无。

◆ EnableEditable()

void foxit::ofd::Attachment::EnableEditable ( bool  editable)

设置附件可编辑性。

参数
[in]editable是否可编辑。true表示可编辑,false表示不可编辑。
返回
无。

◆ EnableExportable()

void foxit::ofd::Attachment::EnableExportable ( bool  exportable)

设置附件可导出性。

参数
[in]exportable是否可导出。true表示可导出,false表示不可导出。
返回
无。

◆ EnableVisible()

void foxit::ofd::Attachment::EnableVisible ( bool  visible)

设置附件可见性。

参数
[in]visible是否可见。true表示可见,false表示不可见。
返回
无。

◆ GetAttachmentInfo()

AttachmentInfo foxit::ofd::Attachment::GetAttachmentInfo ( )

获取附件信息。

返回
附件信息。请参考 foxit::ofd::AttachmentInfo

◆ GetDescription()

String foxit::ofd::Attachment::GetDescription ( )

获取描述。

返回
描述。

◆ GetFile() [1/3]

bool foxit::ofd::Attachment::GetFile ( const String file_path)

导出文件到指定路径。

参数
[in]file_path指定的文件路径。
返回
true 表示成功,false 表示失败。

◆ GetFile() [2/3]

bool foxit::ofd::Attachment::GetFile ( const WString file_path)

导出文件到指定路径。

参数
[in]file_path指定的文件路径。
返回
true 表示成功,false 表示失败。

◆ GetFile() [3/3]

bool foxit::ofd::Attachment::GetFile ( foxit::common::file::WriterCallback file_writer)

通过文件写入回调导出文件。

参数
[in]file_writer用户实现的 foxit::common::file::WriterCallback 对象,用于保存文件。
返回
true 表示成功,false 表示失败。

◆ GetID()

foxit::uint32 foxit::ofd::Attachment::GetID ( )

获取ID。

返回
ID。

◆ GetModifier()

String foxit::ofd::Attachment::GetModifier ( )

获取修改者名称。

返回
修改者名称。

◆ IsDeletable()

bool foxit::ofd::Attachment::IsDeletable ( )

检查附件是否可删除。

返回
true表示可删除,false表示不可删除。

◆ IsEditable()

bool foxit::ofd::Attachment::IsEditable ( )

检查附件是否可编辑。

返回
true表示可编辑,false表示不可编辑。

◆ IsEmpty()

bool foxit::ofd::Attachment::IsEmpty ( ) const

检查当前对象是否为空。

当前对象为空时,表示当前对象是无用的。

返回
true 表示当前对象为空,false 表示不为空。

◆ IsExportable()

bool foxit::ofd::Attachment::IsExportable ( )

检查附件是否可导出。

返回
true表示可导出,false表示不可导出。

◆ IsVisible()

bool foxit::ofd::Attachment::IsVisible ( )

检查附件是否可见。

返回
true表示可见,false表示不可见。

◆ operator !=()

bool foxit::ofd::Attachment::operator != ( const Attachment other) const

不相等操作符。

参数
[in]other另一个附件对象。此函数将检查当前对象是否不等于这个对象。
返回
true 表示不相等,false 表示相等。

◆ operator=()

Attachment& foxit::ofd::Attachment::operator= ( const Attachment other)

赋值操作符。

参数
[in]other另一个附件对象,其值将被赋给当前对象。
返回
当前对象自身的引用。

◆ operator==()

bool foxit::ofd::Attachment::operator== ( const Attachment other) const

相等操作符。

参数
[in]other另一个附件对象。此函数将检查当前对象是否等于这个对象。
返回
true 表示相等,false 表示不相等。

◆ SetAttachmentInfo()

void foxit::ofd::Attachment::SetAttachmentInfo ( const AttachmentInfo info)

设置附件信息。

参数
[in]info附件信息。请参考 foxit::ofd::AttachmentInfo
返回
无。

◆ SetCreationDate()

void foxit::ofd::Attachment::SetCreationDate ( const foxit::DateTime creation_date)

设置创建日期。

参数
[in]creation_date创建日期。请参考 foxit::DateTime
返回
无。

◆ SetDescription()

void foxit::ofd::Attachment::SetDescription ( const String description)

设置描述。

参数
[in]description描述。
返回
无。

◆ SetFile() [1/3]

bool foxit::ofd::Attachment::SetFile ( const String file_path,
const String name = String() 
)

通过文件设置附件内容。

参数
[in]file_path指定的文件路径。
[in]name指定的附件名称。它可以是空字符串。
返回
true 表示成功,false 表示失败。

◆ SetFile() [2/3]

bool foxit::ofd::Attachment::SetFile ( const WString file_path,
const String name = String() 
)

通过文件设置附件内容。

参数
[in]file_path指定的文件路径。
[in]name指定的附件名称。它可以是空字符串。
返回
true 表示成功,false 表示失败。

◆ SetFile() [3/3]

bool foxit::ofd::Attachment::SetFile ( foxit::common::file::ReaderCallback file_reader,
const String name = String() 
)

通过文件读取回调设置附件内容。

参数
[in]file_reader用户实现的 foxit::common::file::ReaderCallback 对象,用于读取文件内容。
[in]name指定的附件名称。它可以是空字符串。
返回
true 表示成功,false 表示失败。

◆ SetFormat()

void foxit::ofd::Attachment::SetFormat ( const String format)

设置格式。

参数
[in]format格式。
返回
无。

◆ SetModDate()

void foxit::ofd::Attachment::SetModDate ( const foxit::DateTime modification_date)

设置修改日期。

参数
[in]modification_date修改日期。请参考 foxit::DateTime
返回
无。

◆ SetModifier()

void foxit::ofd::Attachment::SetModifier ( const String modifier)

设置修改者名称。

参数
[in]modifier修改者名称。
返回
无。

◆ SetName()

void foxit::ofd::Attachment::SetName ( const String name)

设置名称。

参数
[in]name名称。
返回
无。

◆ SetUsage()

void foxit::ofd::Attachment::SetUsage ( const String usage)

设置用途。

参数
[in]usage用途。
返回
无。