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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2