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

Public 成员函数

 AttachmentDirectory (const AttachmentDirectory &other)
 构造函数,通过另一个附件目录对象。 更多...
 
 ~AttachmentDirectory ()
 析构函数。
 
bool AddAttachment (foxit::uint32 attach_id, int index=-1)
 添加附件到当前目录。 更多...
 
AttachmentDirectory CreateSubDirectory (const String &dir_name, int index=-1)
 创建子目录。 更多...
 
Attachment GetAttachment (int index)
 获取指定索引的附件对象。 更多...
 
Attachment GetAttachmentByID (foxit::uint32 attach_id)
 获取指定ID的附件对象。 更多...
 
int GetAttachmentCount ()
 获取附件的数量。 更多...
 
String GetName ()
 获取目录名称。 更多...
 
AttachmentDirectory GetParentDirectory ()
 获取父目录对象。 更多...
 
AttachmentDirectory GetSubDirectory (int index)
 获取指定索引的子目录对象。 更多...
 
int GetSubDirectoryCount ()
 获取子目录的数量。 更多...
 
bool IsEmpty () const
 检查当前对象是否为空。 更多...
 
bool operator != (const AttachmentDirectory &other) const
 不相等操作符。 更多...
 
AttachmentDirectoryoperator= (const AttachmentDirectory &other)
 赋值操作符。 更多...
 
bool operator== (const AttachmentDirectory &other) const
 相等操作符。 更多...
 
bool RemoveAllDirectories (bool delete_attachment=false)
 删除所有子目录。 更多...
 
bool RemoveAttachment (int index)
 删除指定索引的附件。 更多...
 
bool RemoveAttachmentByID (foxit::uint32 attach_id)
 删除指定ID的附件。 更多...
 
bool RemoveSubDirectory (int index, bool delete_attachment=false)
 删除指定索引的子目录。 更多...
 
void SetName (const String &name)
 设置目录名称。 更多...
 
- Public 成员函数 继承自 foxit::Base
FS_HANDLE Handle () const
 获取当前对象的句柄。 更多...
 

详细描述

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

构造及析构函数说明

◆ AttachmentDirectory()

foxit::ofd::AttachmentDirectory::AttachmentDirectory ( const AttachmentDirectory other)

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

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

成员函数说明

◆ AddAttachment()

bool foxit::ofd::AttachmentDirectory::AddAttachment ( foxit::uint32  attach_id,
int  index = -1 
)

添加附件到当前目录。

参数
[in]attach_id指定的附件ID。
[in]index指定插入附件的索引位置。默认值为 -1,表示将附件添加到末尾。
返回
true 表示成功,false 表示失败。

◆ CreateSubDirectory()

AttachmentDirectory foxit::ofd::AttachmentDirectory::CreateSubDirectory ( const String dir_name,
int  index = -1 
)

创建子目录。

参数
[in]dir_name指定的子目录名称。
[in]index指定插入子目录的索引位置。默认值为 -1,表示将子目录添加到末尾。
返回
新创建的子目录对象。

◆ GetAttachment()

Attachment foxit::ofd::AttachmentDirectory::GetAttachment ( int  index)

获取指定索引的附件对象。

参数
[in]index指定的索引。有效范围:从0到(count - 1)。 count由函数 foxit::ofd::AttachmentDirectory::GetAttachmentCount 返回。
返回
指定索引的附件对象。

◆ GetAttachmentByID()

Attachment foxit::ofd::AttachmentDirectory::GetAttachmentByID ( foxit::uint32  attach_id)

获取指定ID的附件对象。

参数
[in]attach_id指定的附件ID。
返回
指定ID的附件对象。

◆ GetAttachmentCount()

int foxit::ofd::AttachmentDirectory::GetAttachmentCount ( )

获取附件的数量。

返回
附件的数量。

◆ GetName()

String foxit::ofd::AttachmentDirectory::GetName ( )

获取目录名称。

返回
目录名称。

◆ GetParentDirectory()

AttachmentDirectory foxit::ofd::AttachmentDirectory::GetParentDirectory ( )

获取父目录对象。

返回
父目录对象。

◆ GetSubDirectory()

AttachmentDirectory foxit::ofd::AttachmentDirectory::GetSubDirectory ( int  index)

获取指定索引的子目录对象。

参数
[in]index指定的索引。有效范围:从0到(count - 1)。 count由函数 foxit::ofd::AttachmentDirectory::GetSubDirectoryCount 返回。
返回
指定索引的子目录对象。

◆ GetSubDirectoryCount()

int foxit::ofd::AttachmentDirectory::GetSubDirectoryCount ( )

获取子目录的数量。

返回
子目录的数量。

◆ IsEmpty()

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

检查当前对象是否为空。

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

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

◆ operator !=()

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

不相等操作符。

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

◆ operator=()

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

赋值操作符。

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

◆ operator==()

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

相等操作符。

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

◆ RemoveAllDirectories()

bool foxit::ofd::AttachmentDirectory::RemoveAllDirectories ( bool  delete_attachment = false)

删除所有子目录。

参数
[in]delete_attachment指定是否删除子目录中的附件对象。默认值为 false,表示不删除附件对象。
返回
true 表示成功,false 表示失败。

◆ RemoveAttachment()

bool foxit::ofd::AttachmentDirectory::RemoveAttachment ( int  index)

删除指定索引的附件。

参数
[in]index指定的索引。有效范围:从0到(count - 1)。 count由函数 AttachmentDirectory::GetAttachmentCount 返回。
返回
true 表示成功,false 表示失败。

◆ RemoveAttachmentByID()

bool foxit::ofd::AttachmentDirectory::RemoveAttachmentByID ( foxit::uint32  attach_id)

删除指定ID的附件。

参数
[in]attach_id指定的附件ID。
返回
true 表示成功,false 表示失败。

◆ RemoveSubDirectory()

bool foxit::ofd::AttachmentDirectory::RemoveSubDirectory ( int  index,
bool  delete_attachment = false 
)

删除指定索引的子目录。

参数
[in]index指定的索引。有效范围:从0到(count - 1)。 count由函数 foxit::ofd::AttachmentDirectory::GetSubDirectoryCount 返回。
[in]delete_attachment指定是否删除子目录中的附件对象。默认值为 false,表示不删除附件对象。
返回
true 表示成功,false 表示失败。

◆ SetName()

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

设置目录名称。

参数
[in]name指定的目录名称。
返回
无。