Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

PdfObject * PoDoFo::PdfNamesTree::GetRootNode ( const PdfName name,
bool  bCreate = false 
) const [private]

Get a PdfNameTrees root node for a certain name.

Parameters:
namethat identifies a specific name tree. Valid names are:

  • Dests
  • AP
  • JavaScript
  • Pages
  • Templates
  • IDS
  • URLS
  • EmbeddedFiles
  • AlternatePresentations
  • Renditions
bCreateif true the root node is created if it does not exists.
Returns:
the root node of the tree or NULL if it does not exists

Definition at line 411 of file PdfNamesTree.cpp.

References PoDoFo::PdfDictionary::AddKey(), PoDoFo::PdfVecObjects::CreateObject(), PoDoFo::PdfVariant::GetDictionary(), PoDoFo::PdfObject::GetIndirectKey(), PoDoFo::PdfElement::GetNonConstObject(), PoDoFo::PdfElement::GetObject(), PoDoFo::PdfObject::GetOwner(), and PoDoFo::PdfObject::Reference().

Referenced by AddValue(), GetDestsNode(), GetJavaScriptNode(), GetValue(), and ToDictionary().

{
    PdfObject* pObj = this->GetObject()->GetIndirectKey( name );
    if( !pObj && bCreate ) 
    {
        pObj = this->GetObject()->GetOwner()->CreateObject();
        this->GetNonConstObject()->GetDictionary().AddKey( name, pObj->Reference() );
    }

    return pObj;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index