47 const char* p=s.
data();
52 if (c ==
'\'') t <<
'\\';
77 if (md->
memberType()==MemberType::EnumValue)
return;
85 t <<
" " <<
prefix <<
"-member = {\n";
88 memPrefix.
append(
"-mem-" );
94 t << memPrefix <<
"kind = '" << memType <<
"';\n";
95 t << memPrefix <<
"id = '"
107 t << memPrefix <<
"type = <<_EnD_oF_dEf_TeXt_\n" << typeStr <<
"\n"
108 <<
"_EnD_oF_dEf_TeXt_;\n";
111 t << memPrefix <<
"name = '" << md->
name() <<
"';\n";
117 QCString fcnPrefix =
" " + memPrefix +
"param-";
119 auto defIt = defAl.
begin();
123 if (defIt!=defAl.
end())
128 t << memPrefix <<
"param = {\n";
129 if (!a.attrib.isEmpty())
131 t << fcnPrefix <<
"attributes = ";
135 if (!a.type.isEmpty())
137 t << fcnPrefix <<
"type = <<_EnD_oF_dEf_TeXt_\n"
138 << a.type <<
"\n_EnD_oF_dEf_TeXt_;\n";
140 if (!a.name.isEmpty())
142 t << fcnPrefix <<
"declname = ";
148 t << fcnPrefix <<
"defname = ";
152 if (!a.array.isEmpty())
154 t << fcnPrefix <<
"array = ";
158 if (!a.defval.isEmpty())
160 t << fcnPrefix <<
"defval = <<_EnD_oF_dEf_TeXt_\n"
161 << a.defval <<
"\n_EnD_oF_dEf_TeXt_;\n";
163 t <<
" }; /*" << fcnPrefix <<
"-param */\n";
166 else if ( md->
memberType()==MemberType::Define
169 QCString defPrefix =
" " + memPrefix +
"def-";
172 t << memPrefix <<
"param = {\n";
173 t << defPrefix <<
"name = '" << a.type <<
"';\n";
174 t <<
" }; /*" << defPrefix <<
"-param */\n";
180 t << memPrefix <<
"initializer = <<_EnD_oF_dEf_TeXt_\n"
184 if (md->
memberType()==MemberType::Enumeration)
188 t << memPrefix <<
"enum = { enum-name = " << emd->name() <<
';';
189 if (!emd->initializer().isEmpty())
191 t <<
" enum-value = ";
199 t << memPrefix <<
"desc-file = '" << md->
getDefFileName() <<
"';\n";
200 t << memPrefix <<
"desc-line = '" << md->
getDefLine() <<
"';\n";
201 t << memPrefix <<
"briefdesc = <<_EnD_oF_dEf_TeXt_\n"
203 t << memPrefix <<
"documentation = <<_EnD_oF_dEf_TeXt_\n"
208 QCString refPrefix =
" " + memPrefix +
"ref-";
210 for (
const auto &rmd : refList)
212 if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
214 t << memPrefix <<
"referenceto = {\n";
215 t << refPrefix <<
"id = '"
216 << rmd->getBodyDef()->getOutputFileBase()
218 << rmd->anchor() <<
"';\n";
220 t << refPrefix <<
"line = '"
221 << rmd->getStartBodyLine() <<
"';\n";
223 QCString scope = rmd->getScopeString();
230 t << refPrefix <<
"name = ";
232 t <<
';' <<
"\n };\n";
236 for (
const auto &rmd : refByList)
238 if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
240 t << memPrefix <<
"referencedby = {\n";
241 t << refPrefix <<
"id = '"
242 << rmd->getBodyDef()->getOutputFileBase()
244 << rmd->anchor() <<
"';\n";
246 t << refPrefix <<
"line = '"
247 << rmd->getStartBodyLine() <<
"';\n";
249 QCString scope = rmd->getScopeString();
256 t << refPrefix <<
"name = ";
258 t <<
';' <<
"\n };\n";
262 t <<
" }; /* " <<
prefix <<
"-member */\n";
271 if (cd && ml && !ml->
empty())
273 t <<
" cp-section = {\n";
274 t <<
" sec-kind = '" << kind <<
"';\n";
276 for (
const auto &md : *ml)
280 t <<
" }; /* cp-section */\n";
301 if (cd->
name().
find(
'@')!=-1)
return;
306 t <<
" cp-name = '" << cd->
name() <<
"';\n";
310 t <<
" cp-ref = {\n" <<
" ref-type = base;\n";
311 t <<
" ref-id = '" << bcd.classDef->getOutputFileBase() <<
"';\n";
319 t <<
" cp-ref = {\n" <<
" ref-type = derived;\n";
320 t <<
" ref-id = '" << bcd.classDef->getOutputFileBase() <<
"';\n";
326 size_t numMembers = 0;
329 if (!ml->listType().isDetailed())
331 numMembers+=ml->size();
364 t <<
" cp-fileline = '" << cd->
getDefLine() <<
"';\n";
365 t <<
" cp-briefdesc = <<_EnD_oF_dEf_TeXt_\n"
368 t <<
" cp-documentation = <<_EnD_oF_dEf_TeXt_\n"
374 t <<
" cp-inheritancegraph = <<_EnD_oF_dEf_TeXt_\n";
376 t <<
"\n_EnD_oF_dEf_TeXt_;\n";
381 t <<
" cp-collaborationgraph = <<_EnD_oF_dEf_TeXt_\n";
383 t <<
"\n_EnD_oF_dEf_TeXt_;\n";
393 if (ml && !ml->
empty())
395 t <<
" " << kind <<
" = {\n";
396 for (
const auto &md : *ml)
407 t <<
" namespace = {\n";
423 t <<
" ns-fileline = '" << nd->
getDefLine() <<
"';\n";
424 t <<
" ns-briefdesc = <<_EnD_oF_dEf_TeXt_\n"
427 t <<
" ns-documentation = <<_EnD_oF_dEf_TeXt_\n"
438 t <<
" file-name = ";
452 t <<
" file-first-line = '" << fd->
getDefLine() <<
"';\n";
454 t <<
" file-briefdesc = <<_EnD_oF_dEf_TeXt_\n"
457 t <<
" file-documentation = <<_EnD_oF_dEf_TeXt_\n"
460 t <<
"}; /* file */\n";
467 Dir defDir(outputDirectory.
str());
470 err(
"Could not create def directory in {}\n",outputDirectory);
474 QCString fileName=outputDirectory+
"/doxygen.def";
478 err(
"Cannot open file {} for writing!\n",fileName);
482 t <<
"AutoGen Definitions dummy;\n";
494 for (
const auto &fd : *fn)
506 t <<
"dummy_value = true;\n";
This class represents an function or template argument list.
A abstract class representing of a compound symbol.
virtual QCString compoundTypeString() const =0
Returns the type of compound as a string.
virtual const MemberLists & getMemberLists() const =0
Returns the list containing the list of members sorted per type.
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual MemberList * getMemberList(MemberListType lt) const =0
Returns the members in the list identified by lt.
virtual bool isImplicitTemplateInstance() const =0
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class.
The common base class of all entity definitions found in the sources.
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual QCString getDefFileName() const =0
virtual int getDefLine() const =0
virtual QCString anchor() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual QCString documentation() const =0
virtual QCString getOutputFileBase() const =0
virtual const MemberVector & getReferencedByMembers() const =0
virtual bool isReference() const =0
virtual const MemberVector & getReferencesMembers() const =0
virtual const QCString & name() const =0
Class representing a directory in the file system.
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
Representation of a class inheritance or dependency graph.
void writeDEF(TextStream &t)
static NamespaceLinkedMap * namespaceLinkedMap
static FileNameLinkedMap * inputNameLinkedMap
static ClassLinkedMap * classLinkedMap
A model of a file symbol.
virtual MemberList * getMemberList(MemberListType lt) const =0
A model of a class/file/namespace member symbol.
virtual QCString typeString() const =0
virtual const ClassDef * getClassDef() const =0
virtual const MemberVector & enumFieldList() const =0
virtual const ArgumentList & argumentList() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual Protection protection() const =0
virtual MemberType memberType() const =0
virtual QCString argsString() const =0
virtual Specifier virtualness(int count=0) const =0
virtual const QCString & initializer() const =0
A list of MemberDef objects as shown in documentation sections.
bool empty() const noexcept
An abstract interface of a namespace symbol.
virtual MemberList * getMemberList(MemberListType lt) const =0
This is an alternative implementation of QCString.
int find(char c, int index=0, bool cs=TRUE) const
QCString & prepend(const char *s)
bool isEmpty() const
Returns TRUE iff the string is empty.
const std::string & str() const
QCString & append(char c)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Text streaming class that buffers data.
#define Config_getString(name)
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
static void generateDEFClassSection(const ClassDef *cd, TextStream &t, const MemberList *ml, const QCString &kind)
static void generateDEFForClass(const ClassDef *cd, TextStream &t)
static void generateDEFForMember(const MemberDef *md, TextStream &t, const Definition *def, const QCString &prefix)
static void writeDEFString(TextStream &t, const QCString &s)
static void generateDEFSection(const Definition *d, TextStream &t, const MemberList *ml, const QCString &kind)
static void generateDEFForFile(const FileDef *fd, TextStream &t)
static void generateDEFForNamespace(const NamespaceDef *nd, TextStream &t)
std::ofstream openOutputStream(const QCString &name, bool append=false)
Portable versions of functions that are platform dependent.
This class contains the information about the argument of a function or template.
static constexpr const char * to_string_lower_class(Protection prot) noexcept
static constexpr bool to_isFunction(MemberType mt) noexcept
static constexpr const char * to_string_lower(Protection prot) noexcept
QCString replaceAnonymousScopes(const QCString &s, const QCString &replacement)
A bunch of utility functions.