2
/***************************************************************************
4
* This program is free software; you can redistribute it and/or modify *
5
* it under the terms of the GNU General Public License as published by *
6
* the Free Software Foundation; either version 2 of the License, or *
7
* (at your option) any later version. *
9
* copyright (C) 2007 Jari-Matti Mäkelä <jmjm@iki.fi> *
10
* Umbrello UML Modeller Authors <uml-devel@uml.sf.net> *
11
***************************************************************************/
13
#ifndef DCODECOMMENT_H
14
#define DCODECOMMENT_H
17
#include "../codecomment.h"
20
* A class representing a D code comment.
22
* The syntax follows the D Style Guide (@see http://www.digitalmars.com/d/dstyle.html).
23
* Single line comments begin with // and multiline comments use the longer form.
25
class DCodeComment : virtual public CodeComment
33
explicit DCodeComment ( CodeDocument * doc, const QString & text = "");
38
virtual ~DCodeComment ( );
42
* Save the XMI representation of this object.
44
virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
47
* Creates a comment block.
49
* The syntax follows the D Style Guide (@see http://www.digitalmars.com/d/dstyle.html).
50
* Single line comments begin with // and multiline comments use the longer form.
52
* @return QString Comment block source code.
54
QString toString ( ) const;
57
* UnFormat a long text string. Typically, this means removing
58
* the indentaion (linePrefix) and/or newline chars from each line.
60
virtual QString unformatText ( const QString & text, const QString & indent = "" );
63
* A special version here because we want to not only indent
64
* the new line, but to add the "//" sequence as well.
66
virtual QString getNewEditorLine ( int amount );
69
#endif // DCODECOMMENT_H