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 = '"
99 t << memPrefix <<
"virt = " << to_string_lower(md->
virtualness()) <<
";\n";
100 t << memPrefix <<
"prot = " << to_string_lower(md->
protection()) <<
";\n";
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 DString fcnPrefix =
" " + memPrefix +
"param-";
119 auto defIt = defAl.
begin();
123 if (defIt!=defAl.
end())
128 t << memPrefix <<
"param = {\n";
129 if (!a.attrib.empty())
131 t << fcnPrefix <<
"attributes = ";
137 t << fcnPrefix <<
"type = <<_EnD_oF_dEf_TeXt_\n"
138 << a.type <<
"\n_EnD_oF_dEf_TeXt_;\n";
142 t << fcnPrefix <<
"declname = ";
148 t << fcnPrefix <<
"defname = ";
152 if (!a.array.empty())
154 t << fcnPrefix <<
"array = ";
158 if (!a.defval.empty())
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 DString 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().empty())
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 DString 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 DString scope = rmd->getScopeString();
225 if (!scope.
empty() && scope!=def->
name())
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 DString scope = rmd->getScopeString();
251 if (!scope.
empty() && scope!=def->
name())
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";
306 t <<
" cp-name = '" << cd->
name() <<
"';\n";
310 t <<
" cp-ref = {\n" <<
" ref-type = base;\n";
311 t <<
" ref-id = '" << bcd.classDef->getOutputFileBase() <<
"';\n";
312 t <<
" ref-prot = " << to_string_lower_class(bcd.prot) <<
";\n";
313 t <<
" ref-virt = " << to_string_lower(bcd.virt) <<
";\n";
319 t <<
" cp-ref = {\n" <<
" ref-type = derived;\n";
320 t <<
" ref-id = '" << bcd.classDef->getOutputFileBase() <<
"';\n";
321 t <<
" ref-prot = " << to_string_lower_class(bcd.prot) <<
";\n";
322 t <<
" ref-virt = " << to_string_lower(bcd.virt) <<
";\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 DString 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 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 DString compoundTypeString() const =0
Returns the type of compound as a string.
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.
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
DString & prepend(const char *s)
size_t find(char c, size_t pos=0) const
const std::string & str() const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
The common base class of all entity definitions found in the sources.
virtual DString briefDescription(bool abbreviate=false) const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual DString getDefFileName() const =0
virtual DString documentation() const =0
virtual int getDefLine() const =0
virtual const DString & name() const =0
virtual DString anchor() const =0
virtual const MemberVector & getReferencedByMembers() const =0
virtual bool isReference() const =0
virtual const MemberVector & getReferencesMembers() const =0
virtual DString getOutputFileBase() 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 DString argsString() const =0
virtual const ClassDef * getClassDef() const =0
virtual const DString & initializer() 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 DString typeString() const =0
virtual Specifier virtualness(int count=0) 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
Text streaming class that buffers data.
#define Config_getString(name)
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const DString &argsString, DString *extraTypeChars=nullptr)
static void generateDEFForClass(const ClassDef *cd, TextStream &t)
static void generateDEFSection(const Definition *d, TextStream &t, const MemberList *ml, const DString &kind)
static void writeDEFString(TextStream &t, const DString &s)
static void generateDEFClassSection(const ClassDef *cd, TextStream &t, const MemberList *ml, const DString &kind)
static void generateDEFForFile(const FileDef *fd, TextStream &t)
static void generateDEFForMember(const MemberDef *md, TextStream &t, const Definition *def, const DString &prefix)
static void generateDEFForNamespace(const NamespaceDef *nd, TextStream &t)
std::ofstream openOutputStream(const DString &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.
DString replaceAnonymousScopes(const DString &s, const DString &replacement)
A bunch of utility functions.