(file) Return to WQLSelectStatement.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / WQL

  1 mike  1.1.2.1 //%/////////////////////////////////////////////////////////////////////////////
  2               //
  3               // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM, 
  4               // The Open Group, Tivoli Systems
  5               //
  6               // Permission is hereby granted, free of charge, to any person obtaining a copy
  7               // of this software and associated documentation files (the "Software"), to 
  8               // deal in the Software without restriction, including without limitation the 
  9               // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 
 10               // sell copies of the Software, and to permit persons to whom the Software is
 11               // furnished to do so, subject to the following conditions:
 12               // 
 13               // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN 
 14               // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 15               // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 16               // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
 17               // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
 18               // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
 19               // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 20               // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 21               //
 22 mike  1.1.2.1 //==============================================================================
 23               //
 24               // Author: Mike Brasher (mbrasher@bmc.com)
 25               //
 26               // Modified By:
 27               //
 28               //%/////////////////////////////////////////////////////////////////////////////
 29               
 30               #include <iostream>
 31               #include "WQLSelectStatement.h"
 32               
 33               PEGASUS_USING_STD;
 34               
 35               PEGASUS_NAMESPACE_BEGIN
 36               
 37               WQLSelectStatement::WQLSelectStatement()
 38               {
 39                   //
 40                   // Reserve space for a where clause with up to sixteen terms.
 41                   //
 42               
 43 mike  1.1.2.1     _operations.reserve(16);
 44                   _operands.reserve(16);
 45               }
 46               
 47               WQLSelectStatement::~WQLSelectStatement()
 48               {
 49               
 50               }
 51               
 52               void WQLSelectStatement::clear()
 53               {
 54                   _className.clear();
 55                   _propertyNames.clear();
 56                   _operations.clear();
 57                   _operands.clear();
 58               }
 59               
 60               Boolean WQLSelectStatement::evaluateWhereClause(
 61                   const CIMInstance& instance) const
 62               {
 63                   return false;
 64 mike  1.1.2.1 }
 65               
 66               void WQLSelectStatement::print() const
 67               {
 68                   //
 69                   // Print the header:
 70                   //
 71                   
 72                   cout << "WQLSelectStatement" << endl;
 73                   cout << "{" << endl;
 74               
 75                   //
 76                   // Print the class name:
 77                   //
 78               
 79                   cout << "    _className: \"" << _className << '"' << endl;
 80               
 81                   // 
 82                   // Print the property:
 83                   //
 84               
 85 mike  1.1.2.1     for (Uint32 i = 0; i < _propertyNames.size(); i++)
 86                   {
 87 mike  1.1.2.2 	if (i == 0)
 88               	    cout << endl;
 89               
 90 mike  1.1.2.1 	cout << "    _propertyNames[" << i << "]: ";
 91               	cout << '"' << _propertyNames[i] << '"' << endl;
 92                   }
 93               
 94                   //
 95                   // Print the operations:
 96                   //
 97               
 98                   for (Uint32 i = 0; i < _operations.size(); i++)
 99                   {
100 mike  1.1.2.2 	if (i == 0)
101               	    cout << endl;
102               
103 mike  1.1.2.1 	cout << "    _operations[" << i << "]: ";
104               	cout << '"' << WQLOperationToString(_operations[i]) << '"' << endl;
105                   }
106               
107                   //
108                   // Print the operands:
109                   //
110               
111                   for (Uint32 i = 0; i < _operands.size(); i++)
112                   {
113 mike  1.1.2.2 	if (i == 0)
114               	    cout << endl;
115               
116               	cout << "    _operands[" << i << "]: ";
117 mike  1.1.2.1 	cout << '"' << _operands[i].toString() << '"' << endl;
118                   }
119               
120                   //
121                   // Print the trailer:
122                   //
123               
124                   cout << "}" << endl;
125               }
126               
127               PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2