My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
DirContext::Private Class Reference
Inheritance diagram for DirContext::Private:
DefinitionContext< DirContext::Private >

Classes

struct  Cachable
 

Public Member Functions

 Private (DirDef *dd)
 
virtual ~Private ()
 
TemplateVariant get (const char *n) const
 
TemplateVariant title () const
 
TemplateVariant highlight () const
 
TemplateVariant subHighlight () const
 
TemplateVariant dirName () const
 
TemplateVariant dirs () const
 
TemplateVariant files () const
 
TemplateVariant hasDetails () const
 
TemplateVariant compoundType () const
 
TemplateVariant relPath () const
 
DotDirDepsgetDirDepsGraph () const
 
TemplateVariant hasDirGraph () const
 
TemplateVariant dirGraph () const
 
- Public Member Functions inherited from DefinitionContext< DirContext::Private >
 DefinitionContext (Definition *d)
 
void addBaseProperties (PropertyMapper< DirContext::Private > &inst)
 
TemplateVariant fileName () const
 
TemplateVariant anchor () const
 
TemplateVariant sourceFileName () const
 
TemplateVariant isLinkable () const
 
TemplateVariant isLinkableInProject () const
 
TemplateVariant name () const
 
TemplateVariant bareName () const
 
QCString relPathAsString () const
 
TemplateVariant details () const
 
TemplateVariant brief () const
 
TemplateVariant inbodyDocs () const
 
TemplateVariant dynSectionId () const
 
TemplateVariant language () const
 
TemplateVariant compoundKind () const
 
TemplateVariant sourceDef () const
 
void fillPath (Definition *def, TemplateList *list) const
 
TemplateVariant navigationPath () const
 
TemplateVariant isReference () const
 
TemplateVariant externalReference () const
 

Private Member Functions

CachablegetCache () const
 

Private Attributes

DirDefm_dirDef
 

Static Private Attributes

static PropertyMapper
< DirContext::Private
s_inst
 

Detailed Description

Definition at line 3383 of file context.cpp.

Constructor & Destructor Documentation

DirContext::Private::Private ( DirDef dd)
inline

Definition at line 3386 of file context.cpp.

References DefinitionContext< DirContext::Private >::addBaseProperties(), compoundType(), Definition::cookie(), dirGraph(), dirName(), dirs(), files(), hasDetails(), hasDirGraph(), highlight(), Config::init(), s_inst, Definition::setCookie(), subHighlight(), and title().

{
static bool init=FALSE;
if (!init)
{
s_inst.addProperty("title", &Private::title);
s_inst.addProperty("highlight", &Private::highlight);
s_inst.addProperty("subhighlight", &Private::subHighlight);
s_inst.addProperty("dirName", &Private::dirName);
s_inst.addProperty("dirs", &Private::dirs);
s_inst.addProperty("files", &Private::files);
s_inst.addProperty("hasDetails", &Private::hasDetails);
s_inst.addProperty("hasDirGraph", &Private::hasDirGraph);
s_inst.addProperty("dirGraph", &Private::dirGraph);
s_inst.addProperty("compoundType", &Private::compoundType);
init=TRUE;
}
if (!dd->cookie()) { dd->setCookie(new DirContext::Private::Cachable(dd)); }
}
virtual DirContext::Private::~Private ( )
inlinevirtual

Definition at line 3406 of file context.cpp.

{}

Member Function Documentation

TemplateVariant DirContext::Private::compoundType ( ) const
inline

Definition at line 3468 of file context.cpp.

References theTranslator, and Translator::trDir().

Referenced by Private().

{
return theTranslator->trDir(FALSE,TRUE);
}
TemplateVariant DirContext::Private::dirGraph ( ) const
inline
TemplateVariant DirContext::Private::dirName ( ) const
inline

Definition at line 3423 of file context.cpp.

References m_dirDef, and DirDef::shortName().

Referenced by Private().

TemplateVariant DirContext::Private::dirs ( ) const
inline

Definition at line 3427 of file context.cpp.

References TemplateList::alloc(), TemplateList::append(), DirContext::DirContext(), DirContext::Private::Cachable::dirs, SharedPtr< T >::get(), getCache(), m_dirDef, SharedPtr< T >::reset(), and DirDef::subDirs().

Referenced by Private().

{
Cachable &cache = getCache();
if (!cache.dirs)
{
cache.dirs.reset(TemplateList::alloc());
const DirList &subDirs = m_dirDef->subDirs();
QListIterator<DirDef> it(subDirs);
DirDef *dd;
for (it.toFirst();(dd=it.current());++it)
{
DirContext *dc = new DirContext(dd);
cache.dirs->append(dc);
}
}
return cache.dirs.get();
}
TemplateVariant DirContext::Private::files ( ) const
inline

Definition at line 3444 of file context.cpp.

References FileContext::alloc(), TemplateList::alloc(), TemplateList::append(), DirContext::Private::Cachable::files, SharedPtr< T >::get(), getCache(), DirDef::getFiles(), m_dirDef, and SharedPtr< T >::reset().

Referenced by Private().

{
Cachable &cache = getCache();
if (!cache.files)
{
cache.files.reset(TemplateList::alloc());
if (files)
{
QListIterator<FileDef> it(*files);
FileDef *fd;
for (it.toFirst();(fd=it.current());++it)
{
cache.files->append(fc);
}
}
}
return cache.files.get();
}
TemplateVariant DirContext::Private::get ( const char *  n) const
inline

Definition at line 3407 of file context.cpp.

References s_inst.

Referenced by DirContext::get().

{
return s_inst.get(this,n);
}
Cachable& DirContext::Private::getCache ( ) const
inlineprivate

Definition at line 3551 of file context.cpp.

References Definition::cookie(), and m_dirDef.

Referenced by dirs(), files(), and getDirDepsGraph().

{
Cachable *c = static_cast<Cachable*>(m_dirDef->cookie());
assert(c!=0);
return *c;
}
DotDirDeps* DirContext::Private::getDirDepsGraph ( ) const
inline

Definition at line 3476 of file context.cpp.

References DirContext::Private::Cachable::dirDepsGraph, ScopedPtr< T >::get(), getCache(), m_dirDef, and ScopedPtr< T >::reset().

Referenced by dirGraph(), and hasDirGraph().

{
Cachable &cache = getCache();
if (!cache.dirDepsGraph)
{
cache.dirDepsGraph.reset(new DotDirDeps(m_dirDef));
}
return cache.dirDepsGraph.get();
}
TemplateVariant DirContext::Private::hasDetails ( ) const
inline

Definition at line 3464 of file context.cpp.

References DirDef::hasDetailedDescription(), and m_dirDef.

Referenced by Private().

TemplateVariant DirContext::Private::hasDirGraph ( ) const
inline

Definition at line 3485 of file context.cpp.

References Config_getBool, dirGraph(), getDirDepsGraph(), and DotDirDeps::isTrivial().

Referenced by Private().

{
bool result=FALSE;
static bool haveDot = Config_getBool(HAVE_DOT);
static bool dirGraph = Config_getBool(DIRECTORY_GRAPH);
if (haveDot && dirGraph)
{
result = !graph->isTrivial();
}
return result;
}
TemplateVariant DirContext::Private::highlight ( ) const
inline

Definition at line 3415 of file context.cpp.

Referenced by Private().

{
return TemplateVariant("files");
}
TemplateVariant DirContext::Private::relPath ( ) const
inlinevirtual

Reimplemented from DefinitionContext< DirContext::Private >.

Definition at line 3472 of file context.cpp.

{
return "";
}
TemplateVariant DirContext::Private::subHighlight ( ) const
inline

Definition at line 3419 of file context.cpp.

Referenced by Private().

{
return TemplateVariant("");
}
TemplateVariant DirContext::Private::title ( ) const
inline

Definition at line 3411 of file context.cpp.

References m_dirDef, and DirDef::shortTitle().

Referenced by Private().

Member Data Documentation

DirDef* DirContext::Private::m_dirDef
private

Definition at line 3543 of file context.cpp.

Referenced by dirGraph(), dirName(), dirs(), files(), getCache(), getDirDepsGraph(), hasDetails(), and title().

PropertyMapper< DirContext::Private > DirContext::Private::s_inst
staticprivate

Definition at line 3557 of file context.cpp.

Referenced by get(), and Private().


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