All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::PDF::Struct::STree Class Reference

#include <STree.h>

Public Member Functions

 STree (SDF::Obj struct_dict)
 
 STree (const STree &)
 
STreeoperator= (const STree &)
 
void Insert (class SElement &kid, int insert_before)
 
bool IsValid () const
 
int GetNumKids ()
 
class SElement GetKid (int index)
 
class SElement GetElement (const char *id_buf, int id_buf_sz)
 
RoleMap GetRoleMap () const
 
class ClassMap GetClassMap () const
 
SDF::Obj GetSDFObj () const
 
 STree ()
 

Static Public Member Functions

static STree Create (PDF::PDFDoc &doc)
 

Detailed Description

STree is the root of the structure tree, which is a central repository for information related to a PDF document's logical structure. There is at most one structure tree in each document.

Definition at line 20 of file STree.h.

Constructor & Destructor Documentation

pdftron::PDF::Struct::STree::STree ( SDF::Obj  struct_dict)

Initialize a STree using an existing low-level Cos/SDF object.

Parameters
struct_dict- a low-level (SDF/Cos) dictionary representing the .
Note
This constructor does not copy any data, but is instead the logical equivalent of a type cast.
pdftron::PDF::Struct::STree::STree ( const STree )
pdftron::PDF::Struct::STree::STree ( )

Member Function Documentation

static STree pdftron::PDF::Struct::STree::Create ( PDF::PDFDoc doc)
static

Create a structure tree if it is missing, else return the existing structure tree

Parameters
docthe document in which to create or get the structure tree from
Returns
structure tree of the document
class ClassMap pdftron::PDF::Struct::STree::GetClassMap ( ) const
Returns
the ClassMap object from the structure tree root.
class SElement pdftron::PDF::Struct::STree::GetElement ( const char *  id_buf,
int  id_buf_sz 
)
Returns
the element associated with the given ID.
Parameters
id_bufA pointer to a buffer containing the ID to search for.
id_buf_szThe number of characters in id_buf.
class SElement pdftron::PDF::Struct::STree::GetKid ( int  index)
Returns
The kid at an array index in the structure tree root.
Parameters
indexThe index of the kid to obtain.
int pdftron::PDF::Struct::STree::GetNumKids ( )
Returns
The number of kids of the structure tree root.
RoleMap pdftron::PDF::Struct::STree::GetRoleMap ( ) const
Returns
the RoleMap object from the structure tree root.
SDF::Obj pdftron::PDF::Struct::STree::GetSDFObj ( ) const
Returns
Pointer to the underlying SDF/Cos object.
void pdftron::PDF::Struct::STree::Insert ( class SElement kid,
int  insert_before 
)

Inserts the specified kid element after the given position as a kid of the specified structure tree root.

Parameters
kidThe kid element to insert.
insert_beforeThe position after which the kid is inserted. If element currently has no kids, insert_before is ignored.
bool pdftron::PDF::Struct::STree::IsValid ( ) const
Returns
true if this is a valid STree object, false otherwise.
STree& pdftron::PDF::Struct::STree::operator= ( const STree )

The documentation for this class was generated from the following file: