16#include <unordered_set>
40 std::unordered_set<std::string>
scopes;
51 if (projectName.
isEmpty()) projectName=
"root";
53 if (bundleId.
isEmpty()) bundleId=
"org.doxygen.Project";
55 if (feedName.
isEmpty()) feedName=
"FeedName";
57 if (feedURL.
isEmpty()) feedURL=
"FeedUrl";
59 if (publisherId.
isEmpty()) publisherId=
"PublisherId";
61 if (publisherName.
isEmpty()) publisherName=
"PublisherName";
63 if (projectNumber.
isEmpty()) projectNumber=
"ProjectNumber";
71 term(
"Could not open file %s for writing\n",
qPrint(mfName));
74 ts <<
"DOCSET_NAME=" << bundleId <<
".docset\n"
75 "DOCSET_CONTENTS=$(DOCSET_NAME)/Contents\n"
76 "DOCSET_RESOURCES=$(DOCSET_CONTENTS)/Resources\n"
77 "DOCSET_DOCUMENTS=$(DOCSET_RESOURCES)/Documents\n"
78 "DESTDIR=~/Library/Developer/Shared/Documentation/DocSets\n"
79 "XCODE_INSTALL=\"$(shell xcode-select -print-path)\"\n"
84 "\tmkdir -p $(DOCSET_DOCUMENTS)\n"
85 "\tcp Nodes.xml $(DOCSET_RESOURCES)\n"
86 "\tcp Tokens.xml $(DOCSET_RESOURCES)\n"
87 "\tcp Info.plist $(DOCSET_CONTENTS)\n"
88 "\ttar --exclude $(DOCSET_NAME) \\\n"
89 "\t --exclude Nodes.xml \\\n"
90 "\t --exclude Tokens.xml \\\n"
91 "\t --exclude Info.plist \\\n"
92 "\t --exclude Makefile -c -f - . \\\n"
93 "\t | (cd $(DOCSET_DOCUMENTS); tar xvf -)\n"
94 "\t$(XCODE_INSTALL)/usr/bin/docsetutil index $(DOCSET_NAME)\n"
95 "\trm -f $(DOCSET_DOCUMENTS)/Nodes.xml\n"
96 "\trm -f $(DOCSET_DOCUMENTS)/Info.plist\n"
97 "\trm -f $(DOCSET_DOCUMENTS)/Makefile\n"
98 "\trm -f $(DOCSET_RESOURCES)/Nodes.xml\n"
99 "\trm -f $(DOCSET_RESOURCES)/Tokens.xml\n"
102 "\trm -rf $(DOCSET_NAME)\n"
105 "\tmkdir -p $(DESTDIR)\n"
106 "\tcp -R $(DOCSET_NAME) $(DESTDIR)\n"
109 "\trm -rf $(DESTDIR)/$(DOCSET_NAME)\n"
120 term(
"Could not open file %s for writing\n",
qPrint(plName));
123 ts <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
124 "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n"
125 "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
126 "<plist version=\"1.0\">\n"
128 " <key>CFBundleName</key>\n"
129 " <string>" << projectName <<
"</string>\n"
130 " <key>CFBundleIdentifier</key>\n"
131 " <string>" << bundleId <<
"</string>\n"
132 " <key>CFBundleVersion</key>\n"
133 " <string>" << projectNumber <<
"</string>\n"
134 " <key>DocSetFeedName</key>\n"
135 " <string>" << feedName <<
"</string>\n"
136 " <key>DocSetFeedUrl</key>\n"
137 " <string>" << feedURL <<
"</string>\n"
138 " <key>DocSetPublisherIdentifier</key>\n"
139 " <string>" << publisherId <<
"</string>\n"
140 " <key>DocSetPublisherName</key>\n"
141 " <string>" << publisherName <<
"</string>\n"
143 " <key>DashDocSetFamily</key>\n"
144 " <string>doxy</string>\n"
145 " <key>DocSetPlatformFamily</key>\n"
146 " <string>doxygen</string>\n"
154 if (!
p->ntf.is_open())
156 term(
"Could not open file %s for writing\n",
qPrint(notes));
158 p->nts.setStream(&
p->ntf);
161 p->nts <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
162 p->nts <<
"<DocSetNodes version=\"1.0\">\n";
163 p->nts <<
" <TOC>\n";
164 p->nts <<
" <Node>\n";
165 p->nts <<
" <Name>Root</Name>\n";
167 p->nts <<
" <Subnodes>\n";
168 p->indentStack.push(
true);
172 if (!
p->ttf.is_open())
174 term(
"Could not open file %s for writing\n",
qPrint(tokens));
176 p->tts.setStream(&
p->ttf);
177 p->tts <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
178 p->tts <<
"<Tokens version=\"1.0\">\n";
183 if (!
p->indentStack.top())
185 p->nts <<
p->indent() <<
" </Node>\n";
187 p->indentStack.pop();
188 p->nts <<
" </Subnodes>\n";
189 p->nts <<
" </Node>\n";
190 p->nts <<
" </TOC>\n";
191 p->nts <<
"</DocSetNodes>\n";
195 p->tts <<
"</Tokens>\n";
210 p->nts <<
p->indent() <<
"<Subnodes>\n";
211 p->indentStack.push(
true);
216 if (!
p->indentStack.top())
218 p->nts <<
p->indent() <<
" </Node>\n";
220 p->nts <<
p->indent() <<
"</Subnodes>\n";
221 p->indentStack.pop();
238 if (!
p->indentStack.top())
240 p->nts <<
p->indent() <<
" </Node>\n";
242 p->indentStack.top()=
false;
243 p->nts <<
p->indent() <<
" <Node>\n";
244 p->nts <<
p->indent() <<
" <Name>" <<
convertToXML(name) <<
"</Name>\n";
245 if (!file.
isEmpty() && file[0]==
'^')
252 p->nts <<
p->indent() <<
" <Path>";
253 if (!file.
isEmpty() && file[0]==
'!')
263 p->nts <<
"</Path>\n";
266 p->nts <<
p->indent() <<
" <Anchor>" << anchor <<
"</Anchor>\n";
275 if (md==
nullptr && context==
nullptr)
return;
313 else if (cd==
nullptr && nd==
nullptr)
368 type=
"econst";
break;
372 type=
"signal";
break;
392 type=
"sequence";
break;
394 type=
"dictionary";
break;
474 t <<
" <TokenIdentifier>\n";
480 t <<
" <APILanguage>" << lang <<
"</APILanguage>\n";
484 t <<
" <Type>" << type <<
"</Type>\n";
490 t <<
" </TokenIdentifier>\n";
493 t <<
" <Path>" << fn <<
"</Path>\n";
496 t <<
" <Anchor>" << anchor <<
"</Anchor>\n";
501 t <<
" <Abstract>" <<
convertToXML(tooltip) <<
"</Abstract>\n";
505 t <<
" <DeclaredIn>" <<
convertToXML(decl) <<
"</DeclaredIn>\n";
A abstract class representing of a compound symbol.
virtual bool isTemplate() const =0
Returns TRUE if this class is a template.
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
virtual const IncludeInfo * includeInfo() const =0
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 bool isLinkable() const =0
virtual DefType definitionType() const =0
virtual QCString anchor() const =0
virtual QCString briefDescriptionAsTooltip() const =0
virtual QCString qualifiedName() const =0
virtual QCString getOutputFileBase() const =0
virtual const QCString & name() const =0
void writeToken(TextStream &t, const Definition *d, const QCString &type, const QCString &lang, const QCString &scope=QCString(), const QCString &anchor=QCString(), const QCString &decl=QCString())
void addIndexItem(const Definition *context, const MemberDef *md, const QCString §ionAnchor, const QCString &title)
std::unique_ptr< Private > p
void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex, bool addToNavIndex, const Definition *def)
void addIndexFile(const QCString &name)
static QCString htmlFileExtension
A model of a file symbol.
A model of a class/file/namespace member symbol.
virtual bool isObjCMethod() const =0
virtual const ClassDef * getClassDef() const =0
virtual const FileDef * getFileDef() const =0
virtual QCString getScopeString() const =0
virtual bool isStatic() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual bool isObjCProperty() const =0
virtual MemberType memberType() const =0
An abstract interface of a namespace symbol.
This is an alternative implementation of QCString.
void fill(char c, int len=-1)
Fills a string with a predefined character.
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool endsWith(const char *s) const
bool isEmpty() const
Returns TRUE iff the string is empty.
const std::string & str() const
QCString left(size_t len) const
Text streaming class that buffers data.
ClassDef * toClassDef(Definition *d)
#define Config_getString(name)
FileDef * toFileDef(Definition *d)
std::ofstream openOutputStream(const QCString &name, bool append=false)
NamespaceDef * toNamespaceDef(Definition *d)
Portable versions of functions that are platform dependent.
const char * qPrint(const char *s)
std::unordered_set< std::string > scopes
std::stack< bool > indentStack
Class representing the data associated with a #include statement.
SrcLangExt
Language as given by extension.
QCString convertToXML(const QCString &s, bool keepEntities)
void addHtmlExtensionIfMissing(QCString &fName)
A bunch of utility functions.