steghide  0.5.1
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
DummyFile Class Reference

a dummy CvrStgFile implementation to facilitate testing and debugging

#include <DummyFile.h>

Inheritance diagram for DummyFile:
CvrStgFile CvrStgObject

Public Member Functions

 DummyFile (UWORD16 s, std::vector< std::vector< bool > > *svam)
 
std::list< CvrStgFile::PropertygetProperties (void) const
 
unsigned long getNumSamples (void) const
 
void replaceSample (const SamplePos pos, const SampleValue *s)
 
SampleValuegetSampleValue (const SamplePos pos) const
 
std::vector< std::vector< bool > > * getSampleValueAdjacencyMatrix () const
 
- Public Member Functions inherited from CvrStgFile
 CvrStgFile (void)
 
virtual ~CvrStgFile (void)
 
virtual void read (BinaryIO *io)
 
virtual void write (void)
 
void transform (const std::string &fn)
 
virtual std::vector
< SampleValueAdjacencyList * > 
calcSVAdjacencyLists (const std::vector< SampleValue * > &svs) const
 
virtual std::vector
< MatchingAlgorithm * > 
getMatchingAlgorithms (Graph *g, Matching *m) const
 
const std::string & getName (void) const
 
bool is_std (void) const
 
unsigned long getCapacity (void) const
 
std::string getHRCapacity (void) const
 
unsigned short getSamplesPerVertex (void) const
 
UWORD32 getRadius (void) const
 
EmbValue getEmbValueModulus (void) const
 
virtual EmbValue getEmbeddedValue (const SamplePos pos) const
 

Static Public Member Functions

static void createGraph (std::vector< std::list< UWORD16 > > &adjlist, BitString **bs, CvrStgFile **f, Selector **s)
 
- Static Public Member Functions inherited from CvrStgFile
static CvrStgFilereadFile (const std::string &fn)
 

Private Attributes

std::vector< UWORD16Samples
 
std::vector< std::vector< bool > > * SampleValueAdjacencyMatrix
 

Static Private Attributes

static const unsigned short SamplesPerVertex = 2
 
static const EmbValue EmbValueModulus = 2
 

Additional Inherited Members

- Protected Member Functions inherited from CvrStgFile
void setSamplesPerVertex (unsigned short spv)
 
void setRadius (UWORD32 r)
 
void setEmbValueModulus (EmbValue m)
 
void setBinIO (BinaryIO *io)
 
BinaryIOgetBinIO (void) const
 

Constructor & Destructor Documentation

DummyFile::DummyFile ( UWORD16  s,
std::vector< std::vector< bool > > *  svam 
)

construct a DummyFile object containing the sample values 0,1,...,s-1

Parameters
sthe size of the DummyFile (i.e. the number of samples it should contain)
svamthe SampleValueAdjacencyMatrix for the Samples in this file

Member Function Documentation

void DummyFile::createGraph ( std::vector< std::list< UWORD16 > > &  adjlist,
BitString **  bs,
CvrStgFile **  f,
Selector **  s 
)
static

create a BitString, a DummyFile and a Selector that together will produce a graph like described by the adjacency list

Parameters
adjlistan adjacency list describing the "target graph"
bswill be filled with the BitString
fwill be filled with the DummyFile
swill be filled with the Selector

Constructing a Graph object with "Graph (*f, **bs, **s)" will result in a graph of the form of adjlist.

The constructed graph has the following form: SamplesPerVertex == 2, EmbValueModulus = 2 every vertex has a sample value with bit == 0 at index 0 and one with bit == 1 at index 1, if two vertices are adjacent, one end of the edge is at index 0 of the vertex with the lower vertex label and the other end of the edge is at index 1 of the vertex with the higher vertex label. The distance between vertex with label i and vertex with label j is : 2*|j - i| + 1

unsigned long DummyFile::getNumSamples ( void  ) const
virtual

get the number of samples in this CvrStgObject

Implements CvrStgObject.

std::list< CvrStgFile::Property > DummyFile::getProperties ( void  ) const
virtual

Implements CvrStgFile.

SampleValue * DummyFile::getSampleValue ( const SamplePos  pos) const
virtual

get the sample at position pos

Parameters
posthe position of a sample (must be in 0...getNumSamples()-1)
Returns
the sample at the given position

The sample object is created in this function and should be deleted by the caller. The derived class should check the condition(s) given above in its Implementation of this function.

Implements CvrStgObject.

std::vector<std::vector<bool> >* DummyFile::getSampleValueAdjacencyMatrix ( ) const
inline
void DummyFile::replaceSample ( const SamplePos  pos,
const SampleValue s 
)
virtual

replace a sample thus (possibly) altering the value of the bit returned by SampleValue->getBit()

Parameters
posthe position of the sample (must be in 0...getNumSamples()-1)
sthe sample value that should replace the current sample value (must be of correct type for this CvrStgObject)

The derived class should check the condition(s) given above in its Implementation of this function.

Implements CvrStgObject.

Member Data Documentation

const EmbValue DummyFile::EmbValueModulus = 2
staticprivate
std::vector<UWORD16> DummyFile::Samples
private
const unsigned short DummyFile::SamplesPerVertex = 2
staticprivate
std::vector<std::vector<bool> >* DummyFile::SampleValueAdjacencyMatrix
private

The documentation for this class was generated from the following files: