OW_WQLProcessor.hpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * Copyright (C) 2001-2004 Vintela, Inc. All rights reserved.
00003 *
00004 * Redistribution and use in source and binary forms, with or without
00005 * modification, are permitted provided that the following conditions are met:
00006 *
00007 *  - Redistributions of source code must retain the above copyright notice,
00008 *    this list of conditions and the following disclaimer.
00009 *
00010 *  - Redistributions in binary form must reproduce the above copyright notice,
00011 *    this list of conditions and the following disclaimer in the documentation
00012 *    and/or other materials provided with the distribution.
00013 *
00014 *  - Neither the name of Vintela, Inc. nor the names of its
00015 *    contributors may be used to endorse or promote products derived from this
00016 *    software without specific prior written permission.
00017 *
00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 * ARE DISCLAIMED. IN NO EVENT SHALL Vintela, Inc. OR THE CONTRIBUTORS
00022 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00024 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00026 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00027 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00028 * POSSIBILITY OF SUCH DAMAGE.
00029 *******************************************************************************/
00030 
00035 #ifndef OW_WQL_PROCESSOR_HPP_
00036 #define OW_WQL_PROCESSOR_HPP_
00037 #include "OW_config.h"
00038 #include "OW_WQLVisitor.hpp"
00039 #include "OW_CIMFwd.hpp"
00040 #include "OW_IntrusiveReference.hpp"
00041 #include "OW_IntrusiveCountableBase.hpp"
00042 #include "OW_CIMOMHandleIFC.hpp"
00043 #include "OW_CIMNameSpace.hpp"
00044 #include "OW_CIMInstance.hpp"
00045 #include "OW_CIMObjectPath.hpp"
00046 #include "OW_Array.hpp"
00047 #include "OW_Bool.hpp"
00048 
00049 // The classes and functions defined in this file are not meant for general
00050 // use, they are internal implementation details.  They may change at any time.
00051 
00052 namespace OW_NAMESPACE
00053 {
00054 
00055 class OW_WQL_API WQLProcessor : public WQLVisitor
00056 {
00057 public:
00058    WQLProcessor(const CIMOMHandleIFCRef& hdl, const String& ns);
00059    virtual ~WQLProcessor()
00060    {
00061    }
00062    virtual void visit_stmt_selectStmt_optSemicolon(
00063       const stmt_selectStmt_optSemicolon* pstmt_selectStmt_optSemicolon
00064       );
00065    virtual void visit_stmt_updateStmt_optSemicolon(
00066       const stmt_updateStmt_optSemicolon* pstmt_updateStmt_optSemicolon
00067       );
00068    virtual void visit_stmt_insertStmt_optSemicolon(
00069       const stmt_insertStmt_optSemicolon* pstmt_insertStmt_optSemicolon
00070       );
00071    virtual void visit_stmt_deleteStmt_optSemicolon(
00072       const stmt_deleteStmt_optSemicolon* pstmt_deleteStmt_optSemicolon
00073       );
00074    virtual void visit_optSemicolon_empty(
00075       const optSemicolon_empty* poptSemicolon_empty
00076       );
00077    virtual void visit_optSemicolon_SEMICOLON(
00078       const optSemicolon_SEMICOLON* poptSemicolon_SEMICOLON
00079       );
00080    virtual void visit_insertStmt(
00081       const insertStmt* pinsertStmt
00082       );
00083    virtual void visit_insertRest_VALUES_LEFTPAREN_targetList_RIGHTPAREN(
00084       const insertRest_VALUES_LEFTPAREN_targetList_RIGHTPAREN* pinsertRest_VALUES_LEFTPAREN_targetList_RIGHTPAREN
00085       );
00086    virtual void visit_insertRest_DEFAULT_VALUES(
00087       const insertRest_DEFAULT_VALUES* pinsertRest_DEFAULT_VALUES
00088       );
00089    virtual void visit_insertRest_LEFTPAREN_columnList_RIGHTPAREN_VALUES_LEFTPAREN_targetList_RIGHTPAREN(
00090       const insertRest_LEFTPAREN_columnList_RIGHTPAREN_VALUES_LEFTPAREN_targetList_RIGHTPAREN* pinsertRest_LEFTPAREN_columnList_RIGHTPAREN_VALUES_LEFTPAREN_targetList_RIGHTPAREN
00091       );
00092    virtual void visit_deleteStmt(
00093       const deleteStmt* pdeleteStmt
00094       );
00095    virtual void visit_updateStmt(
00096       const updateStmt* pupdateStmt
00097       );
00098    virtual void visit_selectStmt(
00099       const selectStmt* pselectStmt
00100       );
00101    virtual void visit_exprSeq_aExpr(
00102       const exprSeq_aExpr* pexprSeq_aExpr
00103       );
00104    virtual void visit_exprSeq_exprSeq_COMMA_aExpr(
00105       const exprSeq_exprSeq_COMMA_aExpr* pexprSeq_exprSeq_COMMA_aExpr
00106       );
00107    virtual void visit_exprSeq_exprSeq_USING_aExpr(
00108       const exprSeq_exprSeq_USING_aExpr* pexprSeq_exprSeq_USING_aExpr
00109       );
00110    virtual void visit_optDistinct_empty(
00111       const optDistinct_empty* poptDistinct_empty
00112       );
00113    virtual void visit_optDistinct_DISTINCT(
00114       const optDistinct_DISTINCT* poptDistinct_DISTINCT
00115       );
00116    virtual void visit_optDistinct_DISTINCT_ON_LEFTPAREN_exprSeq_RIGHTPAREN(
00117       const optDistinct_DISTINCT_ON_LEFTPAREN_exprSeq_RIGHTPAREN* poptDistinct_DISTINCT_ON_LEFTPAREN_exprSeq_RIGHTPAREN
00118       );
00119    virtual void visit_optDistinct_ALL(
00120       const optDistinct_ALL* poptDistinct_ALL
00121       );
00122    virtual void visit_sortClause(
00123       const sortClause* psortClause
00124       );
00125    virtual void visit_optSortClause_empty(
00126       const optSortClause_empty* poptSortClause_empty
00127       );
00128    virtual void visit_optSortClause_sortClause(
00129       const optSortClause_sortClause* poptSortClause_sortClause
00130       );
00131    virtual void visit_sortby(
00132       const sortby* psortby
00133       );
00134    virtual void visit_optGroupClause_empty(
00135       const optGroupClause_empty* poptGroupClause_empty
00136       );
00137    virtual void visit_optGroupClause_GROUP_BY_exprSeq(
00138       const optGroupClause_GROUP_BY_exprSeq* poptGroupClause_GROUP_BY_exprSeq
00139       );
00140    virtual void visit_optHavingClause_empty(
00141       const optHavingClause_empty* poptHavingClause_empty
00142       );
00143    virtual void visit_optHavingClause_HAVING_aExpr(
00144       const optHavingClause_HAVING_aExpr* poptHavingClause_HAVING_aExpr
00145       );
00146    virtual void visit_optFromClause_empty(
00147       const optFromClause_empty* poptFromClause_empty
00148       );
00149    virtual void visit_optFromClause_FROM_fromList(
00150       const optFromClause_FROM_fromList* poptFromClause_FROM_fromList
00151       );
00152    virtual void visit_tableRef_relationExpr(
00153       const tableRef_relationExpr* ptableRef_relationExpr
00154       );
00155    virtual void visit_tableRef_relationExpr_aliasClause(
00156       const tableRef_relationExpr_aliasClause* ptableRef_relationExpr_aliasClause
00157       );
00158    virtual void visit_tableRef_joinedTable(
00159       const tableRef_joinedTable* ptableRef_joinedTable
00160       );
00161    virtual void visit_tableRef_LEFTPAREN_joinedTable_RIGHTPAREN_aliasClause(
00162       const tableRef_LEFTPAREN_joinedTable_RIGHTPAREN_aliasClause* ptableRef_LEFTPAREN_joinedTable_RIGHTPAREN_aliasClause
00163       );
00164    virtual void visit_joinedTable_LEFTPAREN_joinedTable_RIGHTPAREN(
00165       const joinedTable_LEFTPAREN_joinedTable_RIGHTPAREN* pjoinedTable_LEFTPAREN_joinedTable_RIGHTPAREN
00166       );
00167    virtual void visit_joinedTable_tableRef_CROSS_JOIN_tableRef(
00168       const joinedTable_tableRef_CROSS_JOIN_tableRef* pjoinedTable_tableRef_CROSS_JOIN_tableRef
00169       );
00170    virtual void visit_joinedTable_tableRef_UNIONJOIN_tableRef(
00171       const joinedTable_tableRef_UNIONJOIN_tableRef* pjoinedTable_tableRef_UNIONJOIN_tableRef
00172       );
00173    virtual void visit_joinedTable_tableRef_joinType_JOIN_tableRef_joinQual(
00174       const joinedTable_tableRef_joinType_JOIN_tableRef_joinQual* pjoinedTable_tableRef_joinType_JOIN_tableRef_joinQual
00175       );
00176    virtual void visit_joinedTable_tableRef_JOIN_tableRef_joinQual(
00177       const joinedTable_tableRef_JOIN_tableRef_joinQual* pjoinedTable_tableRef_JOIN_tableRef_joinQual
00178       );
00179    virtual void visit_joinedTable_tableRef_NATURAL_joinType_JOIN_tableRef(
00180       const joinedTable_tableRef_NATURAL_joinType_JOIN_tableRef* pjoinedTable_tableRef_NATURAL_joinType_JOIN_tableRef
00181       );
00182    virtual void visit_joinedTable_tableRef_NATURAL_JOIN_tableRef(
00183       const joinedTable_tableRef_NATURAL_JOIN_tableRef* pjoinedTable_tableRef_NATURAL_JOIN_tableRef
00184       );
00185    virtual void visit_aliasClause_AS_strColId_LEFTPAREN_nameList_RIGHTPAREN(
00186       const aliasClause_AS_strColId_LEFTPAREN_nameList_RIGHTPAREN* paliasClause_AS_strColId_LEFTPAREN_nameList_RIGHTPAREN
00187       );
00188    virtual void visit_aliasClause_AS_strColId(
00189       const aliasClause_AS_strColId* paliasClause_AS_strColId
00190       );
00191    virtual void visit_aliasClause_strColId_LEFTPAREN_nameList_RIGHTPAREN(
00192       const aliasClause_strColId_LEFTPAREN_nameList_RIGHTPAREN* paliasClause_strColId_LEFTPAREN_nameList_RIGHTPAREN
00193       );
00194    virtual void visit_aliasClause_strColId(
00195       const aliasClause_strColId* paliasClause_strColId
00196       );
00197    virtual void visit_joinType_FULL_strOptJoinOuter(
00198       const joinType_FULL_strOptJoinOuter* pjoinType_FULL_strOptJoinOuter
00199       );
00200    virtual void visit_joinType_LEFT_strOptJoinOuter(
00201       const joinType_LEFT_strOptJoinOuter* pjoinType_LEFT_strOptJoinOuter
00202       );
00203    virtual void visit_joinType_RIGHT_strOptJoinOuter(
00204       const joinType_RIGHT_strOptJoinOuter* pjoinType_RIGHT_strOptJoinOuter
00205       );
00206    virtual void visit_joinType_INNERP(
00207       const joinType_INNERP* pjoinType_INNERP
00208       );
00209    virtual void visit_joinQual_USING_LEFTPAREN_nameList_RIGHTPAREN(
00210       const joinQual_USING_LEFTPAREN_nameList_RIGHTPAREN* pjoinQual_USING_LEFTPAREN_nameList_RIGHTPAREN
00211       );
00212    virtual void visit_joinQual_ON_aExpr(
00213       const joinQual_ON_aExpr* pjoinQual_ON_aExpr
00214       );
00215    virtual void visit_relationExpr_strRelationName(
00216       const relationExpr_strRelationName* prelationExpr_strRelationName
00217       );
00218    virtual void visit_relationExpr_strRelationName_ASTERISK(
00219       const relationExpr_strRelationName_ASTERISK* prelationExpr_strRelationName_ASTERISK
00220       );
00221    virtual void visit_relationExpr_ONLY_strRelationName(
00222       const relationExpr_ONLY_strRelationName* prelationExpr_ONLY_strRelationName
00223       );
00224    virtual void visit_optWhereClause_empty(
00225       const optWhereClause_empty* poptWhereClause_empty
00226       );
00227    virtual void visit_optWhereClause_WHERE_aExpr(
00228       const optWhereClause_WHERE_aExpr* poptWhereClause_WHERE_aExpr
00229       );
00230    virtual void visit_rowExpr(
00231       const rowExpr* prowExpr
00232       );
00233    virtual void visit_rowDescriptor(
00234       const rowDescriptor* prowDescriptor
00235       );
00236    virtual void visit_aExpr_cExpr(
00237       const aExpr_cExpr* paExpr_cExpr
00238       );
00239    virtual void visit_aExpr_aExpr_AT_TIME_ZONE_cExpr(
00240       const aExpr_aExpr_AT_TIME_ZONE_cExpr* paExpr_aExpr_AT_TIME_ZONE_cExpr
00241       );
00242    virtual void visit_aExpr_PLUS_aExpr(
00243       const aExpr_PLUS_aExpr* paExpr_PLUS_aExpr
00244       );
00245    virtual void visit_aExpr_MINUS_aExpr(
00246       const aExpr_MINUS_aExpr* paExpr_MINUS_aExpr
00247       );
00248    virtual void visit_aExpr_BITINVERT_aExpr(
00249       const aExpr_BITINVERT_aExpr* paExpr_BITINVERT_aExpr
00250       );
00251    virtual void visit_aExpr_aExpr_PLUS_aExpr(
00252       const aExpr_aExpr_PLUS_aExpr* paExpr_aExpr_PLUS_aExpr
00253       );
00254    virtual void visit_aExpr_aExpr_MINUS_aExpr(
00255       const aExpr_aExpr_MINUS_aExpr* paExpr_aExpr_MINUS_aExpr
00256       );
00257    virtual void visit_aExpr_aExpr_ASTERISK_aExpr(
00258       const aExpr_aExpr_ASTERISK_aExpr* paExpr_aExpr_ASTERISK_aExpr
00259       );
00260    virtual void visit_aExpr_aExpr_SOLIDUS_aExpr(
00261       const aExpr_aExpr_SOLIDUS_aExpr* paExpr_aExpr_SOLIDUS_aExpr
00262       );
00263    virtual void visit_aExpr_aExpr_PERCENT_aExpr(
00264       const aExpr_aExpr_PERCENT_aExpr* paExpr_aExpr_PERCENT_aExpr
00265       );
00266    virtual void visit_aExpr_aExpr_BITAND_aExpr(
00267       const aExpr_aExpr_BITAND_aExpr* paExpr_aExpr_BITAND_aExpr
00268       );
00269    virtual void visit_aExpr_aExpr_BITOR_aExpr(
00270       const aExpr_aExpr_BITOR_aExpr* paExpr_aExpr_BITOR_aExpr
00271       );
00272    virtual void visit_aExpr_aExpr_BITSHIFTLEFT_aExpr(
00273       const aExpr_aExpr_BITSHIFTLEFT_aExpr* paExpr_aExpr_BITSHIFTLEFT_aExpr
00274       );
00275    virtual void visit_aExpr_aExpr_BITSHIFTRIGHT_aExpr(
00276       const aExpr_aExpr_BITSHIFTRIGHT_aExpr* paExpr_aExpr_BITSHIFTRIGHT_aExpr
00277       );
00278    virtual void visit_aExpr_aExpr_LESSTHAN_aExpr(
00279       const aExpr_aExpr_LESSTHAN_aExpr* paExpr_aExpr_LESSTHAN_aExpr
00280       );
00281    virtual void visit_aExpr_aExpr_LESSTHANOREQUALS_aExpr(
00282       const aExpr_aExpr_LESSTHANOREQUALS_aExpr* paExpr_aExpr_LESSTHANOREQUALS_aExpr
00283       );
00284    virtual void visit_aExpr_aExpr_GREATERTHAN_aExpr(
00285       const aExpr_aExpr_GREATERTHAN_aExpr* paExpr_aExpr_GREATERTHAN_aExpr
00286       );
00287    virtual void visit_aExpr_aExpr_GREATERTHANOREQUALS_aExpr(
00288       const aExpr_aExpr_GREATERTHANOREQUALS_aExpr* paExpr_aExpr_GREATERTHANOREQUALS_aExpr
00289       );
00290    virtual void visit_aExpr_aExpr_EQUALS_aExpr(
00291       const aExpr_aExpr_EQUALS_aExpr* paExpr_aExpr_EQUALS_aExpr
00292       );
00293    virtual void visit_aExpr_aExpr_NOTEQUALS_aExpr(
00294       const aExpr_aExpr_NOTEQUALS_aExpr* paExpr_aExpr_NOTEQUALS_aExpr
00295       );
00296    virtual void visit_aExpr_aExpr_AND_aExpr(
00297       const aExpr_aExpr_AND_aExpr* paExpr_aExpr_AND_aExpr
00298       );
00299    virtual void visit_aExpr_aExpr_OR_aExpr(
00300       const aExpr_aExpr_OR_aExpr* paExpr_aExpr_OR_aExpr
00301       );
00302    virtual void visit_aExpr_NOT_aExpr(
00303       const aExpr_NOT_aExpr* paExpr_NOT_aExpr
00304       );
00305    virtual void visit_aExpr_aExpr_CONCATENATION_aExpr(
00306       const aExpr_aExpr_CONCATENATION_aExpr* paExpr_aExpr_CONCATENATION_aExpr
00307       );
00308    virtual void visit_aExpr_aExpr_LIKE_aExpr(
00309       const aExpr_aExpr_LIKE_aExpr* paExpr_aExpr_LIKE_aExpr
00310       );
00311    virtual void visit_aExpr_aExpr_LIKE_aExpr_ESCAPE_aExpr(
00312       const aExpr_aExpr_LIKE_aExpr_ESCAPE_aExpr* paExpr_aExpr_LIKE_aExpr_ESCAPE_aExpr
00313       );
00314    virtual void visit_aExpr_aExpr_NOT_LIKE_aExpr(
00315       const aExpr_aExpr_NOT_LIKE_aExpr* paExpr_aExpr_NOT_LIKE_aExpr
00316       );
00317    virtual void visit_aExpr_aExpr_NOT_LIKE_aExpr_ESCAPE_aExpr(
00318       const aExpr_aExpr_NOT_LIKE_aExpr_ESCAPE_aExpr* paExpr_aExpr_NOT_LIKE_aExpr_ESCAPE_aExpr
00319       );
00320    virtual void visit_aExpr_aExpr_ISNULL(
00321       const aExpr_aExpr_ISNULL* paExpr_aExpr_ISNULL
00322       );
00323    virtual void visit_aExpr_aExpr_IS_NULLP(
00324       const aExpr_aExpr_IS_NULLP* paExpr_aExpr_IS_NULLP
00325       );
00326    virtual void visit_aExpr_aExpr_NOTNULL(
00327       const aExpr_aExpr_NOTNULL* paExpr_aExpr_NOTNULL
00328       );
00329    virtual void visit_aExpr_aExpr_IS_NOT_NULLP(
00330       const aExpr_aExpr_IS_NOT_NULLP* paExpr_aExpr_IS_NOT_NULLP
00331       );
00332    virtual void visit_aExpr_aExpr_IS_TRUEP(
00333       const aExpr_aExpr_IS_TRUEP* paExpr_aExpr_IS_TRUEP
00334       );
00335    virtual void visit_aExpr_aExpr_IS_NOT_FALSEP(
00336       const aExpr_aExpr_IS_NOT_FALSEP* paExpr_aExpr_IS_NOT_FALSEP
00337       );
00338    virtual void visit_aExpr_aExpr_IS_FALSEP(
00339       const aExpr_aExpr_IS_FALSEP* paExpr_aExpr_IS_FALSEP
00340       );
00341    virtual void visit_aExpr_aExpr_IS_NOT_TRUEP(
00342       const aExpr_aExpr_IS_NOT_TRUEP* paExpr_aExpr_IS_NOT_TRUEP
00343       );
00344    virtual void visit_aExpr_aExpr_ISA_aExpr(
00345       const aExpr_aExpr_ISA_aExpr* paExpr_aExpr_ISA_aExpr
00346       );
00347    
00348    virtual void visit_aExpr_rowExpr(
00349       const aExpr_rowExpr* paExpr_rowExpr
00350       );
00351    virtual void visit_bExpr_cExpr(
00352       const bExpr_cExpr* pbExpr_cExpr
00353       );
00354    virtual void visit_bExpr_PLUS_bExpr(
00355       const bExpr_PLUS_bExpr* pbExpr_PLUS_bExpr
00356       );
00357    virtual void visit_bExpr_MINUS_bExpr(
00358       const bExpr_MINUS_bExpr* pbExpr_MINUS_bExpr
00359       );
00360    virtual void visit_bExpr_BITINVERT_bExpr(
00361       const bExpr_BITINVERT_bExpr* pbExpr_BITINVERT_bExpr
00362       );
00363    virtual void visit_bExpr_bExpr_PLUS_bExpr(
00364       const bExpr_bExpr_PLUS_bExpr* pbExpr_bExpr_PLUS_bExpr
00365       );
00366    virtual void visit_bExpr_bExpr_MINUS_bExpr(
00367       const bExpr_bExpr_MINUS_bExpr* pbExpr_bExpr_MINUS_bExpr
00368       );
00369    virtual void visit_bExpr_bExpr_ASTERISK_bExpr(
00370       const bExpr_bExpr_ASTERISK_bExpr* pbExpr_bExpr_ASTERISK_bExpr
00371       );
00372    virtual void visit_bExpr_bExpr_SOLIDUS_bExpr(
00373       const bExpr_bExpr_SOLIDUS_bExpr* pbExpr_bExpr_SOLIDUS_bExpr
00374       );
00375    virtual void visit_bExpr_bExpr_PERCENT_bExpr(
00376       const bExpr_bExpr_PERCENT_bExpr* pbExpr_bExpr_PERCENT_bExpr
00377       );
00378    virtual void visit_bExpr_bExpr_BITAND_bExpr(
00379       const bExpr_bExpr_BITAND_bExpr* pbExpr_bExpr_BITAND_bExpr
00380       );
00381    virtual void visit_bExpr_bExpr_BITOR_bExpr(
00382       const bExpr_bExpr_BITOR_bExpr* pbExpr_bExpr_BITOR_bExpr
00383       );
00384    virtual void visit_bExpr_bExpr_BITSHIFTLEFT_bExpr(
00385       const bExpr_bExpr_BITSHIFTLEFT_bExpr* pbExpr_bExpr_BITSHIFTLEFT_bExpr
00386       );
00387    virtual void visit_bExpr_bExpr_BITSHIFTRIGHT_bExpr(
00388       const bExpr_bExpr_BITSHIFTRIGHT_bExpr* pbExpr_bExpr_BITSHIFTRIGHT_bExpr
00389       );
00390    virtual void visit_bExpr_bExpr_LESSTHAN_bExpr(
00391       const bExpr_bExpr_LESSTHAN_bExpr* pbExpr_bExpr_LESSTHAN_bExpr
00392       );
00393    virtual void visit_bExpr_bExpr_LESSTHANOREQUALS_bExpr(
00394       const bExpr_bExpr_LESSTHANOREQUALS_bExpr* pbExpr_bExpr_LESSTHANOREQUALS_bExpr
00395       );
00396    virtual void visit_bExpr_bExpr_GREATERTHAN_bExpr(
00397       const bExpr_bExpr_GREATERTHAN_bExpr* pbExpr_bExpr_GREATERTHAN_bExpr
00398       );
00399    virtual void visit_bExpr_bExpr_GREATERTHANOREQUALS_bExpr(
00400       const bExpr_bExpr_GREATERTHANOREQUALS_bExpr* pbExpr_bExpr_GREATERTHANOREQUALS_bExpr
00401       );
00402    virtual void visit_bExpr_bExpr_EQUALS_bExpr(
00403       const bExpr_bExpr_EQUALS_bExpr* pbExpr_bExpr_EQUALS_bExpr
00404       );
00405    virtual void visit_bExpr_bExpr_NOTEQUALS_bExpr(
00406       const bExpr_bExpr_NOTEQUALS_bExpr* pbExpr_bExpr_NOTEQUALS_bExpr
00407       );
00408    virtual void visit_bExpr_bExpr_CONCATENATION_bExpr(
00409       const bExpr_bExpr_CONCATENATION_bExpr* pbExpr_bExpr_CONCATENATION_bExpr
00410       );
00411    virtual void visit_cExpr_attr(
00412       const cExpr_attr* pcExpr_attr
00413       );
00414    virtual void visit_cExpr_strColId_optIndirection(
00415       const cExpr_strColId_optIndirection* pcExpr_strColId_optIndirection
00416       );
00417    virtual void visit_cExpr_aExprConst(
00418       const cExpr_aExprConst* pcExpr_aExprConst
00419       );
00420    virtual void visit_cExpr_LEFTPAREN_aExpr_RIGHTPAREN(
00421       const cExpr_LEFTPAREN_aExpr_RIGHTPAREN* pcExpr_LEFTPAREN_aExpr_RIGHTPAREN
00422       );
00423    virtual void visit_cExpr_strFuncName_LEFTPAREN_RIGHTPAREN(
00424       const cExpr_strFuncName_LEFTPAREN_RIGHTPAREN* pcExpr_strFuncName_LEFTPAREN_RIGHTPAREN
00425       );
00426    virtual void visit_cExpr_strFuncName_LEFTPAREN_exprSeq_RIGHTPAREN(
00427       const cExpr_strFuncName_LEFTPAREN_exprSeq_RIGHTPAREN* pcExpr_strFuncName_LEFTPAREN_exprSeq_RIGHTPAREN
00428       );
00429    virtual void visit_cExpr_strFuncName_LEFTPAREN_ALL_exprSeq_RIGHTPAREN(
00430       const cExpr_strFuncName_LEFTPAREN_ALL_exprSeq_RIGHTPAREN* pcExpr_strFuncName_LEFTPAREN_ALL_exprSeq_RIGHTPAREN
00431       );
00432    virtual void visit_cExpr_strFuncName_LEFTPAREN_DISTINCT_exprSeq_RIGHTPAREN(
00433       const cExpr_strFuncName_LEFTPAREN_DISTINCT_exprSeq_RIGHTPAREN* pcExpr_strFuncName_LEFTPAREN_DISTINCT_exprSeq_RIGHTPAREN
00434       );
00435    virtual void visit_cExpr_strFuncName_LEFTPAREN_ASTERISK_RIGHTPAREN(
00436       const cExpr_strFuncName_LEFTPAREN_ASTERISK_RIGHTPAREN* pcExpr_strFuncName_LEFTPAREN_ASTERISK_RIGHTPAREN
00437       );
00438    virtual void visit_cExpr_CURRENTDATE(
00439       const cExpr_CURRENTDATE* pcExpr_CURRENTDATE
00440       );
00441    virtual void visit_cExpr_CURRENTTIME(
00442       const cExpr_CURRENTTIME* pcExpr_CURRENTTIME
00443       );
00444    virtual void visit_cExpr_CURRENTTIME_LEFTPAREN_ICONST_RIGHTPAREN(
00445       const cExpr_CURRENTTIME_LEFTPAREN_ICONST_RIGHTPAREN* pcExpr_CURRENTTIME_LEFTPAREN_ICONST_RIGHTPAREN
00446       );
00447    virtual void visit_cExpr_CURRENTTIMESTAMP(
00448       const cExpr_CURRENTTIMESTAMP* pcExpr_CURRENTTIMESTAMP
00449       );
00450    virtual void visit_cExpr_CURRENTTIMESTAMP_LEFTPAREN_ICONST_RIGHTPAREN(
00451       const cExpr_CURRENTTIMESTAMP_LEFTPAREN_ICONST_RIGHTPAREN* pcExpr_CURRENTTIMESTAMP_LEFTPAREN_ICONST_RIGHTPAREN
00452       );
00453    virtual void visit_cExpr_CURRENTUSER(
00454       const cExpr_CURRENTUSER* pcExpr_CURRENTUSER
00455       );
00456    virtual void visit_cExpr_SESSIONUSER(
00457       const cExpr_SESSIONUSER* pcExpr_SESSIONUSER
00458       );
00459    virtual void visit_cExpr_USER(
00460       const cExpr_USER* pcExpr_USER
00461       );
00462    virtual void visit_cExpr_EXTRACT_LEFTPAREN_optExtract_RIGHTPAREN(
00463       const cExpr_EXTRACT_LEFTPAREN_optExtract_RIGHTPAREN* pcExpr_EXTRACT_LEFTPAREN_optExtract_RIGHTPAREN
00464       );
00465    virtual void visit_cExpr_POSITION_LEFTPAREN_positionExpr_RIGHTPAREN(
00466       const cExpr_POSITION_LEFTPAREN_positionExpr_RIGHTPAREN* pcExpr_POSITION_LEFTPAREN_positionExpr_RIGHTPAREN
00467       );
00468    virtual void visit_cExpr_SUBSTRING_LEFTPAREN_optSubstrExpr_RIGHTPAREN(
00469       const cExpr_SUBSTRING_LEFTPAREN_optSubstrExpr_RIGHTPAREN* pcExpr_SUBSTRING_LEFTPAREN_optSubstrExpr_RIGHTPAREN
00470       );
00471    virtual void visit_cExpr_TRIM_LEFTPAREN_LEADING_trimExpr_RIGHTPAREN(
00472       const cExpr_TRIM_LEFTPAREN_LEADING_trimExpr_RIGHTPAREN* pcExpr_TRIM_LEFTPAREN_LEADING_trimExpr_RIGHTPAREN
00473       );
00474    virtual void visit_cExpr_TRIM_LEFTPAREN_TRAILING_trimExpr_RIGHTPAREN(
00475       const cExpr_TRIM_LEFTPAREN_TRAILING_trimExpr_RIGHTPAREN* pcExpr_TRIM_LEFTPAREN_TRAILING_trimExpr_RIGHTPAREN
00476       );
00477    virtual void visit_cExpr_TRIM_LEFTPAREN_trimExpr_RIGHTPAREN(
00478       const cExpr_TRIM_LEFTPAREN_trimExpr_RIGHTPAREN* pcExpr_TRIM_LEFTPAREN_trimExpr_RIGHTPAREN
00479       );
00480    virtual void visit_optIndirection_empty(
00481       const optIndirection_empty* poptIndirection_empty
00482       );
00483    virtual void visit_optIndirection_optIndirection_LEFTBRACKET_aExpr_RIGHTBRACKET(
00484       const optIndirection_optIndirection_LEFTBRACKET_aExpr_RIGHTBRACKET* poptIndirection_optIndirection_LEFTBRACKET_aExpr_RIGHTBRACKET
00485       );
00486    virtual void visit_optIndirection_optIndirection_LEFTBRACKET_aExpr_COLON_aExpr_RIGHTBRACKET(
00487       const optIndirection_optIndirection_LEFTBRACKET_aExpr_COLON_aExpr_RIGHTBRACKET* poptIndirection_optIndirection_LEFTBRACKET_aExpr_COLON_aExpr_RIGHTBRACKET
00488       );
00489    virtual void visit_optExtract_empty(
00490       const optExtract_empty* poptExtract_empty
00491       );
00492    virtual void visit_optExtract_strExtractArg_FROM_aExpr(
00493       const optExtract_strExtractArg_FROM_aExpr* poptExtract_strExtractArg_FROM_aExpr
00494       );
00495    virtual void visit_positionExpr_bExpr_IN_bExpr(
00496       const positionExpr_bExpr_IN_bExpr* ppositionExpr_bExpr_IN_bExpr
00497       );
00498    virtual void visit_positionExpr_empty(
00499       const positionExpr_empty* ppositionExpr_empty
00500       );
00501    virtual void visit_optSubstrExpr_empty(
00502       const optSubstrExpr_empty* poptSubstrExpr_empty
00503       );
00504    virtual void visit_optSubstrExpr_aExpr_substrFrom_substrFor(
00505       const optSubstrExpr_aExpr_substrFrom_substrFor* poptSubstrExpr_aExpr_substrFrom_substrFor
00506       );
00507    virtual void visit_optSubstrExpr_aExpr_substrFor_substrFrom(
00508       const optSubstrExpr_aExpr_substrFor_substrFrom* poptSubstrExpr_aExpr_substrFor_substrFrom
00509       );
00510    virtual void visit_optSubstrExpr_aExpr_substrFrom(
00511       const optSubstrExpr_aExpr_substrFrom* poptSubstrExpr_aExpr_substrFrom
00512       );
00513    virtual void visit_optSubstrExpr_aExpr_substrFor(
00514       const optSubstrExpr_aExpr_substrFor* poptSubstrExpr_aExpr_substrFor
00515       );
00516    virtual void visit_optSubstrExpr_exprSeq(
00517       const optSubstrExpr_exprSeq* poptSubstrExpr_exprSeq
00518       );
00519    virtual void visit_substrFrom(
00520       const substrFrom* psubstrFrom
00521       );
00522    virtual void visit_substrFor(
00523       const substrFor* psubstrFor
00524       );
00525    virtual void visit_trimExpr_aExpr_FROM_exprSeq(
00526       const trimExpr_aExpr_FROM_exprSeq* ptrimExpr_aExpr_FROM_exprSeq
00527       );
00528    virtual void visit_trimExpr_FROM_exprSeq(
00529       const trimExpr_FROM_exprSeq* ptrimExpr_FROM_exprSeq
00530       );
00531    virtual void visit_trimExpr_exprSeq(
00532       const trimExpr_exprSeq* ptrimExpr_exprSeq
00533       );
00534    virtual void visit_attr(
00535       const attr* pattr
00536       );
00537    virtual void visit_attrs_strAttrName(
00538       const attrs_strAttrName* pattrs_strAttrName
00539       );
00540    virtual void visit_attrs_attrs_PERIOD_strAttrName(
00541       const attrs_attrs_PERIOD_strAttrName* pattrs_attrs_PERIOD_strAttrName
00542       );
00543    virtual void visit_attrs_attrs_PERIOD_ASTERISK(
00544       const attrs_attrs_PERIOD_ASTERISK* pattrs_attrs_PERIOD_ASTERISK
00545       );
00546    virtual void visit_targetEl_aExpr_AS_strColLabel(
00547       const targetEl_aExpr_AS_strColLabel* ptargetEl_aExpr_AS_strColLabel
00548       );
00549    virtual void visit_targetEl_aExpr(
00550       const targetEl_aExpr* ptargetEl_aExpr
00551       );
00552    virtual void visit_targetEl_strRelationName_PERIOD_ASTERISK(
00553       const targetEl_strRelationName_PERIOD_ASTERISK* ptargetEl_strRelationName_PERIOD_ASTERISK
00554       );
00555    virtual void visit_targetEl_ASTERISK(
00556       const targetEl_ASTERISK* ptargetEl_ASTERISK
00557       );
00558    virtual void visit_updateTargetEl(
00559       const updateTargetEl* pupdateTargetEl
00560       );
00561    virtual void visit_aExprConst_ICONST(
00562       const aExprConst_ICONST* paExprConst_ICONST
00563       );
00564    virtual void visit_aExprConst_FCONST(
00565       const aExprConst_FCONST* paExprConst_FCONST
00566       );
00567    virtual void visit_aExprConst_SCONST(
00568       const aExprConst_SCONST* paExprConst_SCONST
00569       );
00570    virtual void visit_aExprConst_BITCONST(
00571       const aExprConst_BITCONST* paExprConst_BITCONST
00572       );
00573    virtual void visit_aExprConst_HEXCONST(
00574       const aExprConst_HEXCONST* paExprConst_HEXCONST
00575       );
00576    virtual void visit_aExprConst_TRUEP(
00577       const aExprConst_TRUEP* paExprConst_TRUEP
00578       );
00579    virtual void visit_aExprConst_FALSEP(
00580       const aExprConst_FALSEP* paExprConst_FALSEP
00581       );
00582    virtual void visit_aExprConst_NULLP(
00583       const aExprConst_NULLP* paExprConst_NULLP
00584       );
00585    // End generated code
00586 public:
00587    struct DataType
00588    {
00589       enum Type
00590       {
00591          CIMInstanceArrayType,
00592          StringType,
00593          IntType,
00594          RealType,
00595          BoolType,
00596          ColumnNameType,
00597          NullType,
00598          InvalidType
00599       };
00600       DataType()
00601       : type(InvalidType)
00602       {
00603       }
00604       DataType(const Type t)
00605       : type(t), cia(), str(), i(), r(), b()
00606       {
00607       }
00608       DataType(const String& s, const Type t)
00609       : type(t), cia(), str(s), i(), r(), b()
00610       {
00611       }
00612       DataType(const CIMInstanceArray& c)
00613       : type(CIMInstanceArrayType), cia(c), str(), i(), r(), b()
00614       {
00615       }
00616       DataType(const Int64& newInt)
00617       : type(IntType), cia(), str(), i(newInt), r(), b()
00618       {
00619       }
00620       DataType(const Bool& newBool)
00621       : type (BoolType), cia(), str(), i(), r(), b(newBool)
00622       {
00623       }
00624       DataType(const Real64& newReal)
00625       : type (RealType), cia(), str(), i(), r(newReal), b()
00626       {
00627       }
00628       Type type;
00629       CIMInstanceArray cia;
00630       String str;
00631       Int64 i;
00632       Real64 r;
00633       Bool b;
00634    };
00635    struct CompareImpl : public IntrusiveCountableBase
00636    {
00637       virtual bool operator()(const CIMValue& lhs, const CIMValue& rhs) const = 0;
00638       virtual const char* c_str() const = 0;
00639       virtual CompareImpl* reverseOrder() const = 0;
00640    };
00641    typedef IntrusiveReference<CompareImpl> CompareImplRef;
00642 
00643    struct Equals : public CompareImpl
00644    {
00645       virtual bool operator()(const CIMValue& lhs, const CIMValue& rhs) const;
00646       virtual const char* c_str() const { return "="; }
00647       virtual CompareImpl* reverseOrder() const { return new Equals; }
00648    };
00649    
00650    struct NotEquals : public CompareImpl
00651    {
00652       virtual bool operator()(const CIMValue& lhs, const CIMValue& rhs) const;
00653       virtual const char* c_str() const { return "<>"; }
00654       virtual CompareImpl* reverseOrder() const { return new NotEquals; }
00655    };
00656    struct GreaterThanOrEquals : public CompareImpl
00657    {
00658       virtual bool operator()(const CIMValue& lhs, const CIMValue& rhs) const;
00659       virtual const char* c_str() const { return ">="; }
00660       virtual CompareImpl* reverseOrder() const { return new LessThanOrEquals; }
00661    };
00662    
00663    struct LessThanOrEquals : public CompareImpl
00664    {
00665       virtual bool operator()(const CIMValue& lhs, const CIMValue& rhs) const;
00666       virtual const char* c_str() const { return "<="; }
00667       virtual CompareImpl* reverseOrder() const { return new GreaterThanOrEquals; }
00668    };
00669    struct GreaterThan : public CompareImpl
00670    {
00671       virtual bool operator()(const CIMValue& lhs, const CIMValue& rhs) const;
00672       virtual const char* c_str() const { return ">"; }
00673       virtual CompareImpl* reverseOrder() const { return new LessThan; }
00674    };
00675    
00676    struct LessThan : public CompareImpl
00677    {
00678       virtual bool operator()(const CIMValue& lhs, const CIMValue& rhs) const;
00679       virtual const char* c_str() const { return "<"; }
00680       virtual CompareImpl* reverseOrder() const { return new GreaterThan; }
00681    };
00682    class Compare
00683    {
00684    public:
00685       enum CompareTypes
00686       {
00687          EqualsType,
00688          NotEqualsType,
00689          GreaterThanOrEqualsType,
00690          LessThanOrEqualsType,
00691          GreaterThanType,
00692          LessThanType
00693       };
00694       Compare( const CompareTypes type )
00695       {
00696          switch (type)
00697          {
00698             case EqualsType:
00699                m_ref = CompareImplRef(new Equals);
00700                break;
00701             case NotEqualsType:
00702                m_ref = CompareImplRef(new NotEquals);
00703                break;
00704             case GreaterThanOrEqualsType:
00705                m_ref = CompareImplRef(new GreaterThanOrEquals);
00706                break;
00707             case LessThanOrEqualsType:
00708                m_ref = CompareImplRef(new LessThanOrEquals);
00709                break;
00710             case GreaterThanType:
00711                m_ref = CompareImplRef(new GreaterThan);
00712                break;
00713             case LessThanType:
00714                m_ref = CompareImplRef(new LessThan);
00715                break;
00716          }
00717       }
00718       
00719       bool operator()(const CIMValue& lhs, const CIMValue& rhs) const
00720       {
00721          return m_ref->operator()(lhs, rhs);
00722       }
00723       
00724       const char* c_str() const
00725       {
00726          return m_ref->c_str();
00727       }
00728       
00729       Compare& reverseOrder()
00730       {
00731          m_ref = m_ref->reverseOrder();
00732          return *this;
00733       }
00734       
00735    private:
00736       CompareImplRef m_ref;
00737    };
00738 public:
00739    CIMInstanceArray getInstances() const
00740    {
00741       return m_instances;
00742    }
00743    
00744 private:
00745 
00746 #ifdef OW_WIN32
00747 #pragma warning (push)
00748 #pragma warning (disable: 4251)
00749 #endif
00750 
00751    CIMInstanceArray m_instances; // return value after processing is done.
00752    DataType m_exprValue;
00753    Array<DataType> m_valueArray;
00754    CIMOMHandleIFCRef m_hdl;
00755    String m_ns;
00756    String m_tableRef;
00757    bool m_doingSelect;
00758    bool m_isSchemaQuery;
00759    StringArray m_propertyArray;
00760 
00761 #ifdef OW_WIN32
00762 #pragma warning (pop)
00763 #endif
00764 
00765    CIMInstanceArray filterInstancesOnPropertyValue(const String& propName, const CIMValue& val, const Compare& compare);
00766    void doComparison(const DataType& lhs, const DataType& rhs, const Compare& compare);
00767    void populateInstances(const String& className);
00768    void populateInstances();
00769    bool instanceIsDerivedFrom(const CIMInstance& inst,
00770       const String& className);
00771    bool classIsDerivedFrom(const String& cls,
00772       const String& className);
00773 };
00774 
00775 OW_WQL_API bool CIMInstanceSortCriterion( const CIMInstance& lhs, const CIMInstance& rhs);
00776 
00777 } // end namespace OW_NAMESPACE
00778 
00779 #endif

Generated on Thu Feb 9 08:48:18 2006 for openwbem by  doxygen 1.4.6