00001 00002 /* 00003 | Author: Michael Schmidt; 00004 | Gunnar Jehl 00005 | 00006 | ************************* SOFTWARE LICENSE AGREEMENT *********************** 00007 | This source code is published under the BSD License. 00008 | 00009 | See file 'LICENSE.txt' that comes with this distribution or 00010 | http://dbis.informatik.uni-freiburg.de/index.php?project=GCX/license.php 00011 | for the full license agreement. 00012 | 00013 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00014 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00015 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00016 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00017 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00018 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00019 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00020 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00021 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00022 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00023 | POSSIBILITY OF SUCH DAMAGE. 00024 | **************************************************************************** 00025 */ 00026 00035 #ifndef DEPENDENCYSET_H 00036 #define DEPENDENCYSET_H 00037 00038 #include <vector> 00039 #include "dependencytuple.h" 00040 #include "pathstepnodeexpression.h" 00041 #include "pathstepattributeposition.h" 00042 00055 class DependencySet { 00056 00057 public: 00062 DependencySet(unsigned _var); 00063 00067 virtual ~ DependencySet(); 00068 00078 void insertTuple(PathExpression * path, bool pos, bool dos, bool cond); 00079 00086 void print(OutputStream & dos); 00087 00093 inline unsigned getVar() { 00094 return var; 00095 } vector < DependencyTuple * >*getTuples() { 00101 return &tuples; 00102 } 00103 00110 inline bool hasTuples() { 00111 return tuples.size() > 0; 00112 } 00113 00122 void removeSyntacticallyEqualTuple(PassiveProjectionTree * ppt); 00123 00135 void removeSemanticallyContainedTuple(PassiveProjectionTree * ppt); 00136 00137 private: 00143 unsigned var; 00144 00149 vector < DependencyTuple * >tuples; 00150 }; 00151 00152 #endif // DEPENDENCYSET_H