Foxit PDF SDK
fs_pdfnametree.h
Go to the documentation of this file.
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 {
67 class PDFNameTree FS_FINAL : public Base {
68  public:
74  typedef enum _Type {
76  e_Dests = 1,
81  } Type;
82 
95  PDFNameTree(const PDFDoc& document, Type type);
97  PDFNameTree();
99  ~PDFNameTree();
100 
106  PDFNameTree(const PDFNameTree& other);
114  PDFNameTree& operator = (const PDFNameTree& other);
115 
123  bool operator == (const PDFNameTree& other) const;
131  bool operator != (const PDFNameTree& other) const;
132 
140  bool IsEmpty() const;
141 
148  Type GetType();
149 
158  bool HasName(const WString& name);
159 
165  int GetCount();
166 
175  WString GetName(int index);
176 
185  objects::PDFObject* GetObj(const WString& name);
199  bool SetObj(const WString& name, objects::PDFObject* pdf_object);
210  bool Rename(const WString& old_name, const WString& new_name);
227  bool Add(const WString& name, objects::PDFObject* pdf_object);
228 
238  bool RemoveObj(const WString& name);
239 
245  bool RemoveAllObjs();
246  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
247  explicit PDFNameTree(FS_HANDLE handle);
248 
249 };
250 
251 } // namespace objects
252 } // namespace pdf
253 } // namespace foxit
254 #endif // FS_PDFNAMETREE_H_
255 
bool SetObj(const WString &name, objects::PDFObject *pdf_object)
Set the value (as PDF object) of a specified key name.
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:216
int GetCount()
Get the count of elements in current name tree.
WString GetName(int index)
Get a key name in the name tree, by index.
bool RemoveAllObjs()
Remove all key names from current name tree, along with theirs value (as PDF object).
Header file for common definitions and classes.
"EmbeddedFiles" name tree.
Definition: fs_pdfnametree.h:80
Type
Enumeration for name tree type.
Definition: fs_pdfnametree.h:74
Definition: fs_pdfobject.h:55
Type GetType()
Get the type of current name tree.
bool Rename(const WString &old_name, const WString &new_name)
Rename an existing key name to a new key name.
bool operator==(const PDFNameTree &other) const
Equal operator.
bool IsEmpty() const
Check whether current object is empty or not.
objects::PDFObject * GetObj(const WString &name)
Get the value (as PDF object) of a specified key name.
Header file for PDF object related definitions and classes.
Foxit namespace.
Definition: fs_compare.h:27
PDFNameTree & operator=(const PDFNameTree &other)
Assign operator.
bool HasName(const WString &name)
Check if the specified key name exists in current name tree.
bool RemoveObj(const WString &name)
Remove a key name from current name tree, along with its value (as PDF object).
Definition: fs_pdfdoc.h:389
bool operator !=(const PDFNameTree &other) const
Not equal operator.
"JavaScript" name tree.
Definition: fs_pdfnametree.h:78
WIDE STRING CLASS.
Definition: fx_string.h:1452
bool Add(const WString &name, objects::PDFObject *pdf_object)
Add a new key name with a PDF object as its value.
"Dests" name tree.
Definition: fs_pdfnametree.h:76
Definition: fs_basictypes.h:399
Definition: fs_pdfnametree.h:67