(file) Return to CQLChainedIdentifierRep.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / CQL

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2