Foxit PDF SDK
fs_pdfnametree.h
浏览该文件的文档.
1 
15 #ifndef FS_PDFNAMETREE_H_
16 #define FS_PDFNAMETREE_H_
17 
18 #include "common/fs_common.h"
20 
26 namespace foxit {
30 namespace pdf {
34 namespace objects {
72 class PDFNameTree FS_FINAL : public Base {
73  public:
79  typedef enum _Type {
81  e_Dests = 1,
87  e_Pages = 4,
90  } Type;
91 
104  PDFNameTree(const PDFDoc& document, Type type);
106  PDFNameTree();
108  ~PDFNameTree();
109 
115  PDFNameTree(const PDFNameTree& other);
123  PDFNameTree& operator = (const PDFNameTree& other);
124 
132  bool operator == (const PDFNameTree& other) const;
140  bool operator != (const PDFNameTree& other) const;
141 
149  bool IsEmpty() const;
150 
157  Type GetType();
158 
167  bool HasName(const WString& name);
168 
174  int GetCount();
175 
184  WString GetName(int index);
185 
195  objects::PDFObject* GetObj(const WString& name);
196 
210  bool SetObj(const WString& name, objects::PDFObject* pdf_object);
211 
222  bool Rename(const WString& old_name, const WString& new_name);
223 
240  bool Add(const WString& name, objects::PDFObject* pdf_object);
241 
251  bool RemoveObj(const WString& name);
252 
258  bool RemoveAllObjs();
259  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
260  explicit PDFNameTree(FS_HANDLE handle);
261 };
262 
263 } // namespace objects
264 } // namespace pdf
265 } // namespace foxit
266 #endif // FS_PDFNAMETREE_H_
267 
bool RemoveObj(const WString &name)
从当前名称树中删除一个键名及其值(作为PDF对象)。
"Dests"名称树。
Definition: fs_pdfnametree.h:81
bool operator==(const PDFNameTree &other) const
相等操作符。
bool operator !=(const PDFNameTree &other) const
不等操作符。
PDFNameTree & operator=(const PDFNameTree &other)
赋值操作符。
"EmbeddedFiles"名称树。
Definition: fs_pdfnametree.h:85
"JavaScript"名称树。
Definition: fs_pdfnametree.h:83
宽字符串类
Definition: fx_string.h:1457
bool SetObj(const WString &name, objects::PDFObject *pdf_object)
设置指定键名的值(作为PDF对象)。
Definition: fs_pdfdoc.h:771
bool Add(const WString &name, objects::PDFObject *pdf_object)
添加一个新的键名及其PDF对象作为值。
Type GetType()
获取当前名称树的类型。
"Templates"名称树。
Definition: fs_pdfnametree.h:89
WString GetName(int index)
通过索引获取名称树中的键名。
Type
名称树类型的枚举。
Definition: fs_pdfnametree.h:79
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:214
通用定义和类的头文件。
bool IsEmpty() const
检查当前对象是否为空。
Definition: fs_pdfnametree.h:72
bool Rename(const WString &old_name, const WString &new_name)
将现有键名重命名为新键名。
PDF对象相关定义和类的头文件。
Definition: fs_basictypes.h:449
bool RemoveAllObjs()
从当前名称树中删除所有键名及其值(作为PDF对象)。
bool HasName(const WString &name)
检查指定的键名是否存在于当前名称树中。
Foxit命名空间。
Definition: fs_taggedpdf.h:27
"Pages"名称树。
Definition: fs_pdfnametree.h:87
Definition: fs_pdfobject.h:55
int GetCount()
获取当前名称树中元素的数量。
objects::PDFObject * GetObj(const WString &name)
获取指定键名的值(作为PDF对象)。