Warning, file /office/calligra/libs/main/KoFilterEdge.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the Calligra libraries 0002 Copyright (C) 2001 Werner Trobin <trobin@kde.org> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This library is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this library; see the file COPYING.LIB. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 Boston, MA 02110-1301, USA. 0018 */ 0019 #ifndef KOFILTEREDGE_H 0020 #define KOFILTEREDGE_H 0021 0022 #include "KoFilterChain.h" 0023 #include "PriorityQueue_p.h" 0024 0025 namespace CalligraFilter { 0026 /** 0027 * An internal class representing a filter (=edge) in the filter graph. 0028 * @internal 0029 */ 0030 class Edge 0031 { 0032 0033 public: 0034 // creates a new edge to "vertex" with the given weight. 0035 Edge(Vertex* vertex, KoFilterEntry::Ptr filterEntry); 0036 ~Edge() {} 0037 0038 unsigned int weight() const { 0039 return m_filterEntry ? m_filterEntry->weight : 0; 0040 } 0041 KoFilterEntry::Ptr filterEntry() const { 0042 return m_filterEntry; 0043 } 0044 const Vertex* vertex() const { 0045 return m_vertex; 0046 } 0047 0048 // Relaxes the "connected" vertex (i.e. the weight of the 0049 // connected vertex = "predec.->key()" (parameter) + weight of this edge 0050 // As this will only be called once we calculate the weight 0051 // of the edge "on the fly" 0052 // Note: We have to pass the queue as we have to call keyDecreased :} 0053 void relax(const Vertex* predecessor, PriorityQueue<Vertex>& queue); 0054 0055 // debugging 0056 void dump(const QByteArray& indent) const; 0057 0058 private: 0059 Edge(const Edge& rhs); 0060 Edge& operator=(const Edge& rhs); 0061 0062 Vertex* m_vertex; 0063 KoFilterEntry::Ptr m_filterEntry; 0064 0065 class Private; 0066 Private * const d; 0067 }; 0068 } 0069 0070 #endif // KOFILTEREDGE_H