summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp
blob: 873cd8c8dd880161be8283c3d1365d8dfc20742d (plain)
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

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   copyright (C) 2004-2006                                               *
 *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
 ***************************************************************************/

/*  This code generated by:
 *      Author : thomas
 *      Date   : Tue Jun 24 2003
 */

#include "cppcodegenerator.h"

#include <tqregexp.h>

const char * CPPMakefileCodeDocument::DOCUMENT_ID_VALUE = "Makefile_DOC";

// Constructors/Destructors
//

CPPMakefileCodeDocument::CPPMakefileCodeDocument ( )
{
    setFileName("Makefile"); // default name
    setFileExtension("");
    setID(DOCUMENT_ID_VALUE); // default id tag for this type of document
}

CPPMakefileCodeDocument::~CPPMakefileCodeDocument ( ) { }

//
// Methods
//

// Other methods
//

// we add in our code blocks that describe how to generate
// the project here...
void CPPMakefileCodeDocument::updateContent( ) {
    // FIX : fill in content
}

/**
 * @return      TQString
 */
TQString CPPMakefileCodeDocument::toString ( ) {
    return "# cpp make build document";
}

// We overwritten by CPP language implementation to get lowercase path
TQString CPPMakefileCodeDocument::getPath ( )
{

    TQString path = getPackage();

    // Replace all white spaces with blanks
    path.simplifyWhiteSpace();

    // Replace all blanks with underscore
    path.tqreplace(TQRegExp(" "), "_");

    path.tqreplace(TQRegExp("\\."),"/");
    path.tqreplace(TQRegExp("::"),"/");

    path.lower();

    return path;

}


#include "cppmakecodedocument.moc"