1 martin 1.9 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.10 //
|
3 martin 1.9 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.10 //
|
10 martin 1.9 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.10 //
|
17 martin 1.9 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.10 //
|
20 martin 1.9 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.10 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.9 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.10 //
|
28 martin 1.9 //////////////////////////////////////////////////////////////////////////
|
29 chuck 1.2 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #include <Pegasus/CQL/CQLFunction.h>
33 #include <Pegasus/CQL/CQLFunctionRep.h>
34 //#include <Pegasus/CQL/CQLExpression.h>
35 #include <Pegasus/CQL/CQLPredicate.h>
36 #include <Pegasus/CQL/CQLFactory.h>
37 PEGASUS_NAMESPACE_BEGIN
38
39 CQLFunction::CQLFunction()
40 {
|
41 karl 1.8 _rep = new CQLFunctionRep();
|
42 kumpf 1.11 }
|
43 chuck 1.2
44 CQLFunction::CQLFunction(CQLIdentifier inOpType, Array<CQLPredicate> inParms)
45 {
|
46 karl 1.8 _rep = new CQLFunctionRep(inOpType,inParms);
|
47 chuck 1.2 }
48
49 CQLFunction::CQLFunction(const CQLFunction& inFunc)
50 {
|
51 karl 1.8 _rep = new CQLFunctionRep(inFunc._rep);
|
52 chuck 1.2 }
53
54 CQLFunction::~CQLFunction(){
|
55 karl 1.8 if(_rep)
56 delete _rep;
|
57 chuck 1.2 }
58
|
59 karl 1.8 CQLValue CQLFunction::resolveValue(const CIMInstance& CI,
60 const QueryContext& queryCtx)
|
61 chuck 1.2 {
|
62 karl 1.8 return _rep->resolveValue(CI,queryCtx);
|
63 chuck 1.2 }
64
65 String CQLFunction::toString()const
66 {
|
67 karl 1.8 return _rep->toString();
|
68 chuck 1.2 }
69
70
71 Array<CQLPredicate> CQLFunction::getParms()const
72 {
|
73 karl 1.8 return _rep->getParms();
|
74 chuck 1.2 }
75
76 FunctionOpType CQLFunction::getFunctionType()const
77 {
|
78 karl 1.8 return _rep->getFunctionType();
|
79 chuck 1.2 }
|
80 kumpf 1.11
|
81 vijay.eli 1.6 void CQLFunction::applyContext(const QueryContext& inContext)
|
82 chuck 1.2 {
|
83 karl 1.8 _rep->applyContext(inContext);
|
84 chuck 1.2 }
85
|
86 karl 1.8 CQLFunction& CQLFunction::operator=(const CQLFunction& rhs)
87 {
88 if(&rhs != this)
89 {
90 if(_rep) delete _rep;
91 _rep = new CQLFunctionRep(rhs._rep);
92 }
93 return *this;
|
94 chuck 1.2 }
95
|
96 humberto 1.4 /*
|
97 chuck 1.2 Boolean CQLFunction::operator==(const CQLFunction& func)const{
|
98 karl 1.8 return (*_rep == *(func._rep));
|
99 chuck 1.2 }
100 Boolean CQLFunction::operator!=(const CQLFunction& func)const{
|
101 karl 1.8 return (_rep != func._rep);
|
102 chuck 1.2 }
|
103 humberto 1.4 */
|
104 chuck 1.2 PEGASUS_NAMESPACE_END
|