1
//------------------------------------------------------------------------------
3
// This file is part of Toolkit for Conceptual Modeling (TCM).
4
// (c) copyright 1999, Vrije Universiteit Amsterdam and University of Twente.
5
// Author: Frank Dehne (frank@cs.vu.nl).
6
// Author: Henk van de Zandschulp (henkz@cs.utwente.nl).
8
// TCM is free software; you can redistribute it and/or modify
9
// it under the terms of the GNU General Public License as published by
10
// the Free Software Foundation; either version 2 of the License, or
11
// (at your option) any later version.
13
// TCM is distributed in the hope that it will be useful,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
// GNU General Public License for more details.
18
// You should have received a copy of the GNU General Public License
19
// along with TCM; if not, write to the Free Software Foundation, Inc.,
20
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
//-----------------------------------------------------------------------------
25
#include "erdiagram.h"
26
#include "stringlistnode.h"
32
class StringListNode2;
34
/// UML static structure diagram class.
35
class ESDDiagram : public ERDiagram {
36
/*@Doc: {\large {\bf scope:} TESD} */
39
ESDDiagram(Config *, ESDWindow *, SSDViewer *, SSDGraph *);
41
virtual ~ESDDiagram();
45
Edge *CreateEdge(Subject *n1, Subject *n2);
47
NodeShape *CreateNodeShape(Node *node, int x, int y);
49
Line *CreateLine(Edge *edge, GShape *fromShape,
50
GShape *toShape, List<Point *> *line);
52
void UpdateNodeType(int n);
54
void UpdateEdgeType(int n);
57
bool SetText(TextShape *t, const string *s);
59
/// Set Attribute in class obj at position nr.
60
bool SetAttribute(StringListNode *n, const string *s, unsigned nr);
62
/// Set nr-th role name of subject. Check name syntax.
63
bool SetRoleName(Subject *subj, const string *s, unsigned nr);
65
/// check the soft constraints on a ESD.
69
/// Give error after failing to update attribute or operation.
70
void MakeErrorMessage(StringListNode *node,
71
StringListNode::StringErrorType result,
72
const string *s, string *text);
74
Thing *CreateThing(int classNr);
76
SSDChecks *GetSSDChecks() {return ssdChecks;}
79
static const int MINI_ELLIPSE_WIDTH;
81
static const int MINI_ELLIPSE_HEIGHT;