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::Privates_inst
 

Detailed Description

Definition at line 3368 of file context.cpp.

Constructor & Destructor Documentation

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

Definition at line 3371 of file context.cpp.

3372  {
3373  static bool init=FALSE;
3374  if (!init)
3375  {
3377  s_inst.addProperty("title", &Private::title);
3378  s_inst.addProperty("highlight", &Private::highlight);
3379  s_inst.addProperty("subhighlight", &Private::subHighlight);
3380  s_inst.addProperty("dirName", &Private::dirName);
3381  s_inst.addProperty("dirs", &Private::dirs);
3382  s_inst.addProperty("files", &Private::files);
3383  s_inst.addProperty("hasDetails", &Private::hasDetails);
3384  s_inst.addProperty("hasDirGraph", &Private::hasDirGraph);
3385  s_inst.addProperty("dirGraph", &Private::dirGraph);
3386  s_inst.addProperty("compoundType", &Private::compoundType);
3387  init=TRUE;
3388  }
3389  if (!dd->cookie()) { dd->setCookie(new DirContext::Private::Cachable(dd)); }
3390  }
TemplateVariant title() const
Definition: context.cpp:3396
Cookie * cookie() const
Definition: definition.h:352
TemplateVariant dirs() const
Definition: context.cpp:3412
TemplateVariant hasDetails() const
Definition: context.cpp:3449
const bool FALSE
Definition: qglobal.h:370
TemplateVariant hasDirGraph() const
Definition: context.cpp:3470
init
Definition: train.py:42
TemplateVariant dirName() const
Definition: context.cpp:3408
void setCookie(Cookie *cookie)
Definition: definition.h:351
void addBaseProperties(PropertyMapper< DirContext::Private > &inst)
Definition: context.cpp:1364
TemplateVariant highlight() const
Definition: context.cpp:3400
TemplateVariant subHighlight() const
Definition: context.cpp:3404
TemplateVariant dirGraph() const
Definition: context.cpp:3482
static PropertyMapper< DirContext::Private > s_inst
Definition: context.cpp:3542
const bool TRUE
Definition: qglobal.h:371
TemplateVariant files() const
Definition: context.cpp:3429
TemplateVariant compoundType() const
Definition: context.cpp:3453
virtual DirContext::Private::~Private ( )
inlinevirtual

Definition at line 3391 of file context.cpp.

3391 {}

Member Function Documentation

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

Definition at line 3453 of file context.cpp.

3454  {
3455  return theTranslator->trDir(FALSE,TRUE);
3456  }
const bool FALSE
Definition: qglobal.h:370
Translator * theTranslator
Definition: language.cpp:157
virtual QCString trDir(bool first_capital, bool singular)=0
const bool TRUE
Definition: qglobal.h:371
TemplateVariant DirContext::Private::dirGraph ( ) const
inline

Definition at line 3482 of file context.cpp.

3483  {
3484  QGString result;
3485  static bool haveDot = Config_getBool("HAVE_DOT");
3486  static bool dirGraph = Config_getBool("DIRECTORY_GRAPH");
3487  if (haveDot && dirGraph)
3488  {
3490  FTextStream t(&result);
3491  switch (g_globals.outputFormat)
3492  {
3494  {
3495  graph->writeGraph(t,GOF_BITMAP,
3496  EOF_Html,
3499  relPathAsString(),
3500  TRUE,
3502  FALSE);
3503  }
3504  break;
3506  {
3507  graph->writeGraph(t,GOF_EPS,
3508  EOF_LaTeX,
3511  relPathAsString(),
3512  TRUE,
3514  FALSE);
3515  }
3516  break;
3517  // TODO: support other generators
3518  default:
3519  err("context.cpp: output format not yet supported");
3520  break;
3521  }
3523  }
3524  return TemplateVariant(result.data(),TRUE);
3525  }
char * data() const
Definition: qgstring.h:42
static QCString result
int dynSectionId
Definition: context.cpp:69
static QCString htmlFileExtension
Definition: doxygen.h:130
const bool FALSE
Definition: qglobal.h:370
def graph(desc, maker=maker)
Definition: apa.py:294
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
QCString outputDir
Definition: context.cpp:70
Definition: dot.h:43
#define Config_getBool(val)
Definition: config.cpp:664
Definition: dot.h:42
void err(const char *fmt,...)
Definition: message.cpp:226
DotDirDeps * getDirDepsGraph() const
Definition: context.cpp:3461
Variant type which can hold one value of a fixed set of types.
Definition: template.h:90
QCString getOutputFileBase() const
Definition: dirdef.cpp:113
ContextOutputFormat outputFormat
Definition: context.cpp:71
TemplateVariant dirGraph() const
Definition: context.cpp:3482
QCString writeGraph(FTextStream &out, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1, bool linkRelations=TRUE) const
Definition: dot.cpp:3977
struct ContextGlobals g_globals
char portable_pathSeparator()
Definition: portable.cpp:355
Definition: dot.h:42
Definition: dot.h:43
const bool TRUE
Definition: qglobal.h:371
TemplateVariant DirContext::Private::dirName ( ) const
inline

Definition at line 3408 of file context.cpp.

3409  {
3410  return TemplateVariant(m_dirDef->shortName());
3411  }
const QCString & shortName() const
Definition: dirdef.h:57
Variant type which can hold one value of a fixed set of types.
Definition: template.h:90
TemplateVariant DirContext::Private::dirs ( ) const
inline

Definition at line 3412 of file context.cpp.

3413  {
3414  Cachable &cache = getCache();
3415  if (!cache.dirs)
3416  {
3417  cache.dirs.reset(TemplateList::alloc());
3418  const DirList &subDirs = m_dirDef->subDirs();
3419  QListIterator<DirDef> it(subDirs);
3420  DirDef *dd;
3421  for (it.toFirst();(dd=it.current());++it)
3422  {
3423  DirContext *dc = new DirContext(dd);
3424  cache.dirs->append(dc);
3425  }
3426  }
3427  return cache.dirs.get();
3428  }
static TemplateList * alloc()
Definition: template.cpp:420
Cachable & getCache() const
Definition: context.cpp:3536
Definition: dirdef.h:37
const DirList & subDirs() const
Definition: dirdef.h:61
Definition: dirdef.h:44
DirContext(DirDef *)
Definition: context.cpp:3548
TemplateVariant DirContext::Private::files ( ) const
inline

Definition at line 3429 of file context.cpp.

3430  {
3431  Cachable &cache = getCache();
3432  if (!cache.files)
3433  {
3434  cache.files.reset(TemplateList::alloc());
3436  if (files)
3437  {
3438  QListIterator<FileDef> it(*files);
3439  FileDef *fd;
3440  for (it.toFirst();(fd=it.current());++it)
3441  {
3442  FileContext *fc = FileContext::alloc(fd);
3443  cache.files->append(fc);
3444  }
3445  }
3446  }
3447  return cache.files.get();
3448  }
static TemplateList * alloc()
Definition: template.cpp:420
static FileContext * alloc(FileDef *fd)
Definition: context.h:294
Cachable & getCache() const
Definition: context.cpp:3536
FileList * getFiles() const
Definition: dirdef.h:59
TemplateVariant files() const
Definition: context.cpp:3429
TemplateVariant DirContext::Private::get ( const char *  n) const
inline

Definition at line 3392 of file context.cpp.

3393  {
3394  return s_inst.get(this,n);
3395  }
std::void_t< T > n
static PropertyMapper< DirContext::Private > s_inst
Definition: context.cpp:3542
Cachable& DirContext::Private::getCache ( ) const
inlineprivate

Definition at line 3536 of file context.cpp.

3537  {
3538  Cachable *c = static_cast<Cachable*>(m_dirDef->cookie());
3539  assert(c!=0);
3540  return *c;
3541  }
Cookie * cookie() const
Definition: definition.h:352
DotDirDeps* DirContext::Private::getDirDepsGraph ( ) const
inline

Definition at line 3461 of file context.cpp.

3462  {
3463  Cachable &cache = getCache();
3464  if (!cache.dirDepsGraph)
3465  {
3466  cache.dirDepsGraph.reset(new DotDirDeps(m_dirDef));
3467  }
3468  return cache.dirDepsGraph.get();
3469  }
Cachable & getCache() const
Definition: context.cpp:3536
TemplateVariant DirContext::Private::hasDetails ( ) const
inline

Definition at line 3449 of file context.cpp.

3450  {
3451  return m_dirDef->hasDetailedDescription();
3452  }
bool hasDetailedDescription() const
Definition: dirdef.cpp:331
TemplateVariant DirContext::Private::hasDirGraph ( ) const
inline

Definition at line 3470 of file context.cpp.

3471  {
3472  bool result=FALSE;
3473  static bool haveDot = Config_getBool("HAVE_DOT");
3474  static bool dirGraph = Config_getBool("DIRECTORY_GRAPH");
3475  if (haveDot && dirGraph)
3476  {
3478  result = !graph->isTrivial();
3479  }
3480  return result;
3481  }
bool isTrivial() const
Definition: dot.cpp:4120
static QCString result
const bool FALSE
Definition: qglobal.h:370
def graph(desc, maker=maker)
Definition: apa.py:294
#define Config_getBool(val)
Definition: config.cpp:664
DotDirDeps * getDirDepsGraph() const
Definition: context.cpp:3461
TemplateVariant dirGraph() const
Definition: context.cpp:3482
TemplateVariant DirContext::Private::highlight ( ) const
inline

Definition at line 3400 of file context.cpp.

3401  {
3402  return TemplateVariant("files");
3403  }
Variant type which can hold one value of a fixed set of types.
Definition: template.h:90
TemplateVariant DirContext::Private::relPath ( ) const
inlinevirtual

Reimplemented from DefinitionContext< DirContext::Private >.

Definition at line 3457 of file context.cpp.

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

Definition at line 3404 of file context.cpp.

3405  {
3406  return TemplateVariant("");
3407  }
Variant type which can hold one value of a fixed set of types.
Definition: template.h:90
TemplateVariant DirContext::Private::title ( ) const
inline

Definition at line 3396 of file context.cpp.

3397  {
3398  return TemplateVariant(m_dirDef->shortTitle());
3399  }
QCString shortTitle() const
Definition: dirdef.cpp:326
Variant type which can hold one value of a fixed set of types.
Definition: template.h:90

Member Data Documentation

DirDef* DirContext::Private::m_dirDef
private

Definition at line 3528 of file context.cpp.

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

Definition at line 3542 of file context.cpp.


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