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

« back to all changes in this revision

Viewing changes to umbrello/umbrello/codegenerators/perlwriter.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:
27
27
class UMLClassifier;
28
28
 
29
29
/**
30
 
  * class PerlWriter is a Perl code generator for UMLClassifier objects
31
 
  * Just call writeClass and feed it a UMLClassifier;
32
 
  */
33
 
class PerlWriter : public SimpleCodeGenerator {
 
30
 * Class PerlWriter is a Perl code generator for UMLClassifier objects.
 
31
 * Just call writeClass and feed it a UMLClassifier.
 
32
 */
 
33
class PerlWriter : public SimpleCodeGenerator
 
34
{
34
35
    Q_OBJECT
35
36
public:
36
37
 
38
39
    virtual ~PerlWriter();
39
40
 
40
41
    /**
41
 
      * call this method to generate Perl code for a UMLClassifier
42
 
      * @param c the class you want to generate code for.
43
 
      */
 
42
     * Call this method to generate Perl code for a UMLClassifier.
 
43
     * @param c   the class you want to generate code for
 
44
     */
44
45
    virtual void writeClass(UMLClassifier *c);
45
46
 
46
47
    /**
47
 
     * returns "Perl"
 
48
     * Returns "Perl".
 
49
     * @return   the programming language identifier
48
50
     */
49
51
    virtual Uml::Programming_Language getLanguage();
50
52
 
51
53
    /**
52
 
     * get list of reserved keywords
 
54
     * Get list of reserved keywords.
 
55
     * @return   the list of reserved keywords
53
56
     */
54
57
    virtual const QStringList reservedKeywords() const;
55
58
 
 
59
    /**
 
60
     * Get list of default datatypes.
 
61
     * @return   the list of default datatypes
 
62
     */
56
63
    QStringList defaultDatatypes();
57
64
 
58
65
private:
59
66
 
60
67
    /**
61
 
     * we do not want to write the comment "Private methods" twice
62
 
     * not sure whether this is php specific
 
68
     * We do not want to write the comment "Private methods" twice
 
69
     * not sure whether this is php specific.
63
70
     */
64
71
    bool bPrivateSectionCommentIsWritten;
65
72
 
66
73
    /**
67
 
      * write all operations for a given class
68
 
      *
69
 
      * @param c the concept we are generating code for
70
 
      * @param perl output stream for the Perl file
71
 
      */
 
74
     * Write all operations for a given class.
 
75
     *
 
76
     * @param c      the concept we are generating code for
 
77
     * @param perl   output stream for the Perl file
 
78
     */
72
79
    void writeOperations(UMLClassifier *c, QTextStream &perl);
73
80
 
74
81
    /**
75
 
      * write a list of class operations
76
 
      *
77
 
      * @param classname the name of the class
78
 
      * @param opList the list of operations
79
 
      * @param perl output stream for the Perl file
80
 
      */
 
82
     * Write a list of class operations.
 
83
     *
 
84
     * @param classname   the name of the class
 
85
     * @param opList      the list of operations
 
86
     * @param perl        output stream for the Perl file
 
87
     */
81
88
    void writeOperations(const QString &classname, UMLOperationList &opList,
82
89
                         QTextStream &perl);
83
90
 
84
 
    /** write all the attributes of a class
85
 
      * @param c the class we are generating code for
86
 
      * @param perl output stream for the Perl file
87
 
      */
 
91
    /**
 
92
     * Write all the attributes of a class.
 
93
     * @param c      the class we are generating code for
 
94
     * @param perl   output stream for the Perl file
 
95
     */
88
96
    void writeAttributes(UMLClassifier *c, QTextStream &perl);
89
97
 
90
 
    /** write a list of class attributes
91
 
      * @param atList the list of attributes
92
 
      * @param perl output stream for the Perl file
93
 
      */
 
98
    /**
 
99
     * Write a list of class attributes.
 
100
     * @param atList   the list of attributes
 
101
     * @param perl     output stream for the Perl file
 
102
     */
94
103
    void writeAttributes(UMLAttributeList &atList, QTextStream &perl);
95
104
 
96
105
    bool GetUseStatements(UMLClassifier *c, QString &Ret,