Loading...
Searching...
No Matches
pdftron::PDF::Struct::STree Class Reference

`#include <STree.h>`

## Public Member Functions
| STree (SDF::Obj struct_dict)
| STree (const STree &)
STree & | operator= (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 21 of file STree.h.

## Constructor & Destructor Documentation

## ◆ STree() [1/3]

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.

## ◆ STree() [2/3]

pdftron::PDF::Struct::STree::STree | ( | const STree & |  | ) |

## ◆ STree() [3/3]

pdftron::PDF::Struct::STree::STree | ( |  | ) |

## Member Function Documentation

## ◆ Create()

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

  doc | the document in which to create or get the structure tree from

Returns
  structure tree of the document

## ◆ GetClassMap()

class ClassMap pdftron::PDF::Struct::STree::GetClassMap | ( |  | ) | const

Returns
  the ClassMap object from the structure tree root.

## ◆ GetElement()

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_buf | A pointer to a buffer containing the ID to search for.
  id_buf_sz | The number of characters in id_buf.

## ◆ GetKid()

class SElement pdftron::PDF::Struct::STree::GetKid | ( | int | index | ) |

Returns
  The kid at an array index in the structure tree root.

Parameters

  index | The index of the kid to obtain.

## ◆ GetNumKids()

int pdftron::PDF::Struct::STree::GetNumKids | ( |  | ) |

Returns
  The number of kids of the structure tree root.

## ◆ GetRoleMap()

RoleMap pdftron::PDF::Struct::STree::GetRoleMap | ( |  | ) | const

Returns
  the RoleMap object from the structure tree root.

## ◆ GetSDFObj()

SDF::Obj pdftron::PDF::Struct::STree::GetSDFObj | ( |  | ) | const

Returns
  Pointer to the underlying SDF/Cos object.

## ◆ Insert()

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

  kid | The kid element to insert.
  insert_before | The position after which the kid is inserted. If element currently has no kids, insert_before is ignored.

## ◆ IsValid()

bool pdftron::PDF::Struct::STree::IsValid | ( |  | ) | const

Returns
  true if this is a valid STree object, false otherwise.

## ◆ operator=()

STree & pdftron::PDF::Struct::STree::operator= | ( | const STree & |  | ) |

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

- PDF/Struct/STree.h