1 humberto 1.1.2.1 #ifndef Pegasus_CQLChainedIdentifier_h
2 #define Pegasus_CQLChainedIdentifier_h
3
4 #include <Pegasus/Common/Config.h>
5 #include <Pegasus/CQL/Linkage.h>
6 #include <Pegasus/Common/Array.h>
7 #include <Pegasus/Common/String.h>
8 #include <Pegasus/CQL/CQLIdentifier.h>
9 PEGASUS_NAMESPACE_BEGIN
|
10 humberto 1.1.2.4 class PEGASUS_CQL_LINKAGE CQLScope;
11 class PEGASUS_CQL_LINKAGE CQLChainedIdentifierRep;
12
|
13 humberto 1.1.2.1 /**
14 CQLChainedIdentifier class is used for parsing (not resolving)
15 the identifier portion of a CQL select statement.
16 A couple examples of a CQLIdentifier:
17
18 Class.EmbeddedObject.Property[3]
19 Class.Property#'OK'
20
21
22 The CQLChainedIdentifier class can parse and return each
23 section of a CQL identifier. The possible sections are:
24
25 class (optional)
26 zero or more embedded objects
27 property
28
29 Note: this must handle wildcard("*"), embedded objects, arrays, symbolic
30 constants, etc.
31 */
32 class PEGASUS_CQL_LINKAGE CQLChainedIdentifier
33 {
34 humberto 1.1.2.1 public:
|
35 humberto 1.1.2.2
|
36 humberto 1.1.2.4 CQLChainedIdentifier():_rep(0){}
|
37 humberto 1.1.2.1 /** constructor
38 Parses the string into the various components of a CQL identifier.
39 Throws parsing errors.
40 */
41 CQLChainedIdentifier(String inString);
42
|
43 humberto 1.1.2.2 CQLChainedIdentifier(CQLIdentifier & id);
|
44 humberto 1.1.2.3
45 CQLChainedIdentifier(const CQLChainedIdentifier& cid);
|
46 humberto 1.1.2.2
|
47 humberto 1.1.2.4 ~CQLChainedIdentifier();
|
48 humberto 1.1.2.2
|
49 humberto 1.1.2.1 /** The getSubIdentifiers method
50 returns the array of subIdentifiers from a CQL SELECT
51 statement. If there are no subidentifiers, an empty array is returned.
52
53 Example:
54 myClass.embeddedObject.myProperty would return an array of 2 strings:
55 'myClass' and 'embeddedObject'.
56 myProperty would return an empty array.
57
58 */
59 const Array<CQLIdentifier>& getSubIdentifiers()const;
60
61 String toString()const;
62
|
63 humberto 1.1.2.2 void append(CQLIdentifier & id);
64
|
65 humberto 1.1.2.3 Uint32 size();
66
67 Boolean prepend(CQLIdentifier & id);
68
69 CQLIdentifier& operator[](Uint32 index);
70
71 Boolean isSubChain(CQLChainedIdentifier & chain);
72
|
73 humberto 1.1.2.2 CQLIdentifier getLastIdentifier();
|
74 humberto 1.1.2.3
75 void applyScopes(Array<CQLScope>& scopes);
|
76 humberto 1.1.2.2
|
77 humberto 1.1.2.1 private:
78
79 void parse(String & string);
80
|
81 humberto 1.1.2.4 CQLChainedIdentifierRep* _rep;
|
82 humberto 1.1.2.1
83 };
84
85 PEGASUS_NAMESPACE_END
86
87 #endif /* Pegasus_CQLChainedIdentifier_h */
|