My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
EntryNav Class Reference

#include <entry.h>

Public Member Functions

 EntryNav (EntryNav *parent, Entry *e)
 
 ~EntryNav ()
 
void addChild (EntryNav *)
 
bool loadEntry (FileStorage *storage)
 
bool saveEntry (Entry *e, FileStorage *storage)
 
void setEntry (Entry *e)
 
void releaseEntry ()
 
void changeSection (int section)
 
void setFileDef (FileDef *fd)
 
Entryentry () const
 
int section () const
 
SrcLangExt lang () const
 
const QCString & type () const
 
const QCString & name () const
 
TagInfotagInfo () const
 
const QList< EntryNav > * children () const
 
EntryNavparent () const
 
FileDeffileDef () const
 

Private Attributes

EntryNavm_parent
 parent node in the tree
 
QList< EntryNav > * m_subList
 entries that are children of this one
 
int m_section
 entry type (see Sections);
 
QCString m_type
 member type
 
QCString m_name
 member name
 
TagInfom_tagInfo
 tag file info
 
FileDefm_fileDef
 
SrcLangExt m_lang
 programming language in which this entry was found
 
Entrym_info
 
int64 m_offset
 
bool m_noLoad
 

Detailed Description

Wrapper for a node in the Entry tree.

Allows navigating through the Entry tree and load and storing Entry objects persistently to disk.

Definition at line 333 of file entry.h.

Constructor & Destructor Documentation

EntryNav::EntryNav ( EntryNav parent,
Entry e 
)

Definition at line 331 of file entry.cpp.

References TagInfo::anchor, TagInfo::fileName, m_tagInfo, Entry::tagInfo, and TagInfo::tagName.

: m_parent(parent), m_subList(0), m_section(e->section), m_type(e->type),
m_name(e->name), m_fileDef(0), m_lang(e->lang),
m_info(0), m_offset(-1), m_noLoad(FALSE)
{
if (e->tagInfo)
{
if (e->tagInfo)
{
//printf("tagInfo %p: tagName=%s fileName=%s anchor=%s\n",
// e->tagInfo,
// e->tagInfo->tagName.data(),
// e->tagInfo->fileName.data(),
// e->tagInfo->anchor.data());
}
}
else
{
m_tagInfo = 0;
}
}
EntryNav::~EntryNav ( )

Definition at line 357 of file entry.cpp.

References m_info, m_subList, and m_tagInfo.

{
delete m_subList;
delete m_info;
delete m_tagInfo;
}

Member Function Documentation

void EntryNav::addChild ( EntryNav e)

Definition at line 364 of file entry.cpp.

References m_subList.

Referenced by addSTLClasses(), addSTLIterator(), addSTLMember(), and Entry::createSubtreeIndex().

{
if (m_subList==0)
{
m_subList = new QList<EntryNav>;
m_subList->setAutoDelete(TRUE);
}
m_subList->append(e);
}
void EntryNav::changeSection ( int  section)
inline
const QList<EntryNav>* EntryNav::children ( ) const
inline
Entry* EntryNav::entry ( ) const
inline
FileDef* EntryNav::fileDef ( ) const
inline
SrcLangExt EntryNav::lang ( ) const
inline
bool EntryNav::loadEntry ( FileStorage storage)

Definition at line 374 of file entry.cpp.

References m_info, m_name, m_noLoad, m_offset, m_section, m_type, Entry::name, Entry::section, FileStorage::seek(), Entry::type, and unmarshalEntry().

Referenced by addClassToContext(), addEnumValuesToEnums(), addVariable(), buildExampleList(), buildFileList(), buildFunctionList(), buildGroupListFiltered(), buildInterfaceAndServiceList(), buildListOfUsingDecls(), buildNamespaceList(), buildPageList(), computeClassRelations(), computePageRelations(), computeTemplateClassRelations(), findDefineDocumentation(), findDirDocumentation(), findEnumDocumentation(), findEnums(), findInheritedTemplateInstances(), findMainPage(), findMainPageTagFiles(), findMemberDocumentation(), findObjCMethodDefinitions(), findTemplateInstanceRelation(), findUsedTemplateInstances(), findUsingDeclarations(), findUsingDeclImports(), findUsingDirectives(), isClassSection(), isVarWithConstructor(), and organizeSubGroupsFiltered().

{
if (m_noLoad)
{
return TRUE;
}
if (m_offset==-1)
{
//printf("offset not set!\n");
return FALSE;
}
//delete m_info;
//printf("EntryNav::loadEntry: new entry %p: %s\n",m_info,m_name.data());
//m_info->tagInfo = m_tagInfo;
//if (m_parent)
//{
// m_info->parent = m_parent->m_info;
//}
//m_info->parent = 0;
//printf("load entry: seek to %llx\n",m_offset);
if (!storage->seek(m_offset))
{
//printf("seek failed!\n");
return FALSE;
}
if (m_info) delete m_info;
m_info = unmarshalEntry(storage);
return TRUE;
}
const QCString& EntryNav::name ( ) const
inline
EntryNav* EntryNav::parent ( ) const
inline
void EntryNav::releaseEntry ( )
bool EntryNav::saveEntry ( Entry e,
FileStorage storage 
)

Definition at line 407 of file entry.cpp.

References m_offset, marshalEntry(), and FileStorage::pos().

Referenced by Entry::createSubtreeIndex().

{
m_offset = storage->pos();
//printf("EntryNav::saveEntry offset=%llx\n",m_offset);
marshalEntry(storage,e);
return TRUE;
}
int EntryNav::section ( ) const
inline
void EntryNav::setEntry ( Entry e)

Definition at line 425 of file entry.cpp.

References m_info, and m_noLoad.

Referenced by addSTLClasses(), addSTLIterator(), addSTLMember(), and parseInput().

{
delete m_info;
m_info = e;
//printf("EntryNav::setEntry %p\n",e);
m_noLoad=TRUE;
}
void EntryNav::setFileDef ( FileDef fd)
inline

Definition at line 344 of file entry.h.

References m_fileDef.

Referenced by Entry::createSubtreeIndex().

{ m_fileDef = fd; }
TagInfo* EntryNav::tagInfo ( ) const
inline
const QCString& EntryNav::type ( ) const
inline

Definition at line 349 of file entry.h.

References m_type.

Referenced by buildTypedefList(), and buildVarList().

{ return m_type; }

Member Data Documentation

FileDef* EntryNav::m_fileDef
private

Definition at line 367 of file entry.h.

Referenced by fileDef(), and setFileDef().

Entry* EntryNav::m_info
private

Definition at line 370 of file entry.h.

Referenced by entry(), loadEntry(), releaseEntry(), setEntry(), and ~EntryNav().

SrcLangExt EntryNav::m_lang
private

programming language in which this entry was found

Definition at line 368 of file entry.h.

Referenced by lang().

QCString EntryNav::m_name
private

member name

Definition at line 365 of file entry.h.

Referenced by loadEntry(), and name().

bool EntryNav::m_noLoad
private

Definition at line 372 of file entry.h.

Referenced by loadEntry(), releaseEntry(), and setEntry().

int64 EntryNav::m_offset
private

Definition at line 371 of file entry.h.

Referenced by loadEntry(), and saveEntry().

EntryNav* EntryNav::m_parent
private

parent node in the tree

Definition at line 359 of file entry.h.

Referenced by parent().

int EntryNav::m_section
private

entry type (see Sections);

Definition at line 363 of file entry.h.

Referenced by changeSection(), loadEntry(), and section().

QList<EntryNav>* EntryNav::m_subList
private

entries that are children of this one

Definition at line 360 of file entry.h.

Referenced by addChild(), children(), and ~EntryNav().

TagInfo* EntryNav::m_tagInfo
private

tag file info

Definition at line 366 of file entry.h.

Referenced by EntryNav(), tagInfo(), and ~EntryNav().

QCString EntryNav::m_type
private

member type

Definition at line 364 of file entry.h.

Referenced by loadEntry(), and type().


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