浏览该文件的文档.
40 std::set<std::string>
scopes;
56 if (projectName.
isEmpty()) projectName=
"root";
58 if (bundleId.
isEmpty()) bundleId=
"org.doxygen.Project";
60 if (feedName.
isEmpty()) feedName=
"FeedName";
62 if (feedURL.
isEmpty()) feedURL=
"FeedUrl";
64 if (publisherId.
isEmpty()) publisherId=
"PublisherId";
66 if (publisherName.
isEmpty()) publisherName=
"PublisherName";
68 if (projectNumber.
isEmpty()) projectNumber=
"ProjectNumber";
73 std::ofstream ts(mfName.
str(),std::ofstream::out | std::ofstream::binary);
76 term(
"Could not open file %s for writing\n",
qPrint(mfName));
79 ts <<
"DOCSET_NAME=" << bundleId <<
".docset\n"
80 "DOCSET_CONTENTS=$(DOCSET_NAME)/Contents\n"
81 "DOCSET_RESOURCES=$(DOCSET_CONTENTS)/Resources\n"
82 "DOCSET_DOCUMENTS=$(DOCSET_RESOURCES)/Documents\n"
83 "DESTDIR=~/Library/Developer/Shared/Documentation/DocSets\n"
84 "XCODE_INSTALL=\"$(shell xcode-select -print-path)\"\n"
89 "\tmkdir -p $(DOCSET_DOCUMENTS)\n"
90 "\tcp Nodes.xml $(DOCSET_RESOURCES)\n"
91 "\tcp Tokens.xml $(DOCSET_RESOURCES)\n"
92 "\tcp Info.plist $(DOCSET_CONTENTS)\n"
93 "\ttar --exclude $(DOCSET_NAME) \\\n"
94 "\t --exclude Nodes.xml \\\n"
95 "\t --exclude Tokens.xml \\\n"
96 "\t --exclude Info.plist \\\n"
97 "\t --exclude Makefile -c -f - . \\\n"
98 "\t | (cd $(DOCSET_DOCUMENTS); tar xvf -)\n"
99 "\t$(XCODE_INSTALL)/usr/bin/docsetutil index $(DOCSET_NAME)\n"
100 "\trm -f $(DOCSET_DOCUMENTS)/Nodes.xml\n"
101 "\trm -f $(DOCSET_DOCUMENTS)/Info.plist\n"
102 "\trm -f $(DOCSET_DOCUMENTS)/Makefile\n"
103 "\trm -f $(DOCSET_RESOURCES)/Nodes.xml\n"
104 "\trm -f $(DOCSET_RESOURCES)/Tokens.xml\n"
107 "\trm -rf $(DOCSET_NAME)\n"
110 "\tmkdir -p $(DESTDIR)\n"
111 "\tcp -R $(DOCSET_NAME) $(DESTDIR)\n"
114 "\trm -rf $(DESTDIR)/$(DOCSET_NAME)\n"
122 std::ofstream ts(plName.
str(),std::ofstream::out | std::ofstream::binary);
125 term(
"Could not open file %s for writing\n",
qPrint(plName));
128 ts <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
129 "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n"
130 "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
131 "<plist version=\"1.0\">\n"
133 " <key>CFBundleName</key>\n"
134 " <string>" << projectName <<
"</string>\n"
135 " <key>CFBundleIdentifier</key>\n"
136 " <string>" << bundleId <<
"</string>\n"
137 " <key>CFBundleVersion</key>\n"
138 " <string>" << projectNumber <<
"</string>\n"
139 " <key>DocSetFeedName</key>\n"
140 " <string>" << feedName <<
"</string>\n"
141 " <key>DocSetFeedUrl</key>\n"
142 " <string>" << feedURL <<
"</string>\n"
143 " <key>DocSetPublisherIdentifier</key>\n"
144 " <string>" << publisherId <<
"</string>\n"
145 " <key>DocSetPublisherName</key>\n"
146 " <string>" << publisherName <<
"</string>\n"
148 " <key>DashDocSetFamily</key>\n"
149 " <string>doxy</string>\n"
150 " <key>DocSetPlatformFamily</key>\n"
151 " <string>doxygen</string>\n"
158 p->ntf.open(notes.
str(),std::ofstream::out | std::ofstream::binary);
159 if (!
p->ntf.is_open())
161 term(
"Could not open file %s for writing\n",
qPrint(notes));
163 p->nts.setStream(&
p->ntf);
166 p->nts <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
167 p->nts <<
"<DocSetNodes version=\"1.0\">\n";
168 p->nts <<
" <TOC>\n";
169 p->nts <<
" <Node>\n";
170 p->nts <<
" <Name>Root</Name>\n";
172 p->nts <<
" <Subnodes>\n";
173 p->indentStack.push(
true);
176 p->ttf.open(tokens.
str(),std::ofstream::out | std::ofstream::binary);
177 if (!
p->ttf.is_open())
179 term(
"Could not open file %s for writing\n",
qPrint(tokens));
181 p->tts.setStream(&
p->ttf);
182 p->tts <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
183 p->tts <<
"<Tokens version=\"1.0\">\n";
188 if (!
p->indentStack.top())
190 p->nts <<
p->indent() <<
" </Node>\n";
192 p->indentStack.pop();
193 p->nts <<
" </Subnodes>\n";
194 p->nts <<
" </Node>\n";
195 p->nts <<
" </TOC>\n";
196 p->nts <<
"</DocSetNodes>\n";
200 p->tts <<
"</Tokens>\n";
215 p->nts <<
p->indent() <<
"<Subnodes>\n";
216 p->indentStack.push(
true);
221 if (!
p->indentStack.top())
223 p->nts <<
p->indent() <<
" </Node>\n";
225 p->nts <<
p->indent() <<
"</Subnodes>\n";
226 p->indentStack.pop();
243 if (!
p->indentStack.top())
245 p->nts <<
p->indent() <<
" </Node>\n";
247 p->indentStack.top()=
false;
248 p->nts <<
p->indent() <<
" <Node>\n";
249 p->nts <<
p->indent() <<
" <Name>" <<
convertToXML(name) <<
"</Name>\n";
250 if (!file.
isEmpty() && file[0]==
'^')
257 p->nts <<
p->indent() <<
" <Path>";
258 if (!file.
isEmpty() && file[0]==
'!')
266 p->nts <<
"</Path>\n";
269 p->nts <<
p->indent() <<
" <Anchor>" << anchor <<
"</Anchor>\n";
278 if (md==0 && context==0)
return;
316 else if (cd==0 && nd==0)
348 if (context==0)
return;
380 type=
"econst";
break;
384 type=
"signal";
break;
404 type=
"sequence";
break;
406 type=
"dictionary";
break;
419 if (declMd==0) declMd = md;
499 t <<
" <TokenIdentifier>\n";
505 t <<
" <APILanguage>" << lang <<
"</APILanguage>\n";
509 t <<
" <Type>" << type <<
"</Type>\n";
515 t <<
" </TokenIdentifier>\n";
519 t <<
" <Anchor>" << anchor <<
"</Anchor>\n";
524 t <<
" <Abstract>" <<
convertToXML(tooltip) <<
"</Abstract>\n";
528 t <<
" <DeclaredIn>" <<
convertToXML(decl) <<
"</DeclaredIn>\n";
The common base class of all entity definitions found in the sources.
virtual bool isObjCProperty() const =0
virtual bool isStatic() const =0
An abstract interface of a namespace symbol.
virtual bool isLinkable() const =0
uint length() const
Returns the length of the string, not counting the 0-terminator.
bool isEmpty() const
Returns TRUE iff the string is empty
SrcLangExt
Language as given by extension
Text streaming class that buffers data.
std::set< std::string > scopes
virtual const IncludeInfo * includeInfo() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual bool isObjCMethod() const =0
virtual bool isLinkable() 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())
virtual QCString anchor() const =0
virtual QCString qualifiedName() const =0
virtual MemberDef * memberDeclaration() const =0
QCString addHtmlExtensionIfMissing(const QCString &fName)
A model of a class/file/namespace member symbol.
A abstract class representing of a compound symbol.
QCString left(size_t len) const
virtual QCString name() const =0
Class representing the data associated with a #include statement.
virtual QCString name() const =0
virtual const ClassDef * getClassDef() const =0
void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex, bool addToNavIndex, const Definition *def)
virtual QCString getOutputFileBase() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
void addIndexFile(const QCString &name)
void addIndexItem(const Definition *context, const MemberDef *md, const QCString §ionAnchor, const QCString &title)
ClassDef * toClassDef(Definition *d)
bool fill(char c, int len=-1)
Fills a string with a predefined character
virtual DefType definitionType() const =0
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
NamespaceDef * toNamespaceDef(Definition *d)
static QCString htmlFileExtension
void term(const char *fmt,...)
const char * qPrint(const char *s)
virtual const FileDef * getFileDef() const =0
#define Config_getString(name)
QCString convertToXML(const QCString &s, bool keepEntities)
A model of a file symbol.
std::stack< bool > indentStack
FileDef * toFileDef(Definition *d)
std::unique_ptr< Private > p
virtual QCString briefDescriptionAsTooltip() const =0
A bunch of utility functions.
QCString right(size_t len) const
virtual MemberType memberType() const =0
virtual const GroupDef * getGroupDef() const =0
virtual bool isTemplate() const =0
Returns TRUE if this class is a template
This is an alternative implementation of QCString.