Vertex.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_VERTEX_H
00022 #define SH_VERTEX_H
00023 
00024 #include "CvrStgFile.h"
00025 #include "common.h"
00026 
00027 class Edge ;
00028 class SampleOccurence ;
00029 class SampleValue ;
00030 
00043 class Vertex {
00044         public:
00052         Vertex (VertexLabel l, SamplePos* sposs, SampleValue** svalues, EmbValue t) ;
00053 
00054         ~Vertex (void) ;
00055 
00061         SamplePos getSamplePos (unsigned short i) const
00062                 { return SamplePositions[i] ; } ;
00063 
00069         SampleValue* getSampleValue (unsigned short i) const
00070                 { return SampleValues[i] ; } ;
00071 
00075         UWORD32 getDegree (void) const ;
00076 
00080         Edge *getShortestEdge (void) const
00081                 { return ShortestEdge ; } ;
00082 
00086         void updateShortestEdge (void) ;
00087 
00091         void markDeleted (void) ;
00092 
00096         void unmarkDeleted (void) ;
00097 
00098         VertexLabel getLabel (void) const
00099                 { return Label ; } ;
00100 
00101         void setLabel (VertexLabel l)
00102                 { Label = l ; } ;
00103 
00104         void setSampleOccurenceIt (unsigned short i, std::list<SampleOccurence>::iterator it)
00105                 { SampleOccurenceIts[i] = it ; }
00106 
00107         EmbValue getEmbeddedValue (void) const ;
00108 
00109         EmbValue getTargetValue (unsigned short i) const
00110                 { return TargetValues[i] ; } ;
00111 
00112         void print (unsigned short spc = 0) const ;
00113         void printEdges (void) const ;
00114 
00115         private:
00117         VertexLabel Label ;
00118 
00120         SamplePos* SamplePositions ;
00121 
00123         SampleValue** SampleValues ;
00124 
00126         EmbValue* TargetValues ;
00127 
00129         std::list<SampleOccurence>::iterator* SampleOccurenceIts ;
00130 
00132         Edge *ShortestEdge ;
00133 
00135         bool valid ;
00136 
00138         unsigned short SelfDegree ;
00139 } ;
00140 
00141 #endif // ndef SH_VERTEX_H

Generated on Fri Feb 2 09:21:49 2007 for steghide by  doxygen 1.5.1