All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NameTree.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2023 by Apryse Software Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPSDFNameTree
6 #define PDFTRON_H_CPPSDFNameTree
7 
8 #include <C/SDF/TRN_NameTree.h>
9 #include <SDF/DictIterator.h>
10 #include <SDF/Obj.h>
11 #include <SDF/SDFDoc.h>
12 
13 
14 namespace pdftron {
15  namespace SDF {
16 
17 
22 
23 
47 class NameTree
48 {
49 public:
50 
64  static NameTree Create(class SDFDoc& doc, const std::string& name);
65 
76  static NameTree Find(class SDFDoc& doc, const std::string& name);
77 
84  NameTree (Obj name_tree);
85 
89  NameTree (const NameTree& d);
90 
94  NameTree& operator=(const NameTree& d);
95 
101  bool IsValid();
102 
122  NameTreeIterator GetIterator(const UChar* key, int key_sz);
123 
136 
145  Obj GetValue(const UChar* key, int key_sz);
146 
155  void Put (const UChar* key, int key_sz, Obj value);
156 
164  void Erase (const UChar* key, int key_sz);
165 
170  void Erase (DictIterator& pos);
171 
176  Obj GetSDFObj () const;
177 
178 
179 protected:
180  NameTree(){};
181  TRN_NameTree mp_obj;
182 };
183 
184 
185 #include <Impl/NameTree.inl>
186 
187  }; // namespace SDF
188 }; // namespace pdftron
189 
190 #endif // PDFTRON_H_CPPSDFNameTree
Obj GetValue(const UChar *key, int key_sz)
Obj GetSDFObj() const
NameTree & operator=(const NameTree &d)
void Erase(const UChar *key, int key_sz)
DictIterator NameTreeIterator
Definition: NameTree.h:21
static NameTree Find(class SDFDoc &doc, const std::string &name)
NameTreeIterator GetIterator()
TRN_UChar UChar
Definition: BasicTypes.h:12
void Put(const UChar *key, int key_sz, Obj value)
static NameTree Create(class SDFDoc &doc, const std::string &name)
TRN_NameTree mp_obj
Definition: NameTree.h:180