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"
19 #include "pdf/objects/fs_pdfobject.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,
83 e_JavaScript = 2,
85 e_EmbeddedFiles = 3,
87 e_Pages = 4,
89 e_Templates = 5
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 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
260 explicit PDFNameTree(FS_HANDLE handle);
261 };
262
263 } // namespace objects
264 } // namespace pdf
265 } // namespace foxit
266 #endif // FS_PDFNAMETREE_H_
267
foxit::pdf::objects::PDFNameTree::SetObj
bool SetObj(const WString &name, objects::PDFObject *pdf_object)
Set the value (as PDF object) of a specified key name.
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
foxit::pdf::objects::PDFNameTree::GetCount
int GetCount()
Get the count of elements in current name tree.
foxit::pdf::objects::PDFNameTree::GetName
WString GetName(int index)
Get a key name in the name tree, by index.
foxit::pdf::objects::PDFNameTree::RemoveAllObjs
bool RemoveAllObjs()
Remove all key names from current name tree, along with theirs value (as PDF object).
fs_common.h
Header file for common definitions and classes.
foxit::pdf::objects::PDFNameTree::e_EmbeddedFiles
"EmbeddedFiles" name tree.
Definition: fs_pdfnametree.h:85
foxit::pdf::objects::PDFNameTree::~PDFNameTree
~PDFNameTree()
Destructor.
foxit::pdf::objects::PDFNameTree::Type
Type
Enumeration for name tree type.
Definition: fs_pdfnametree.h:79
foxit::pdf::objects::PDFObject
Definition: fs_pdfobject.h:55
foxit::pdf::objects::PDFNameTree::GetType
Type GetType()
Get the type of current name tree.
foxit::pdf::objects::PDFNameTree::Rename
bool Rename(const WString &old_name, const WString &new_name)
Rename an existing key name to a new key name.
foxit::pdf::objects::PDFNameTree::operator==
bool operator==(const PDFNameTree &other) const
Equal operator.
foxit::pdf::objects::PDFNameTree::PDFNameTree
PDFNameTree()
Constructor.
foxit::pdf::objects::PDFNameTree::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::pdf::objects::PDFNameTree::e_Pages
"Pages" name tree.
Definition: fs_pdfnametree.h:87
foxit::pdf::objects::PDFNameTree::GetObj
objects::PDFObject * GetObj(const WString &name)
Get the value (as PDF object) of a specified key name.
fs_pdfobject.h
Header file for PDF object related definitions and classes.
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
foxit::pdf::objects::PDFNameTree::operator=
PDFNameTree & operator=(const PDFNameTree &other)
Assign operator.
foxit::pdf::objects::PDFNameTree::HasName
bool HasName(const WString &name)
Check if the specified key name exists in current name tree.
foxit::pdf::objects::PDFNameTree::e_Templates
"Templates" name tree.
Definition: fs_pdfnametree.h:89
foxit::pdf::objects::PDFNameTree::RemoveObj
bool RemoveObj(const WString &name)
Remove a key name from current name tree, along with its value (as PDF object).
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:776
foxit::pdf::objects::PDFNameTree::operator!=
bool operator!=(const PDFNameTree &other) const
Not equal operator.
foxit::pdf::objects::PDFNameTree::e_JavaScript
"JavaScript" name tree.
Definition: fs_pdfnametree.h:83
CFX_WideString
WIDE STRING CLASS.
Definition: fx_string.h:1461
foxit::pdf::objects::PDFNameTree::Add
bool Add(const WString &name, objects::PDFObject *pdf_object)
Add a new key name with a PDF object as its value.
foxit::pdf::objects::PDFNameTree::e_Dests
"Dests" name tree.
Definition: fs_pdfnametree.h:81
foxit::Base
Definition: fs_basictypes.h:451
foxit::pdf::objects::PDFNameTree
Definition: fs_pdfnametree.h:72