Foxit PDF SDK
fs_ofdattachmentdirectory.h
1 #ifndef FS_OFD_ATTACHMENTDIRECTORY_H_
2 #define FS_OFD_ATTACHMENTDIRECTORY_H_
3 
4 #include "common/fs_common.h"
5 
11 namespace foxit {
15 namespace ofd {
16 class Attachment;
17 class Attachments;
18 
20 class AttachmentDirectory FS_FINAL : public Base {
21  public:
24 
31 
40 
48  bool operator == (const AttachmentDirectory& other) const;
49 
57  bool operator != (const AttachmentDirectory& other) const;
58 
66  bool IsEmpty() const;
67 
74 
81 
91 
97  int GetAttachmentCount();
98 
107  Attachment GetAttachment(int index);
108 
117 
123  String GetName();
124 
133  AttachmentDirectory CreateSubDirectory(const String& dir_name, int index = -1);
134 
144  bool RemoveSubDirectory(int index, bool delete_attachment = false);
145 
153  bool RemoveAllDirectories(bool delete_attachment = false);
154 
163  bool AddAttachment(foxit::uint32 attach_id, int index = -1);
164 
173  bool RemoveAttachment(int index);
174 
182  bool RemoveAttachmentByID(foxit::uint32 attach_id);
183 
191  void SetName(const String& name);
192 
193  explicit AttachmentDirectory(FS_HANDLE handle);
194 };
195 
196 } // namespace ofd
197 } // namespace foxit
198 
199 #endif // FS_OFD_ATTACHMENTDIRECTORY_H_
bool IsEmpty() const
检查当前对象是否为空。
Definition: fs_ofdattachment.h:122
bool RemoveAttachmentByID(foxit::uint32 attach_id)
删除指定ID的附件。
Attachment GetAttachment(int index)
获取指定索引的附件对象。
void SetName(const String &name)
设置目录名称。
AttachmentDirectory(const AttachmentDirectory &other)
构造函数,通过另一个附件目录对象。
AttachmentDirectory & operator=(const AttachmentDirectory &other)
赋值操作符。
bool RemoveAllDirectories(bool delete_attachment=false)
删除所有子目录。
AttachmentDirectory GetParentDirectory()
获取父目录对象。
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:195
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
通用定义和类的头文件。
Definition: fs_basictypes.h:465
int GetSubDirectoryCount()
获取子目录的数量。
String GetName()
获取目录名称。
Attachment GetAttachmentByID(foxit::uint32 attach_id)
获取指定ID的附件对象。
Definition: fs_ofdattachmentdirectory.h:20
bool operator !=(const AttachmentDirectory &other) const
不相等操作符。
Foxit命名空间。
Definition: fs_taggedpdf.h:27
bool operator==(const AttachmentDirectory &other) const
相等操作符。
AttachmentDirectory GetSubDirectory(int index)
获取指定索引的子目录对象。
bool RemoveSubDirectory(int index, bool delete_attachment=false)
删除指定索引的子目录。
字节字符串类
Definition: fx_string.h:317
bool RemoveAttachment(int index)
删除指定索引的附件。
int GetAttachmentCount()
获取附件的数量。
~AttachmentDirectory()
析构函数。
bool AddAttachment(foxit::uint32 attach_id, int index=-1)
添加附件到当前目录。
AttachmentDirectory CreateSubDirectory(const String &dir_name, int index=-1)
创建子目录。