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

  1 chuck 1.1.2.6 //%2003////////////////////////////////////////////////////////////////////////
  2 chuck 1.1.2.3 //
  3               // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
  4               // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
  5 chuck 1.1.2.7 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
  6 chuck 1.1.2.3 // IBM Corp.; EMC Corporation, The Open Group.
  7               //
  8               // Permission is hereby granted, free of charge, to any person obtaining a copy
  9               // of this software and associated documentation files (the "Software"), to
 10               // deal in the Software without restriction, including without limitation the
 11               // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 12               // sell copies of the Software, and to permit persons to whom the Software is
 13               // furnished to do so, subject to the following conditions:
 14               // 
 15               // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 16               // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 17               // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 18               // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 19               // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 20               // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 21               // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 22               // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 23               //
 24               //==============================================================================
 25               //
 26               // Authors: David Rosckes (rosckes@us.ibm.com)
 27 chuck 1.1.2.3 //          Bert Rivero (hurivero@us.ibm.com)
 28               //          Chuck Carmack (carmack@us.ibm.com)
 29               //          Brian Lucier (lucier@us.ibm.com)
 30               //
 31               // Modified By: 
 32               // 
 33               // Modified By:
 34               //
 35               //%/////////////////////////////////////////////////////////////////////////////
 36               
 37 humberto 1.1.2.1 #ifndef Pegasus_QueryContext_h
 38                  #define Pegasus_QueryContext_h
 39 chuck    1.1.2.3 
 40 humberto 1.1.2.1 #include <Pegasus/Common/Config.h>
 41                  #include <Pegasus/CQL/Linkage.h>
 42                  #include <Pegasus/Common/CIMName.h>
 43                  #include <Pegasus/Common/CIMClass.h>
 44                  #include <Pegasus/Common/Array.h>
 45                  #include <Pegasus/Common/HashTable.h>
 46 chuck    1.1.2.8 #include <Pegasus/Common/AutoPtr.h>
 47 humberto 1.1.2.1 #include <Pegasus/CQL/CQLIdentifier.h>
 48 chuck    1.1.2.12 #include <Pegasus/CQL/CQLChainedIdentifier.h>
 49 humberto 1.1.2.1  #include <Pegasus/Common/String.h>
 50                   
 51                   PEGASUS_NAMESPACE_BEGIN
 52                   
 53 chuck    1.1.2.8  typedef HashTable<String, CQLIdentifier, EqualNoCaseFunc, HashLowerCaseFunc> HT_Alias_Class;
 54 humberto 1.1.2.1  
 55                   class PEGASUS_CQL_LINKAGE QueryContext
 56                   {
 57                      public:
 58 chuck    1.1.2.10   
 59                           enum ClassRelation
 60                           {
 61                             SAMECLASS,
 62                             SUBCLASS,
 63                             SUPERCLASS,
 64                             NOTRELATED
 65                           };
 66 humberto 1.1.2.1  
 67 chuck    1.1.2.3  	virtual ~QueryContext();
 68 humberto 1.1.2.1  
 69 chuck    1.1.2.8  	virtual QueryContext* clone() = 0;
 70                   
 71 humberto 1.1.2.1          String getHost(Boolean fullyQualified = true);
 72                   
 73 chuck    1.1.2.3          CIMNamespaceName getNamespace() const;
 74 humberto 1.1.2.1  
 75 humberto 1.1.2.2          void insertClassPath(const CQLIdentifier& inIdentifier, String inAlias = String::EMPTY);
 76 humberto 1.1.2.1  
 77 chuck    1.1.2.12         void addWhereIdentifier(const CQLChainedIdentifier& inIdentifier);
 78                   
 79                           Array<CQLChainedIdentifier> getWhereList();
 80                   
 81 david    1.1.2.9          CQLIdentifier findClass(const String& inAlias) const;
 82 humberto 1.1.2.1  
 83 chuck    1.1.2.3          Array<CQLIdentifier> getFromList() const;
 84 chuck    1.1.2.8  	
 85                   	String getFromString() const;
 86 humberto 1.1.2.1  
 87 david    1.1.2.11         virtual CIMClass getClass(const CIMName& inClassName)const = 0;
 88 chuck    1.1.2.10 
 89 david    1.1.2.11 	virtual Array<CIMName> enumerateClassNames(const CIMName& inClassName)const = 0;
 90 chuck    1.1.2.10 
 91                           // Returns true if the derived class is a subclass of the base class.
 92                           // Note: this will return false if the classes are the same.
 93                           // Note: the default namespace of the query is used.
 94                           virtual Boolean isSubClass(const CIMName& baseClass,
 95 david    1.1.2.11                                    const CIMName& derivedClass)const = 0;
 96 chuck    1.1.2.10 
 97                           // Returns the relationship between the anchor class and the related
 98                           // class in the class schema of the query's default name space.
 99                           virtual ClassRelation getClassRelation(const CIMName& anchorClass,
100 david    1.1.2.11                                                const CIMName& relatedClass)const = 0;
101 chuck    1.1.2.10 
102 chuck    1.1.2.4          void clear();
103                   
104 humberto 1.1.2.1     protected:
105 chuck    1.1.2.3  
106                   	QueryContext(const QueryContext& ctx);
107                   
108                           QueryContext(CIMNamespaceName& inNS);
109                   
110                   	QueryContext& operator=(const QueryContext& rhs);
111 humberto 1.1.2.1            
112                      private: 
113                   
114 chuck    1.1.2.3  	QueryContext();
115                   
116 humberto 1.1.2.1          // members
117                           CIMNamespaceName _NS;
118                   	HT_Alias_Class _AliasClassTable;
119                   	Array<CQLIdentifier> _fromList;
120 chuck    1.1.2.12 	Array<CQLChainedIdentifier> _whereList;
121 humberto 1.1.2.1  };
122                   
123                   PEGASUS_NAMESPACE_END
124                   #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2