1 karl 1.7 //%2006////////////////////////////////////////////////////////////////////////
|
2 chuck 1.2 //
|
3 karl 1.5 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 chuck 1.2 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.5 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
9 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.7 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 chuck 1.2 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
20 //
21 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 // Authors: David Rosckes (rosckes@us.ibm.com)
33 // Bert Rivero (hurivero@us.ibm.com)
34 chuck 1.2 // Chuck Carmack (carmack@us.ibm.com)
35 // Brian Lucier (lucier@us.ibm.com)
36 //
|
37 vijay.eli 1.6 // Modified By: Vijay Eli, IBM (vijayeli@in.ibm.com) bug#3590
|
38 chuck 1.2 //
39 //%/////////////////////////////////////////////////////////////////////////////
40
41 #include <Pegasus/CQL/CQLFunction.h>
42 #include <Pegasus/CQL/CQLFunctionRep.h>
43 //#include <Pegasus/CQL/CQLExpression.h>
44 #include <Pegasus/CQL/CQLPredicate.h>
45 #include <Pegasus/CQL/CQLFactory.h>
46 PEGASUS_NAMESPACE_BEGIN
47
48 CQLFunction::CQLFunction()
49 {
50 _rep = new CQLFunctionRep();
51 }
52
53 CQLFunction::CQLFunction(CQLIdentifier inOpType, Array<CQLPredicate> inParms)
54 {
55 _rep = new CQLFunctionRep(inOpType,inParms);
56 }
57
58 CQLFunction::CQLFunction(const CQLFunction& inFunc)
59 chuck 1.2 {
60 _rep = new CQLFunctionRep(inFunc._rep);
61 }
62
63 CQLFunction::~CQLFunction(){
64 if(_rep)
65 delete _rep;
66 }
67
68 CQLValue CQLFunction::resolveValue(const CIMInstance& CI, const QueryContext& queryCtx)
69 {
70 return _rep->resolveValue(CI,queryCtx);
71 }
72
73 String CQLFunction::toString()const
74 {
75 return _rep->toString();
76 }
77
78
79 Array<CQLPredicate> CQLFunction::getParms()const
80 chuck 1.2 {
81 return _rep->getParms();
82 }
83
84 FunctionOpType CQLFunction::getFunctionType()const
85 {
86 return _rep->getFunctionType();
87 }
88
|
89 vijay.eli 1.6 void CQLFunction::applyContext(const QueryContext& inContext)
|
90 chuck 1.2 {
91 _rep->applyContext(inContext);
92 }
93
94 CQLFunction& CQLFunction::operator=(const CQLFunction& rhs){
95 if(&rhs != this){
96 if(_rep) delete _rep;
97 _rep = new CQLFunctionRep(rhs._rep);
98 }
99 return *this;
100 }
101
|
102 humberto 1.4 /*
|
103 chuck 1.2 Boolean CQLFunction::operator==(const CQLFunction& func)const{
|
104 humberto 1.3 return (*_rep == *(func._rep));
|
105 chuck 1.2 }
106 Boolean CQLFunction::operator!=(const CQLFunction& func)const{
107 return (_rep != func._rep);
108 }
|
109 humberto 1.4 */
|
110 chuck 1.2 PEGASUS_NAMESPACE_END
|