FSAMap Class Reference

Represents mapping of variables to their first straight ancestor (FSA) variable. More...

#include <fsamap.h>

Collaboration diagram for FSAMap:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~FSAMap ()
void insertFSA (unsigned var, unsigned fsa)
 Inserts a new variable with its first straight ancestor (FSA) variable.
void print (OutputStream &dos)
 Prints all variables with their first straight ancestor (FSA) variable.
unsigned getFSA (unsigned var)
 Returns the first straight ancestor (FSA) variable for the entered variable.

Static Public Member Functions

static FSAMapgetInstance ()
 Returns instance of FSAMap.

Private Member Functions

 FSAMap ()
 Constructor.

Private Attributes

VarVarMap fsamap
 The underlying map of this object.

Static Private Attributes

static FSAMapinstance = NULL
 Instance of FSAMap.


Detailed Description

Represents mapping of variables to their first straight ancestor (FSA) variable.

Represents mapping of variables to their first straight ancestor (FSA) variable, which takes therefore two variables, e.g. FSA($x) = $y, as arguments.

Note:
Variables are internally represented by numbers!

SINGLETON PATTERN!

Author:
Michael Schmidt

Gunnar Jehl

Version:
2.1
License:
Software License Agreement (BSD License)

Definition at line 63 of file fsamap.h.


Constructor & Destructor Documentation

FSAMap::~FSAMap (  )  [virtual]

Destructor.

Definition at line 52 of file fsamap.cpp.

FSAMap::FSAMap (  )  [private]

Constructor.

Constructor - creating object.

Definition at line 48 of file fsamap.cpp.

References fsamap, and TAGID_ROOT.

Referenced by getInstance().


Member Function Documentation

unsigned FSAMap::getFSA ( unsigned  var  ) 

Returns the first straight ancestor (FSA) variable for the entered variable.

Returns the first straight ancestor (FSA) variable for the entered variable.

Parameters:
[in] var Variable for which first straight ancestor (FSA) variable should be obtained.
Return values:
unsigned First straight ancestor (FSA) variable for the entered variable.

Definition at line 68 of file fsamap.cpp.

References fsamap.

Referenced by ForExpression::extractFSAMap(), and ProjectionTreeLabel::getFSALabel().

static FSAMap * FSAMap::getInstance (  )  [static]

Returns instance of FSAMap.

Returns instance of FSAMap, i.e. of this object.

Return values:
FSAMap* Pointer to a FSAMap object.

Definition at line 40 of file fsamap.cpp.

References FSAMap(), and instance.

Referenced by Executor::collectQueryInformation(), ProjectionTreeLabel::getAxisFollowingFSA(), ProjectionTreeLabel::getFSALabel(), print(), and Executor::~Executor().

void FSAMap::insertFSA ( unsigned  var,
unsigned  fsa 
)

Inserts a new variable with its first straight ancestor (FSA) variable.

Inserts a new variable with its first straight ancestor (FSA) variable.

Parameters:
[in] var Variable for which first straight ancestor (FSA) variable holds.
[in] fsa First straight ancestor (FSA) variable.
Return values:
void 

Definition at line 55 of file fsamap.cpp.

References fsamap.

Referenced by ForExpression::extractFSAMap().

void FSAMap::print ( OutputStream dos  ) 

Prints all variables with their first straight ancestor (FSA) variable.

Prints all variables with their first straight ancestor (FSA) variable.

Parameters:
[in] dos Pointer to a OutputStream object.
Return values:
void 

Definition at line 59 of file fsamap.cpp.

References fsamap, getInstance(), and NEWLINE.

Referenced by Executor::collectQueryInformation().


Member Data Documentation

The underlying map of this object.

The underlying map of this object, which maps variables to their first straight ancestor (FSA) variable.

Definition at line 119 of file fsamap.h.

Referenced by FSAMap(), getFSA(), insertFSA(), and print().

static FSAMap * FSAMap::instance = NULL [static, private]

Instance of FSAMap.

Instance of FSAMap to avoid duplicate existence of this object.

Definition at line 108 of file fsamap.h.

Referenced by getInstance().


Generated on Sun May 24 20:20:24 2009 for G(arbage) C(ollected) X(Query) Engine by  doxygen 1.5.9