Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

PathDict.cpp

Go to the documentation of this file.
00001 /*
00002 This product contains certain software code or other information
00003 ("AT&T Software") proprietary to AT&T Corp. ("AT&T").  The AT&T
00004 Software is provided to you "AS IS".  YOU ASSUME TOTAL RESPONSIBILITY
00005 AND RISK FOR USE OF THE AT&T SOFTWARE.  AT&T DOES NOT MAKE, AND
00006 EXPRESSLY DISCLAIMS, ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND
00007 WHATSOEVER, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
00008 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, WARRANTIES OF
00009 TITLE OR NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS, ANY
00010 WARRANTIES ARISING BY USAGE OF TRADE, COURSE OF DEALING OR COURSE OF
00011 PERFORMANCE, OR ANY WARRANTY THAT THE AT&T SOFTWARE IS "ERROR FREE" OR
00012 WILL MEET YOUR REQUIREMENTS.
00013 
00014 Unless you accept a license to use the AT&T Software, you shall not
00015 reverse compile, disassemble or otherwise reverse engineer this
00016 product to ascertain the source code for any AT&T Software.
00017 
00018 (c) AT&T Corp. All rights reserved.  AT&T is a registered trademark of AT&T Corp.
00019 
00020 ***********************************************************************
00021 
00022 History:
00023 
00024       24/11/99  - initial release by Hartmut Liefke, liefke@seas.upenn.edu
00025                                      Dan Suciu,      suciu@research.att.com
00026 */
00027 
00028 //***********************************************************************
00029 //***********************************************************************
00030 
00031 // This module contains the path dictionary class
00032 // The path dictionary maps paths into container blocks
00033 // The paths are not actual paths in the XML document, but
00034 // instantiations of the '#' symbols within the FSM for a given
00035 // path in the XML document
00036 
00037 // The path dictionary is implemented as a tree with roots
00038 // for each possible FSM. The roots are children of a node called
00039 // the 'super root node'.
00040 // Edges are labeled with XML label IDs. Each outgoing edge of a parent
00041 // has a distinct ID (i.e. the tree is deterministic)
00042 // To go from one node in the tree to a subnode using a specific label,
00043 // we use a hash table
00044 
00045 
00046 #include "PathDict.hpp"
00047 #include "VPathExprMan.hpp"
00048 
00049 extern MemStreamer blockmem;
00050 
00051 #if !defined(USE_FORWARD_DATAGUIDE) || defined(USE_NO_DATAGUIDE)
00052 MemStreamer *pathdictmem=&blockmem;
00053 #else
00054 MemStreamer *pathdictmem=&pathtreemem;
00055 #endif
00056 
00057 
00058 PathDict pathdict;
00059 
00060 void PathDictNode::PrintInfo()
00061    // Prints the information about the node's container block
00062 {
00063    PathDictNode   *curnode=this,
00064                   *parentnod=parent;
00065    unsigned long  depth=0;
00066 
00067    // We print the regular expression
00068    compresscontblock->GetPathExpr()->PrintRegExpr();
00069 
00070    printf(" <- ");
00071    
00072    curnode=this;
00073 
00074    // Then, we print the path that instantiates the '#'-symbols
00075    while(curnode->parent!=NULL)
00076    {
00077       globallabeldict.PrintLabel(curnode->labelid);
00078       curnode=curnode->parent;
00079       if(curnode->parent!=NULL)
00080          printf("/");
00081    }
00082 }

Generated on Sat Oct 13 16:08:39 2001 for XMILL by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001