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

SSD Namespace Reference


Classes

class  Diff
 quasi-abstract class for a diff More...
class  NodeAssignments
 a reference counting list carrying two Node* as data this is a reference counting list since we are not going to use it a true list, but it can grow into different directions. The real structure will look like a tree, but with the children pointing to its parents. More...
class  DiffDijkstraState
 state object for the Dijkstra search we are implementing More...
struct  DiffDijkstraStateQueue
 sorting function used for sorting the state queue More...
class  DiffDijkstra
 Dijkstra search core object. More...
class  Doc
 Document wrapper class this class wraps around a document, in the current version only XML documents are supported, but other similar formats might be added later on (by making Doc an abstract class and deriving from it. More...
class  Node
 Class encapsulating a single node this is an abstraction layer away from the libxml data structure while allowing at the same time storage of additional information. More...
class  NodeEqClass
 Key for a node equality class, and hash function. More...
struct  hash_NEqC
 C++ hash function object uses the has function supplied in the object code. More...
class  MarkedWriter
 Output writer for the "marked" output format. More...
class  MergedWriter
 Output writer class for the "merged" format. More...
class  XUpdateWriter
 XUpdate output writer class. More...
class  RelCount
 relation count class More...
class  RelEqClass
 Relation Equality Class - get the equality class for two given nodes. More...
struct  hash_releqc
 hash functor for relation equality classes More...
struct  eq_str
 equality functor for char* strings More...
class  ustring
 Class which stores each string only once and enables faster comparision. More...
struct  hash_ustring
 hash functor for ustrings in maps More...

Typedefs

typedef vector< Node * > NodeVec
 Explicit notation is easier to read and easier to change.
typedef hash_map< NodeEqClass,
NodeVec, hash_NEqC
NodeEqClassVec
 shorthand for template construct

Functions

int process_relations (Node *n1, Node *n2, RelCount *rc, int dir, const DiffDijkstraState *state, map< NodeEqClass, int > **c, int *credits_used)
std::ostream & operator<< (std::ostream &out, const Node &node)
std::ostream & operator<< (std::ostream &out, const NodeEqClass ec)
void calcLIS (vector< pair< xmlNodePtr, xmlNodePtr > > &p1, vector< xmlNodePtr > &p2, vector< pair< xmlNodePtr, xmlNodePtr > > &lcs)
 calculate the longest increasing subsequence efficiently
static void markNode (xmlNode *node, xmlChar *text, xmlNsPtr ns)
static void xmlAppendNsProp (xmlNodePtr node, xmlNsPtr ns, const xmlChar *name, const xmlChar *buf, const xmlChar *sep)
void attr_diff (xmlNodePtr diff, xmlNsPtr ns, xmlNodePtr p1, xmlNodePtr p2, hash_map< xmlNodePtr, xmlNodePtr, hash< void * > > &map, set< xmlNodePtr > &known, int output_only)
void rec_diff (xmlNodePtr diff, xmlNsPtr ns, xmlNodePtr p1, xmlNodePtr p2, hash_map< xmlNodePtr, xmlNodePtr, hash< void * > > &map, set< xmlNodePtr > &known, int output_only)
std::ostream & operator<< (std::ostream &out, const RelCount &rc)
std::ostream & operator<< (std::ostream &out, const RelEqClass &ec)
std::ostream & operator<< (std::ostream &out, const ustring &str)
static ustring empty_ustring ((char *) NULL)
 globally named "empty" string to compare with


Typedef Documentation

typedef hash_map< NodeEqClass, NodeVec, hash_NEqC > SSD::NodeEqClassVec
 

shorthand for template construct

Definition at line 92 of file node_eqclass.h.

typedef vector<Node*> SSD::NodeVec
 

Explicit notation is easier to read and easier to change.

Definition at line 29 of file node.h.


Function Documentation

void SSD::attr_diff xmlNodePtr  diff,
xmlNsPtr  ns,
xmlNodePtr  p1,
xmlNodePtr  p2,
hash_map< xmlNodePtr, xmlNodePtr, hash< void * > > &  map,
set< xmlNodePtr > &  known,
int  output_only
 

Definition at line 74 of file out_merged.cc.

References A_DELETED, A_INSERTED, A_MOVED_HERE, A_SEPARATOR, OUTPUT_FIRST, OUTPUT_SECOND, REM_ATTR, and xmlAppendNsProp().

Referenced by rec_diff().

Here is the call graph for this function:

void SSD::calcLIS vector< pair< xmlNodePtr, xmlNodePtr > > &  p1,
vector< xmlNodePtr > &  p2,
vector< pair< xmlNodePtr, xmlNodePtr > > &  lis
 

calculate the longest increasing subsequence efficiently

common function used by many output writers. This corresponds to the use of LCS in other diff algorithms, we try to minimize the number of move operations this way.

Parameters:
p1 a list of node pairs (in doc1, in doc2),
p2 a list of nodes in doc2 only
lis return vector, sublist of p1, and second parameters sublist of p2, too

Definition at line 23 of file out_common.cc.

Referenced by rec_diff(), and SSD::XUpdateWriter::recDiff().

static ustring SSD::empty_ustring (char *)  NULL  )  [static]
 

globally named "empty" string to compare with

Referenced by SSD::Doc::appendNodeElement(), and SSD::Doc::appendNodeText().

static void SSD::markNode xmlNode *  node,
xmlChar *  text,
xmlNsPtr  ns
[static]
 

Definition at line 25 of file out_marked.cc.

Referenced by rec_diff(), and SSD::MarkedWriter::run().

std::ostream& SSD::operator<< std::ostream &  out,
const ustring &  str
 

Parameters:
out output stream to be appended to
str unified string to be appended

Definition at line 81 of file ustring.cc.

References SSD::ustring::cstr.

std::ostream& SSD::operator<< std::ostream &  out,
const RelEqClass &  ec
 

Definition at line 30 of file rel_eqclass.cc.

References SSD::RelEqClass::fc, SSD::RelEqClass::fl, SSD::RelEqClass::sc, and SSD::RelEqClass::sl.

std::ostream& SSD::operator<< std::ostream &  out,
const RelCount &  rc
 

Parameters:
out output stream to be appended to
rc RelCount dataset to be dumped

Definition at line 118 of file rel_count.cc.

References SSD::RelCount::data, and SSD::RelCount::len.

std::ostream& SSD::operator<< std::ostream &  out,
const NodeEqClass  ec
 

Definition at line 22 of file node_eqclass.cc.

References SSD::NodeEqClass::content, and SSD::NodeEqClass::label.

std::ostream& SSD::operator<< std::ostream &  out,
const Node &  node
 

Definition at line 38 of file node.cc.

References SSD::Node::content, and SSD::Node::label.

int SSD::process_relations Node *  n1,
Node *  n2,
RelCount *  rc,
int  dir,
const DiffDijkstraState *  state,
map< NodeEqClass, int > **  c,
int *  credits_used
 

Definition at line 37 of file diff.cc.

References SSD::DiffDijkstraState::findNodeAssignment1(), SSD::DiffDijkstraState::findNodeAssignment2(), SSD::RelCount::modify(), SSD::NodeAssignments::n2, SSD::Node::reldown, and SSD::Node::relup.

Referenced by SSD::DiffDijkstra::makeState().

Here is the call graph for this function:

void SSD::rec_diff xmlNodePtr  diff,
xmlNsPtr  ns,
xmlNodePtr  p1,
xmlNodePtr  p2,
hash_map< xmlNodePtr, xmlNodePtr, hash< void * > > &  map,
set< xmlNodePtr > &  known,
int  output_only
 

Definition at line 188 of file out_merged.cc.

References attr_diff(), calcLIS(), DELETED, INS_TEXT, INSERTED, markNode(), MOVED_AWAY, MOVED_HERE, OUTPUT_FIRST, OUTPUT_SECOND, and REM_TEXT.

Referenced by SSD::MergedWriter::run().

Here is the call graph for this function:

static void SSD::xmlAppendNsProp xmlNodePtr  node,
xmlNsPtr  ns,
const xmlChar *  name,
const xmlChar *  buf,
const xmlChar *  sep
[static]
 

Definition at line 57 of file out_merged.cc.

Referenced by attr_diff().


Generated on Thu Aug 4 17:58:35 2005 for SSDDiff by  doxygen 1.4.3-20050530