Doxygen
Loading...
Searching...
No Matches
defgen.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void generateDEF ()
 

Function Documentation

◆ generateDEF()

void generateDEF ( )

Definition at line 525 of file defgen.cpp.

526{
527 QCString outputDirectory = Config_getString(OUTPUT_DIRECTORY)+"/def";
528 Dir defDir(outputDirectory.str());
529 if (!defDir.exists() && !defDir.mkdir(outputDirectory.str()))
530 {
531 err("Could not create def directory in %s\n",qPrint(outputDirectory));
532 return;
533 }
534
535 QCString fileName=outputDirectory+"/doxygen.def";
536 std::ofstream f = Portable::openOutputStream(fileName);
537 if (!f.is_open())
538 {
539 err("Cannot open file %s for writing!\n",qPrint(fileName));
540 return;
541 }
542 TextStream t(&f);
543 t << "AutoGen Definitions dummy;\n";
544
545 if (Doxygen::classLinkedMap->size()+
548 {
549 for (const auto &cd : *Doxygen::classLinkedMap)
550 {
551 generateDEFForClass(cd.get(),t);
552 }
553 for (const auto &fn : *Doxygen::inputNameLinkedMap)
554 {
555 for (const auto &fd : *fn)
556 {
557 generateDEFForFile(fd.get(),t);
558 }
559 }
560 for (const auto &nd : *Doxygen::namespaceLinkedMap)
561 {
562 generateDEFForNamespace(nd.get(),t);
563 }
564 }
565 else
566 {
567 t << "dummy_value = true;\n";
568 }
569}
Class representing a directory in the file system.
Definition dir.h:75
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:115
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:105
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:96
This is an alternative implementation of QCString.
Definition qcstring.h:101
const std::string & str() const
Definition qcstring.h:526
Text streaming class that buffers data.
Definition textstream.h:36
#define Config_getString(name)
Definition config.h:32
static void generateDEFForClass(const ClassDef *cd, TextStream &t)
Definition defgen.cpp:317
static void generateDEFForFile(const FileDef *fd, TextStream &t)
Definition defgen.cpp:493
static void generateDEFForNamespace(const NamespaceDef *nd, TextStream &t)
Definition defgen.cpp:465
#define err(fmt,...)
Definition message.h:84
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:665
const char * qPrint(const char *s)
Definition qcstring.h:661

References Doxygen::classLinkedMap, Config_getString, err, Dir::exists(), generateDEFForClass(), generateDEFForFile(), generateDEFForNamespace(), Doxygen::inputNameLinkedMap, Dir::mkdir(), Doxygen::namespaceLinkedMap, Portable::openOutputStream(), qPrint(), and QCString::str().

Referenced by generateOutput().