Loading...
Searching...
No Matches
NameTree.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 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
21 typedef DictIterator NameTreeIterator;
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
135 NameTreeIterator GetIterator();
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
DictIterator.h
Obj.h
SDFDoc.h
pdftron::SDF::DictIterator
Definition DictIterator.h:33
pdftron::SDF::NameTree::NameTree
NameTree()
Definition NameTree.h:180
pdftron::SDF::NameTree::NameTree
NameTree(const NameTree &d)
pdftron::SDF::NameTree::mp_obj
TRN_NameTree mp_obj
Definition NameTree.h:181
pdftron::SDF::NameTree::GetIterator
NameTreeIterator GetIterator(const UChar *key, int key_sz)
pdftron::SDF::NameTree::Create
static NameTree Create(class SDFDoc &doc, const std::string &name)
pdftron::SDF::NameTree::NameTree
NameTree(Obj name_tree)
pdftron::SDF::NameTree::IsValid
bool IsValid()
pdftron::SDF::NameTree::Put
void Put(const UChar *key, int key_sz, Obj value)
pdftron::SDF::NameTree::Erase
void Erase(const UChar *key, int key_sz)
pdftron::SDF::NameTree::GetValue
Obj GetValue(const UChar *key, int key_sz)
pdftron::SDF::NameTree::Find
static NameTree Find(class SDFDoc &doc, const std::string &name)
pdftron::SDF::NameTree::Erase
void Erase(DictIterator &pos)
pdftron::SDF::NameTree::GetIterator
NameTreeIterator GetIterator()
pdftron::SDF::NameTree::operator=
NameTree & operator=(const NameTree &d)
pdftron::SDF::NameTree::GetSDFObj
Obj GetSDFObj() const
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::SDF::SDFDoc
Definition SDFDoc.h:68
pdftron::SDF
Definition DictIterator.h:12
pdftron::SDF::NameTreeIterator
DictIterator NameTreeIterator
Definition NameTree.h:21
pdftron
Definition BasicTypes.h:10
pdftron::UChar
TRN_UChar UChar
Definition BasicTypes.h:12