Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Edge.h

Go to the documentation of this file.
00001 /* 00002 * steghide 0.5.1 - a steganography program 00003 * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at> 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 * 00019 */ 00020 00021 #ifndef SH_EDGE_H 00022 #define SH_EDGE_H 00023 00024 #include "SampleValue.h" 00025 #include "Vertex.h" 00026 #include "common.h" 00027 00028 class Edge { 00029 public: 00033 Edge (void) 00034 : Vertex1(NULL), Index1(0), Vertex2(NULL), Index2(0), Weight(UWORD32_MAX) {} ; 00035 00039 Edge (Vertex *v1, unsigned short idx1, Vertex *v2, unsigned short idx2) ; 00040 00044 Edge (const Edge& e) ; 00045 00046 Vertex *getVertex1 (void) const 00047 { return Vertex1 ; } ; 00048 00049 void setVertex1 (Vertex* v) 00050 { Vertex1 = v ; } ; 00051 00052 Vertex *getVertex2 (void) const 00053 { return Vertex2 ; } ; 00054 00055 unsigned short getIndex1 (void) const 00056 { return Index1 ; } ; 00057 00058 void setIndex1 (unsigned short i) 00059 { Index1 = i ; } ; 00060 00061 unsigned short getIndex2 (void) const 00062 { return Index2 ; } ; 00063 00064 UWORD32 getWeight (void) ; 00065 00066 void set (Vertex* v1, unsigned short idx1, Vertex* v2, unsigned short idx2) ; 00067 00068 void set1 (Vertex* v1, unsigned short idx1) ; 00069 00070 void set2 (Vertex* v2, unsigned short idx2) ; 00071 00072 bool operator== (const Edge& e) const ; 00073 00074 bool operator!= (const Edge& e) const ; 00075 00079 void swap (void) ; 00080 00084 bool contains (const Vertex *v) const ; 00085 00089 Vertex *getOtherVertex (const Vertex *v) const ; 00090 00094 SamplePos getSamplePos (Vertex* v) const ; 00095 00099 SampleValue *getOriginalSampleValue (Vertex *v) const ; 00100 00104 SampleValue *getReplacingSampleValue (Vertex *v) const ; 00105 00106 void print (unsigned short spc = 0) const ; 00107 00108 private: 00109 Vertex *Vertex1 ; 00111 unsigned short Index1 ; 00112 00113 Vertex *Vertex2 ; 00115 unsigned short Index2 ; 00116 00117 UWORD32 Weight ; 00118 } ; 00119 00120 #endif // ndef SH_EDGE_H

Generated on Fri Jul 16 19:41:20 2004 for steghide by doxygen 1.3.7