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
FileContext::Private Class Reference
Inheritance diagram for FileContext::Private:
DefinitionContext< FileContext::Private >

Classes

struct  Cachable
 

Public Member Functions

 Private (FileDef *fd)
 
virtual ~Private ()
 
TemplateVariant get (const char *n) const
 
TemplateVariant title () const
 
TemplateVariant highlight () const
 
TemplateVariant subHighlight () const
 
TemplateVariant versionInfo () const
 
TemplateVariant includeList () const
 
DotInclDepGraphgetIncludeGraph () const
 
TemplateVariant hasIncludeGraph () const
 
TemplateVariant includeGraph () const
 
DotInclDepGraphgetIncludedByGraph () const
 
TemplateVariant hasIncludedByGraph () const
 
TemplateVariant includedByGraph () const
 
TemplateVariant hasDetails () const
 
TemplateVariant hasSourceFile () const
 
TemplateVariant sources () const
 
TemplateVariant version () const
 
TemplateVariant classes () const
 
TemplateVariant namespaces () const
 
TemplateVariant constantgroups () const
 
TemplateVariant getMemberList (SharedPtr< MemberListInfoContext > &list, MemberListType type, const char *title, bool detailed=FALSE) const
 
TemplateVariant macros () const
 
TemplateVariant typedefs () const
 
TemplateVariant enums () const
 
TemplateVariant functions () const
 
TemplateVariant variables () const
 
TemplateVariant memberGroups () const
 
TemplateVariant detailedMacros () const
 
TemplateVariant detailedTypedefs () const
 
TemplateVariant detailedEnums () const
 
TemplateVariant detailedFunctions () const
 
TemplateVariant detailedVariables () const
 
TemplateVariant inlineClasses () const
 
TemplateVariant compoundType () const
 
- Public Member Functions inherited from DefinitionContext< FileContext::Private >
 DefinitionContext (Definition *d)
 
void addBaseProperties (PropertyMapper< FileContext::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
 
virtual TemplateVariant relPath () 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

FileDefm_fileDef
 

Static Private Attributes

static PropertyMapper
< FileContext::Private
s_inst
 

Detailed Description

Definition at line 2935 of file context.cpp.

Constructor & Destructor Documentation

FileContext::Private::Private ( FileDef fd)
inline

Definition at line 2938 of file context.cpp.

References DefinitionContext< FileContext::Private >::addBaseProperties(), classes(), compoundType(), constantgroups(), Definition::cookie(), detailedEnums(), detailedFunctions(), detailedMacros(), detailedTypedefs(), detailedVariables(), enums(), functions(), hasDetails(), hasIncludedByGraph(), hasIncludeGraph(), hasSourceFile(), highlight(), includedByGraph(), includeGraph(), includeList(), Config::init(), inlineClasses(), macros(), memberGroups(), namespaces(), s_inst, Definition::setCookie(), sources(), subHighlight(), title(), typedefs(), variables(), version(), and versionInfo().

{
if (fd==0) abort();
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("versionInfo", &Private::versionInfo);
s_inst.addProperty("includeList", &Private::includeList);
s_inst.addProperty("hasIncludeGraph", &Private::hasIncludeGraph);
s_inst.addProperty("hasIncludedByGraph", &Private::hasIncludedByGraph);
s_inst.addProperty("includeGraph", &Private::includeGraph);
s_inst.addProperty("includedByGraph", &Private::includedByGraph);
s_inst.addProperty("hasDetails", &Private::hasDetails);
s_inst.addProperty("hasSourceFile", &Private::hasSourceFile);
s_inst.addProperty("sources", &Private::sources);
s_inst.addProperty("version", &Private::version);
s_inst.addProperty("classes", &Private::classes);
s_inst.addProperty("namespaces", &Private::namespaces);
s_inst.addProperty("constantgroups", &Private::constantgroups);
s_inst.addProperty("macros", &Private::macros);
s_inst.addProperty("typedefs", &Private::typedefs);
s_inst.addProperty("enums", &Private::enums);
s_inst.addProperty("functions", &Private::functions);
s_inst.addProperty("variables", &Private::variables);
s_inst.addProperty("memberGroups", &Private::memberGroups);
s_inst.addProperty("detailedMacros", &Private::detailedMacros);
s_inst.addProperty("detailedTypedefs", &Private::detailedTypedefs);
s_inst.addProperty("detailedEnums", &Private::detailedEnums);
s_inst.addProperty("detailedFunctions", &Private::detailedFunctions);
s_inst.addProperty("detailedVariables", &Private::detailedVariables);
s_inst.addProperty("inlineClasses", &Private::inlineClasses);
s_inst.addProperty("compoundType", &Private::compoundType);
init=TRUE;
}
if (!fd->cookie()) { fd->setCookie(new FileContext::Private::Cachable(fd)); }
}
virtual FileContext::Private::~Private ( )
inlinevirtual

Definition at line 2978 of file context.cpp.

{}

Member Function Documentation

TemplateVariant FileContext::Private::classes ( ) const
inline

Definition at line 3148 of file context.cpp.

References ClassContext::alloc(), TemplateList::alloc(), TemplateList::append(), FileContext::Private::Cachable::classes, SharedPtr< T >::get(), getCache(), FileDef::getClassSDict(), SDict< ClassDef >::Iterator, m_fileDef, and SharedPtr< T >::reset().

Referenced by Private().

{
Cachable &cache = getCache();
if (!cache.classes)
{
{
ClassDef *cd;
for (sdi.toFirst();(cd=sdi.current());++sdi)
{
if (cd->visibleInParentsDeclList())
{
classList->append(ClassContext::alloc(cd));
}
}
}
cache.classes.reset(classList);
}
return cache.classes.get();
}
TemplateVariant FileContext::Private::compoundType ( ) const
inline

Definition at line 3322 of file context.cpp.

References theTranslator, and Translator::trFile().

Referenced by Private().

{
return theTranslator->trFile(FALSE,TRUE);
}
TemplateVariant FileContext::Private::constantgroups ( ) const
inline

Definition at line 3192 of file context.cpp.

References NamespaceContext::alloc(), TemplateList::alloc(), TemplateList::append(), FileContext::Private::Cachable::constantgroups, SharedPtr< T >::get(), getCache(), FileDef::getNamespaceSDict(), SDict< NamespaceDef >::Iterator, m_fileDef, and SharedPtr< T >::reset().

Referenced by Private().

{
Cachable &cache = getCache();
if (!cache.constantgroups)
{
TemplateList *namespaceList = TemplateList::alloc();
{
for (sdi.toFirst();(nd=sdi.current());++sdi)
{
if (nd->isLinkable() && nd->isConstantGroup())
{
namespaceList->append(NamespaceContext::alloc(nd));
}
}
}
cache.constantgroups.reset(namespaceList);
}
return cache.constantgroups.get();
}
TemplateVariant FileContext::Private::detailedEnums ( ) const
inline
TemplateVariant FileContext::Private::detailedFunctions ( ) const
inline
TemplateVariant FileContext::Private::detailedMacros ( ) const
inline
TemplateVariant FileContext::Private::detailedTypedefs ( ) const
inline
TemplateVariant FileContext::Private::detailedVariables ( ) const
inline
TemplateVariant FileContext::Private::enums ( ) const
inline
TemplateVariant FileContext::Private::functions ( ) const
inline
TemplateVariant FileContext::Private::get ( const char *  n) const
inline

Definition at line 2979 of file context.cpp.

References s_inst.

Referenced by FileContext::get().

{
return s_inst.get(this,n);
}
Cachable& FileContext::Private::getCache ( ) const
inlineprivate
DotInclDepGraph* FileContext::Private::getIncludedByGraph ( ) const
inline

Definition at line 3068 of file context.cpp.

References ScopedPtr< T >::get(), getCache(), FileContext::Private::Cachable::includedByGraph, m_fileDef, and ScopedPtr< T >::reset().

Referenced by hasIncludedByGraph(), and includedByGraph().

{
Cachable &cache = getCache();
if (!cache.includedByGraph)
{
cache.includedByGraph.reset(new DotInclDepGraph(m_fileDef,TRUE));
}
return cache.includedByGraph.get();
}
DotInclDepGraph* FileContext::Private::getIncludeGraph ( ) const
inline

Definition at line 3016 of file context.cpp.

References ScopedPtr< T >::get(), getCache(), FileContext::Private::Cachable::includeGraph, m_fileDef, and ScopedPtr< T >::reset().

Referenced by hasIncludeGraph(), and includeGraph().

{
Cachable &cache = getCache();
if (!cache.includeGraph)
{
cache.includeGraph.reset(new DotInclDepGraph(m_fileDef,FALSE));
}
return cache.includeGraph.get();
}
TemplateVariant FileContext::Private::getMemberList ( SharedPtr< MemberListInfoContext > &  list,
MemberListType  type,
const char *  title,
bool  detailed = FALSE 
) const
inline
TemplateVariant FileContext::Private::hasDetails ( ) const
inline

Definition at line 3120 of file context.cpp.

References FileDef::hasDetailedDescription(), and m_fileDef.

Referenced by Private().

TemplateVariant FileContext::Private::hasIncludedByGraph ( ) const
inline

Definition at line 3077 of file context.cpp.

References Config_getBool, getIncludedByGraph(), DotInclDepGraph::isTooBig(), and DotInclDepGraph::isTrivial().

Referenced by Private().

{
static bool haveDot = Config_getBool(HAVE_DOT);
return (haveDot && !incGraph->isTooBig() && !incGraph->isTrivial());
}
TemplateVariant FileContext::Private::hasIncludeGraph ( ) const
inline

Definition at line 3025 of file context.cpp.

References Config_getBool, getIncludeGraph(), DotInclDepGraph::isTooBig(), and DotInclDepGraph::isTrivial().

Referenced by Private().

{
static bool haveDot = Config_getBool(HAVE_DOT);
return (haveDot && !incGraph->isTooBig() && !incGraph->isTrivial());
}
TemplateVariant FileContext::Private::hasSourceFile ( ) const
inline

Definition at line 3124 of file context.cpp.

References FileDef::generateSourceFile(), and m_fileDef.

Referenced by Private().

{
}
TemplateVariant FileContext::Private::highlight ( ) const
inline

Definition at line 2987 of file context.cpp.

Referenced by Private().

{
return TemplateVariant("files");
}
TemplateVariant FileContext::Private::includedByGraph ( ) const
inline
TemplateVariant FileContext::Private::includeGraph ( ) const
inline
TemplateVariant FileContext::Private::includeList ( ) const
inline

Definition at line 2999 of file context.cpp.

References IncludeInfoListContext::alloc(), SharedPtr< T >::get(), getCache(), Definition::getLanguage(), FileDef::includeFileList(), FileContext::Private::Cachable::includeInfoList, m_fileDef, and SharedPtr< T >::reset().

Referenced by Private().

{
Cachable &cache = getCache();
if (!cache.includeInfoList && m_fileDef->includeFileList())
{
cache.includeInfoList.reset(IncludeInfoListContext::alloc(
}
if (cache.includeInfoList)
{
return cache.includeInfoList.get();
}
else
{
return TemplateVariant(FALSE);
}
}
TemplateVariant FileContext::Private::inlineClasses ( ) const
inline

Definition at line 3297 of file context.cpp.

References ClassContext::alloc(), TemplateList::alloc(), TemplateList::append(), SharedPtr< T >::get(), getCache(), FileDef::getClassSDict(), FileContext::Private::Cachable::inlineClasses, SDict< ClassDef >::Iterator, m_fileDef, and SharedPtr< T >::reset().

Referenced by Private().

{
Cachable &cache = getCache();
if (!cache.inlineClasses)
{
{
ClassDef *cd;
for (sdi.toFirst();(cd=sdi.current());++sdi)
{
if (cd->name().find('@')==-1 &&
cd->isLinkableInProject() &&
cd->isEmbeddedInOuterScope() &&
cd->partOfGroups()==0)
{
classList->append(ClassContext::alloc(cd));
}
}
}
cache.inlineClasses.reset(classList);
}
return cache.inlineClasses.get();
}
TemplateVariant FileContext::Private::macros ( ) const
inline
TemplateVariant FileContext::Private::memberGroups ( ) const
inline
TemplateVariant FileContext::Private::namespaces ( ) const
inline

Definition at line 3170 of file context.cpp.

References NamespaceContext::alloc(), TemplateList::alloc(), TemplateList::append(), SharedPtr< T >::get(), getCache(), FileDef::getNamespaceSDict(), SDict< NamespaceDef >::Iterator, m_fileDef, FileContext::Private::Cachable::namespaces, and SharedPtr< T >::reset().

Referenced by Private().

{
Cachable &cache = getCache();
if (!cache.namespaces)
{
TemplateList *namespaceList = TemplateList::alloc();
{
for (sdi.toFirst();(nd=sdi.current());++sdi)
{
if (nd->isLinkable() && !nd->isConstantGroup())
{
namespaceList->append(NamespaceContext::alloc(nd));
}
}
}
cache.namespaces.reset(namespaceList);
}
return cache.namespaces.get();
}
TemplateVariant FileContext::Private::sources ( ) const
inline

Definition at line 3128 of file context.cpp.

References FileDef::generateSourceFile(), getCache(), m_fileDef, parseCode(), DefinitionContext< FileContext::Private >::relPathAsString(), ScopedPtr< T >::reset(), and FileContext::Private::Cachable::sources.

Referenced by Private().

{
Cachable &cache = getCache();
if (!cache.sources)
{
{
cache.sources.reset(new TemplateVariant(parseCode(m_fileDef,relPathAsString())));
}
else
{
cache.sources.reset(new TemplateVariant(""));
}
}
return *cache.sources;
}
TemplateVariant FileContext::Private::subHighlight ( ) const
inline

Definition at line 2991 of file context.cpp.

Referenced by Private().

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

Definition at line 2983 of file context.cpp.

References m_fileDef, and FileDef::title().

Referenced by detailedFunctions(), functions(), and Private().

{
return m_fileDef->title();
}
TemplateVariant FileContext::Private::typedefs ( ) const
inline
TemplateVariant FileContext::Private::variables ( ) const
inline
TemplateVariant FileContext::Private::version ( ) const
inline

Definition at line 3144 of file context.cpp.

References FileDef::fileVersion(), and m_fileDef.

Referenced by Private().

{
}
TemplateVariant FileContext::Private::versionInfo ( ) const
inline

Definition at line 2995 of file context.cpp.

References FileDef::getVersion(), and m_fileDef.

Referenced by Private().

{
return m_fileDef->getVersion();
}

Member Data Documentation

FileDef* FileContext::Private::m_fileDef
private
PropertyMapper< FileContext::Private > FileContext::Private::s_inst
staticprivate

Definition at line 3358 of file context.cpp.

Referenced by get(), and Private().


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