[Uml-devel] KDE/kdesdk/umbrello/umbrello/docgenerators
Andi Fischer
andi.fischer at hispeed.ch
Sat Jan 31 16:38:12 UTC 2009
SVN commit 919271 by fischer:
Moving some documentation as it was done in the soc branche to reduce the differences to the branche.
M +1 -0 docbook2xhtmlgeneratorjob.h
M +16 -0 docbookgenerator.cpp
M +1 -19 docbookgenerator.h
M +27 -0 xhtmlgenerator.cpp
M +2 -30 xhtmlgenerator.h
--- trunk/KDE/kdesdk/umbrello/umbrello/docgenerators/docbook2xhtmlgeneratorjob.h #919270:919271
@@ -16,6 +16,7 @@
#include <QThread>
#include <kurl.h>
+
/**
* This class is used to generate XHTML from Docbook.
* It emits the name of the temporary file to which it as generated the XHtml as output.
--- trunk/KDE/kdesdk/umbrello/umbrello/docgenerators/docbookgenerator.cpp #919270:919271
@@ -45,6 +45,15 @@
DocbookGenerator::~DocbookGenerator() {}
+/**
+ * Exports the current model to docbook in a directory named as the model
+ * with the .xmi suffix removed. The docbook file will have the same name
+ * with the .docbook suffix. Figures will be named as the corresponding
+ * diagrams in the GUI
+ * @todo change file naming to avoid paths with spaces or non-ASCII chars
+ * @todo better handling of error conditions
+ * @return true if saving is successful and false otherwise.
+ */
bool DocbookGenerator::generateDocbookForProject()
{
KUrl url = umlDoc->url();
@@ -56,6 +65,13 @@
return true;
}
+/**
+ * Exports the current model to docbook in the given directory
+ * @param destDir the directory where the docbook file and the figures will
+ * be written
+ * @todo better handling of error conditions
+ * @return true if saving is successful and false otherwise.
+ */
void DocbookGenerator::generateDocbookForProjectInto(const KUrl& destDir)
{
m_destDir = destDir;
--- trunk/KDE/kdesdk/umbrello/umbrello/docgenerators/docbookgenerator.h #919270:919271
@@ -24,6 +24,7 @@
class UMLDoc;
class DocbookGeneratorJob;
+
/**
* class DocbookGenerator is a documentation generator for UML documents.
* It uses libxslt to convert the XMI generated by UMLDoc::saveToXMI through
@@ -49,31 +50,12 @@
*/
virtual ~DocbookGenerator();
- /**
- * Exports the current model to docbook in a directory named as the model
- * with the .xmi suffix removed. The docbook file will have the same name
- * with the .docbook suffix. Figures will be named as the corresponding
- * diagrams in the GUI
- * @todo change file naming to avoid paths with spaces or non-ASCII chars
- * @todo better handling of error conditions
- * @return true if saving is successful and false otherwise.
- */
bool generateDocbookForProject();
- /**
- * Exports the current model to docbook in the given directory
- * @param destDir the directory where the docbook file and the figures will
- * be written
- * @todo better handling of error conditions
- * @return true if saving is successful and false otherwise.
- */
void generateDocbookForProjectInto(const KUrl& destDir);
signals:
- /** Emitted when the documentation generation is finished
- * @param status true if success else false
- */
void finished(bool status);
private slots:
--- trunk/KDE/kdesdk/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp #919270:919271
@@ -43,6 +43,15 @@
XhtmlGenerator::~XhtmlGenerator(){}
+/**
+ * Exports the current model to XHTML in a directory named as the model
+ * with the .xmi suffix removed. The XHTML file will have the same name
+ * with the .html suffix. Figures will be named as the corresponding
+ * diagrams in the GUI
+ * @todo change file naming to avoid paths with spaces or non-ASCII chars
+ * @todo better handling of error conditions
+ * @return true if saving is successful and false otherwise.
+ */
bool XhtmlGenerator::generateXhtmlForProject()
{
KUrl url = umlDoc->url();
@@ -53,6 +62,13 @@
return generateXhtmlForProjectInto(url);
}
+/**
+ * Exports the current model to XHTML in the given directory
+ * @param destDir the directory where the XHTML file and the figures will
+ * be written
+ * @todo better handling of error conditions
+ * @return true if saving is successful and false otherwise.
+ */
bool XhtmlGenerator::generateXhtmlForProjectInto(const KUrl& destDir)
{
uDebug() << "First convert to docbook";
@@ -66,6 +82,11 @@
return true;
}
+/** This slot is triggerd when the first part, xmi to docbook, is
+ * finished
+ * @param docbookJob the job copying the docbook file to its destination.
+ * Used only for error reporting
+ */
void XhtmlGenerator::slotDocbookToXhtml(bool status)
{
uDebug() << "Now convert docbook to html...";
@@ -91,6 +112,9 @@
}
}
+/** Triggered when the copying of the HTML result file is finished. Emits
+ * the signal finished().
+ */
void XhtmlGenerator::slotHtmlGenerated(const QString& tmpFileName)
{
@@ -132,6 +156,9 @@
emit finished( m_pStatus );
}
+/**
+ * Invoked when a thread is finished
+ */
void XhtmlGenerator::threadFinished() {
m_pThreadFinished = true;
delete d2xg;
--- trunk/KDE/kdesdk/umbrello/umbrello/docgenerators/xhtmlgenerator.h #919270:919271
@@ -25,6 +25,7 @@
class UMLDoc;
class Docbook2XhtmlGeneratorJob;
+
/**
* class XhtmlGenerator is a documentation generator for UML documents.
* It uses first @ref DocbookGenerator to convert the XMI generated by
@@ -51,50 +52,20 @@
*/
virtual ~XhtmlGenerator();
- /**
- * Exports the current model to XHTML in a directory named as the model
- * with the .xmi suffix removed. The XHTML file will have the same name
- * with the .html suffix. Figures will be named as the corresponding
- * diagrams in the GUI
- * @todo change file naming to avoid paths with spaces or non-ASCII chars
- * @todo better handling of error conditions
- * @return true if saving is successful and false otherwise.
- */
bool generateXhtmlForProject();
- /**
- * Exports the current model to XHTML in the given directory
- * @param destDir the directory where the XHTML file and the figures will
- * be written
- * @todo better handling of error conditions
- * @return true if saving is successful and false otherwise.
- */
bool generateXhtmlForProjectInto(const KUrl& destDir);
signals:
- /** Emitted when the documentation generation is finished
- * @param status true if success else false
- */
void finished(bool status);
protected slots:
- /** This slot is triggerd when the first part, xmi to docbook, is
- * finished
- * @param docbookJob the job copying the docbook file to its destination.
- * Used only for error reporting
- */
void slotDocbookToXhtml(bool);
- /** Triggered when the copying of the HTML result file is finished. Emits
- * the signal finished().
- */
void slotHtmlGenerated(const QString&);
- /**
- * Invoked when a thread is finished
- */
void threadFinished();
private:
@@ -103,6 +74,7 @@
bool m_pStatus;
bool m_pThreadFinished;
+
/** The destination directory where the final documentation will be
* written.
*/
More information about the umbrello-devel
mailing list