File: UmlItem.h

package info (click to toggle)
bouml 4.21-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 73,336 kB
  • ctags: 55,459
  • sloc: cpp: 290,644; makefile: 228; sh: 13
file content (135 lines) | stat: -rw-r--r-- 3,099 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#ifndef _UMLITEM_H
#define _UMLITEM_H


#include "UmlBaseItem.h"
#include <qcstring.h>
#include "aLanguage.h"
#include "aVisibility.h"
#include "aDirection.h"
#include "aParameterEffectKind.h"
#include "anOrdering.h"
#include "Vector.h"
#include "FileWriter.h"

#include <qtextstream.h>
class UmlDiagram;
class UmlTypeSpec;

// This class is a mother class for all the other Uml* classes, this
// allows to generalize their management, declare virtual operations etc ...
//
// You can modify it as you want (except the constructor)
class UmlItem : public UmlBaseItem {
  public:
    UmlItem(void * id, const QCString & n) : UmlBaseItem(id, n), known(FALSE) { };

    virtual ~UmlItem();

    //returns a string indicating the king of the element
    virtual QCString sKind();

    //  Set the directory where the files will be generated
    //  initializing 'directory'.
    //
    //  May be remove already existing html files and css
    
    void set_dir(int argc, char ** argv);

    virtual void memo_ref();

    void define();

    static void start_file(QCString f, QCString s, bool withrefs);

    static void end_file();

    static void ref_indexes();

    static void generate_indexes();

    static void frame();

    //entry to produce the html code receiving chapter number
    //path, rank in the mother and level in the browser tree
    virtual void html(QCString pfix, unsigned int rank, unsigned int level) = 0;

    virtual bool chapterp();

    void html(QCString pfix, unsigned int rank, QCString what, unsigned int level, QCString kind);

    void html(const char * what, UmlDiagram * diagram);

    void write_children(QCString pfix, unsigned int rank, unsigned int level);

    void write_dependencies();

    void write_properties();

    void chapter(QCString k, QCString pfix, unsigned int rank, QCString kind, unsigned int level);

    //bypass the comments at the beginning of the form
    
    const char * bypass_comment(const char * s);

    void manage_alias(const char *& p);

    virtual void write();

    virtual void write(QCString target);

    static void writeq(QCString s);

    static void writeq(char c);

    static void write(const UmlTypeSpec & t, aLanguage lang);

    static void write(const UmlTypeSpec & t);

    static void write(aVisibility v, aLanguage lang);

    static void write(aVisibility v);

    static void write(aDirection d);

    static void write(aParameterEffectKind d);

    static void write(anOrdering d);

    static void generate_index(Vector & v, QCString k, QCString r);

    static void sort(Vector & v);


  private:
    static void sort(Vector & v, int low, int high);

    bool gt(UmlItem * other);


  public:
    virtual QCString pretty_name();


  protected:
    static Vector all;

    bool known;

    static FileWriter fw;

    static QCString directory;

    static unsigned int nrefs;

    static QCString letters;

    //true => use SVG picture rather than PNG
    static bool flat;

    //true => classes and tables are generated in index.html, else an own files are generated
    static bool svg;

};

#endif