steghide  0.5.1
Vertex.h
Go to the documentation of this file.
1 /*
2  * steghide 0.5.1 - a steganography program
3  * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program 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
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  *
19  */
20 
21 #ifndef SH_VERTEX_H
22 #define SH_VERTEX_H
23 
24 #include "CvrStgFile.h"
25 #include "common.h"
26 
27 class Edge ;
28 class SampleOccurence ;
29 class SampleValue ;
30 
43 class Vertex {
44  public:
52  Vertex (VertexLabel l, SamplePos* sposs, SampleValue** svalues, EmbValue t) ;
53 
54  ~Vertex (void) ;
55 
61  SamplePos getSamplePos (unsigned short i) const
62  { return SamplePositions[i] ; } ;
63 
69  SampleValue* getSampleValue (unsigned short i) const
70  { return SampleValues[i] ; } ;
71 
75  UWORD32 getDegree (void) const ;
76 
80  Edge *getShortestEdge (void) const
81  { return ShortestEdge ; } ;
82 
86  void updateShortestEdge (void) ;
87 
91  void markDeleted (void) ;
92 
96  void unmarkDeleted (void) ;
97 
98  VertexLabel getLabel (void) const
99  { return Label ; } ;
100 
102  { Label = l ; } ;
103 
104  void setSampleOccurenceIt (unsigned short i, std::list<SampleOccurence>::iterator it)
105  { SampleOccurenceIts[i] = it ; }
106 
107  EmbValue getEmbeddedValue (void) const ;
108 
109  EmbValue getTargetValue (unsigned short i) const
110  { return TargetValues[i] ; } ;
111 
112  void print (unsigned short spc = 0) const ;
113  void printEdges (void) const ;
114 
115  private:
118 
121 
124 
127 
129  std::list<SampleOccurence>::iterator* SampleOccurenceIts ;
130 
133 
135  bool valid ;
136 
138  unsigned short SelfDegree ;
139 } ;
140 
141 #endif // ndef SH_VERTEX_H
SamplePos
UWORD32 SamplePos
Definition: common.h:67
CvrStgFile.h
Vertex::SampleOccurenceIts
std::list< SampleOccurence >::iterator * SampleOccurenceIts
point to entries in std::lists of sample occurences in the graph
Definition: Vertex.h:129
UWORD32
unsigned long UWORD32
Definition: common.h:45
Vertex::ShortestEdge
Edge * ShortestEdge
the shortest edge of this vertex (as calculated by updateShortestEdge)
Definition: Vertex.h:132
Vertex::updateShortestEdge
void updateShortestEdge(void)
Definition: Vertex.cc:128
Vertex::getDegree
UWORD32 getDegree(void) const
Definition: Vertex.cc:155
Vertex::Vertex
Vertex(VertexLabel l, SamplePos *sposs, SampleValue **svalues, EmbValue t)
Definition: Vertex.cc:28
VertexLabel
UWORD32 VertexLabel
Definition: common.h:68
Vertex::SelfDegree
unsigned short SelfDegree
the number of loop edges (loop edges are not valid edges)
Definition: Vertex.h:138
SampleValue
the value of a sample in a CvrStgFile
Definition: SampleValue.h:61
Vertex::print
void print(unsigned short spc=0) const
Definition: Vertex.cc:166
EmbValue
BYTE EmbValue
Definition: common.h:66
Vertex::setSampleOccurenceIt
void setSampleOccurenceIt(unsigned short i, std::list< SampleOccurence >::iterator it)
Definition: Vertex.h:104
Vertex::valid
bool valid
true iff this vertex is not deleted
Definition: Vertex.h:135
Vertex::SamplePositions
SamplePos * SamplePositions
the sample positions of the samples described by this vertex in the CvrStgFile
Definition: Vertex.h:120
Vertex::markDeleted
void markDeleted(void)
Definition: Vertex.cc:80
Vertex::getShortestEdge
Edge * getShortestEdge(void) const
Definition: Vertex.h:80
Vertex::getEmbeddedValue
EmbValue getEmbeddedValue(void) const
Definition: Vertex.cc:145
common.h
Edge
Definition: Edge.h:28
Vertex::getSampleValue
SampleValue * getSampleValue(unsigned short i) const
Definition: Vertex.h:69
Vertex::getSamplePos
SamplePos getSamplePos(unsigned short i) const
Definition: Vertex.h:61
Vertex::setLabel
void setLabel(VertexLabel l)
Definition: Vertex.h:101
Vertex::Label
VertexLabel Label
the vertex label of this vertex
Definition: Vertex.h:117
Vertex::printEdges
void printEdges(void) const
Definition: Vertex.cc:192
Vertex::TargetValues
EmbValue * TargetValues
the target values for the sample values (exactly one of them has to be reached (and the other left un...
Definition: Vertex.h:126
Vertex::getTargetValue
EmbValue getTargetValue(unsigned short i) const
Definition: Vertex.h:109
Vertex
a vertex in a graph
Definition: Vertex.h:43
Vertex::SampleValues
SampleValue ** SampleValues
the sample values at the SamplePositions
Definition: Vertex.h:123
Vertex::~Vertex
~Vertex(void)
Definition: Vertex.cc:71
Vertex::unmarkDeleted
void unmarkDeleted(void)
Definition: Vertex.cc:104
Vertex::getLabel
VertexLabel getLabel(void) const
Definition: Vertex.h:98
SampleOccurence
Definition: SampleOccurence.h:26