1 humberto 1.1 #ifndef Pegasus_CQLFactor_h
2 #define Pegasus_CQLFactor_h
3
4 #include <Pegasus/Common/Config.h>
5 #include <Pegasus/CQL/CQLValue.h>
6 #include <Pegasus/CQL/Linkage.h>
7 #include <Pegasus/CQL/CQLScope.h>
|
8 humberto 1.2.2.2 //#include <Pegasus/CQL/CQLExpression.h>
9 #include <Pegasus/CQL/CQLPredicate.h>
|
10 humberto 1.1
11
12 PEGASUS_NAMESPACE_BEGIN
13
14 class PEGASUS_CQL_LINKAGE CQLFactory;
|
15 humberto 1.2.2.2 //class PEGASUS_CQL_LINKAGE CQLPredicate;
|
16 humberto 1.1 /*
17 CQLFunction objects are populated by the
18 Bison code.
19
20 Supported functions are in accordance with the
21 DMTF CQL Specification.
22 TODO: THIS LIST IS SUBJECT TO CHANGE
23
24 classname( <expr> )
25 classname( )
26 count(*)
27 count( distinct * )
28 count( distinct <expr> )
29 something for createarray
30 something for datetime
31 something for hostname
32 max( <expr> )
33 mean( <expr> )
34 median( <expr> )
35 min( <expr> )
36 something for modelpath
37 humberto 1.1 something for namespacename
38 something for namespacepath
39 something for objectpath
40 something for scheme
41 sum( <expr> )
42 something for userinfo
43 uppercase( <expr> )
44
45 */
46
47
48 class PEGASUS_CQL_LINKAGE CQLFunctionRep
49 {
50 public:
51
52
53 CQLFunctionRep() {};
54 CQLFunctionRep(const CQLFunctionRep& inFunc);
|
55 humberto 1.2.2.2 //CQLFunctionRep(FunctionOpType inFunctionOpType, Array<CQLExpression> inParms);
56 CQLFunctionRep(CQLIdentifier inOpType, Array<CQLPredicate> inParms);
57 ~CQLFunctionRep();
|
58 humberto 1.1 /**
59 The getValue method validates the parms versus FunctionOpType.
60 (A) resolves prarameter types
61 (B) number of parms
62 and then actually executes the function.
63 Returns a CQLValue object that has already been resolved.
64 */
65 CQLValue resolveValue(CIMInstance CI, QueryContext& queryCtx);
|
66 humberto 1.2.2.2 Array<CQLPredicate> getParms();
|
67 humberto 1.1 FunctionOpType getFunctionType();
68 String toString();
69 void applyScopes(Array<CQLScope> inScopes);
70 Boolean operator==(const CQLFunctionRep& func);
71 Boolean operator!=(const CQLFunctionRep& func);
72 friend class CQLFactory;
73
74 private:
75
76 FunctionOpType _funcOpType;
77
|
78 humberto 1.2.2.2 Array<CQLPredicate> _parms;
|
79 humberto 1.1
80 };
81
82 PEGASUS_NAMESPACE_END
83
84 #endif
|