(file) Return to QueryContext.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / CQL / Attic

Diff for /pegasus/src/Pegasus/CQL/Attic/QueryContext.cpp between version 1.1.2.10 and 1.1.2.11

version 1.1.2.10, 2004/10/22 15:08:01 version 1.1.2.11, 2004/10/31 16:02:00
Line 34 
Line 34 
  
 #include "QueryContext.h" #include "QueryContext.h"
 #include <Pegasus/Common/System.h> #include <Pegasus/Common/System.h>
   #include <Pegasus/CQL/CQLChainedIdentifier.h>
  
 #include <iostream> #include <iostream>
  
Line 47 
Line 48 
 QueryContext::QueryContext(const QueryContext& ctx) QueryContext::QueryContext(const QueryContext& ctx)
   :_NS(ctx._NS),   :_NS(ctx._NS),
    _AliasClassTable(ctx._AliasClassTable),    _AliasClassTable(ctx._AliasClassTable),
    _fromList(ctx._fromList)     _fromList(ctx._fromList),
      _whereList(ctx._whereList)
 { {
  
 } }
Line 64 
Line 66 
   _NS = rhs._NS;   _NS = rhs._NS;
   _fromList = rhs._fromList;   _fromList = rhs._fromList;
   _AliasClassTable = rhs._AliasClassTable;   _AliasClassTable = rhs._AliasClassTable;
     _whereList = rhs._whereList;
  
   return *this;   return *this;
 } }
Line 135 
Line 138 
   }   }
 } }
  
   void QueryContext::addWhereIdentifier(const CQLChainedIdentifier& inIdentifier)
   {
     // If the identifier is already in the list then don't append.
     for (Uint32 i = 0; i < _whereList.size(); i++)
     {
       if (inIdentifier.size() == _whereList[i].size())
       {
         Array<CQLIdentifier> subsWhere = _whereList[i].getSubIdentifiers();
         Array<CQLIdentifier> subsIn = inIdentifier.getSubIdentifiers();
         Boolean match = true;
         for (Uint32 j = 0; j < subsWhere.size(); j++)
         {
           if (subsIn[j] != subsWhere[j])
           {
             match = false;
           }
         }
   
         if (match)
           return;
       }
     }
   
     _whereList.append(inIdentifier);
   }
   
   Array<CQLChainedIdentifier> QueryContext::getWhereList()
   {
     return _whereList;
   }
   
 CQLIdentifier QueryContext::findClass(const String& inAlias) const CQLIdentifier QueryContext::findClass(const String& inAlias) const
 { {
         // look for alias match         // look for alias match
Line 202 
Line 236 
  
 void QueryContext::clear(){ void QueryContext::clear(){
   _fromList.clear();   _fromList.clear();
     _whereList.clear();
    _AliasClassTable.clear();    _AliasClassTable.clear();
 } }
  


Legend:
Removed from v.1.1.2.10  
changed lines
  Added in v.1.1.2.11

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2