0.3.1
[qanava.git] / src / qanEdge.cpp
bloba5cea30e0ff20720581709785fec3f91c952431d
1 /*
2 Qanava - Graph drawing library for QT
3 Copyright (C) 2006 Benoit AUTHEMAN
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 //-----------------------------------------------------------------------------
21 // This file is a part of the Qanava software.
23 // \file laEdge.cpp
24 // \author Benoit Autheman (benoit@libqanava.org)
25 // \date 2004 February 15
26 //-----------------------------------------------------------------------------
29 // Qanava headers
30 #include "./qanEdge.h"
31 #include "./qanNode.h"
34 namespace qan { // ::qan
36 void Edge::set( Node* src, Node* dst )
38 if ( src != 0 && dst != 0 )
40 _src = src; _dst = dst;
41 src->addOutEdge( *this );
42 dst->addInEdge( *this );
46 } // ::qan