~ubuntu-branches/ubuntu/intrepid/kdesdk/intrepid-updates

« back to all changes in this revision

Viewing changes to umbrello/umbrello/codegenerators/dcodecomment.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-05-28 10:11:43 UTC
  • mto: This revision was merged to the branch mainline in revision 37.
  • Revision ID: james.westby@ubuntu.com-20080528101143-gzc3styjz1b70zxu
Tags: upstream-4.0.80
Import upstream version 4.0.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/***************************************************************************
 
3
 *                                                                         *
 
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.                                   *
 
8
 *                                                                         *
 
9
 *   copyright (C) 2007 Jari-Matti Mäkelä <jmjm@iki.fi>                    *
 
10
 *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
 
11
 ***************************************************************************/
 
12
 
 
13
#ifndef DCODECOMMENT_H
 
14
#define DCODECOMMENT_H
 
15
 
 
16
#include <qstring.h>
 
17
#include "../codecomment.h"
 
18
 
 
19
/**
 
20
  * A class representing a D code comment.
 
21
  *
 
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.
 
24
  */
 
25
class DCodeComment : virtual public CodeComment
 
26
{
 
27
    Q_OBJECT
 
28
public:
 
29
 
 
30
    /**
 
31
     * Constructors
 
32
     */
 
33
    explicit DCodeComment ( CodeDocument * doc, const QString & text = "");
 
34
 
 
35
    /**
 
36
     * Empty Destructor
 
37
     */
 
38
    virtual ~DCodeComment ( );
 
39
 
 
40
 
 
41
    /**
 
42
     * Save the XMI representation of this object.
 
43
     */
 
44
    virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
 
45
 
 
46
    /**
 
47
     * Creates a comment block.
 
48
     *
 
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.
 
51
     *
 
52
     * @return  QString Comment block source code.
 
53
     */
 
54
    QString toString ( ) const;
 
55
 
 
56
    /**
 
57
     * UnFormat a long text string. Typically, this means removing
 
58
     * the indentaion (linePrefix) and/or newline chars from each line.
 
59
     */
 
60
    virtual QString unformatText ( const QString & text, const QString & indent = "" );
 
61
 
 
62
    /**
 
63
     * A special version here because we want to not only indent
 
64
     * the new line, but to add the "//" sequence as well.
 
65
     */
 
66
    virtual QString getNewEditorLine ( int amount );
 
67
};
 
68
 
 
69
#endif // DCODECOMMENT_H