My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
defgen.h File Reference

Go to the source code of this file.

Functions

void generateDEF ()
 

Function Documentation

void generateDEF ( )

Definition at line 558 of file defgen.cpp.

References Doxygen::classSDict, Config_getString, endl(), err(), generateDEFForClass(), generateDEFForFile(), Doxygen::inputNameList, SDict< ClassDef >::Iterator, and msg().

Referenced by generateOutput().

{
QCString outputDirectory = Config_getString(OUTPUT_DIRECTORY);
if (outputDirectory.isEmpty())
{
outputDirectory=QDir::currentDirPath().utf8();
}
else
{
QDir dir(outputDirectory);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
err("tag OUTPUT_DIRECTORY: Output directory `%s' does not "
"exist and cannot be created\n",outputDirectory.data());
exit(1);
}
else
{
msg("Notice: Output directory `%s' does not exist. "
"I have created it for you.\n", outputDirectory.data());
}
dir.cd(outputDirectory);
}
outputDirectory=dir.absPath().utf8();
}
QDir dir(outputDirectory);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
err("Cannot create directory %s\n",outputDirectory.data());
return;
}
}
QDir defDir(outputDirectory+"/def");
if (!defDir.exists() && !defDir.mkdir(outputDirectory+"/def"))
{
err("Could not create def directory in %s\n",outputDirectory.data());
return;
}
QCString fileName=outputDirectory+"/def/doxygen.def";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
FTextStream t(&f);
t << "AutoGen Definitions dummy;" << endl;
{
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
}
FileName *fn;
for (;(fn=fnli.current());++fnli)
{
FileNameIterator fni(*fn);
FileDef *fd;
for (;(fd=fni.current());++fni)
{
}
}
}
else
{
t << "dummy_value = true;" << endl;
}
}