Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
00001 #ifndef QMF_QUERY_H 00002 #define QMF_QUERY_H 00003 /* 00004 * 00005 * Licensed to the Apache Software Foundation (ASF) under one 00006 * or more contributor license agreements. See the NOTICE file 00007 * distributed with this work for additional information 00008 * regarding copyright ownership. The ASF licenses this file 00009 * to you under the Apache License, Version 2.0 (the 00010 * "License"); you may not use this file except in compliance 00011 * with the License. You may obtain a copy of the License at 00012 * 00013 * http://www.apache.org/licenses/LICENSE-2.0 00014 * 00015 * Unless required by applicable law or agreed to in writing, 00016 * software distributed under the License is distributed on an 00017 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 00018 * KIND, either express or implied. See the License for the 00019 * specific language governing permissions and limitations 00020 * under the License. 00021 * 00022 */ 00023 00024 #if !defined(QMF_USE_DEPRECATED_API) && !defined(qmf2_EXPORTS) && !defined(SWIG) 00025 # error "The API defined in this file has been DEPRECATED and will be removed in the future." 00026 # error "Define 'QMF_USE_DEPRECATED_API' to enable continued use of the API." 00027 #endif 00028 00029 #include <qmf/ImportExport.h> 00030 #include "qmf/Handle.h" 00031 #include "qpid/types/Variant.h" 00032 #include <string> 00033 00034 namespace qmf { 00035 00036 #ifndef SWIG 00037 template <class> class PrivateImplRef; 00038 #endif 00039 00040 class QueryImpl; 00041 class SchemaId; 00042 class DataAddr; 00043 00044 enum QueryTarget { 00045 QUERY_OBJECT = 1, 00046 QUERY_OBJECT_ID = 2, 00047 QUERY_SCHEMA = 3, 00048 QUERY_SCHEMA_ID = 4 00049 }; 00050 00051 class QMF_CLASS_EXTERN Query : public qmf::Handle<QueryImpl> { 00052 public: 00053 QMF_EXTERN Query(QueryImpl* impl = 0); 00054 QMF_EXTERN Query(const Query&); 00055 QMF_EXTERN Query& operator=(const Query&); 00056 QMF_EXTERN ~Query(); 00057 00058 QMF_EXTERN Query(QueryTarget, const std::string& predicate=""); 00059 QMF_EXTERN Query(QueryTarget, const std::string& className, const std::string& package, const std::string& predicate=""); 00060 QMF_EXTERN Query(QueryTarget, const SchemaId&, const std::string& predicate=""); 00061 QMF_EXTERN Query(const DataAddr&); 00062 00063 QMF_EXTERN QueryTarget getTarget() const; 00064 QMF_EXTERN const DataAddr& getDataAddr() const; 00065 QMF_EXTERN const SchemaId& getSchemaId() const; 00066 QMF_EXTERN void setPredicate(const qpid::types::Variant::List&); 00067 QMF_EXTERN const qpid::types::Variant::List& getPredicate() const; 00068 QMF_EXTERN bool matchesPredicate(const qpid::types::Variant::Map& map) const; 00069 00070 #ifndef SWIG 00071 private: 00072 friend class qmf::PrivateImplRef<Query>; 00073 friend struct QueryImplAccess; 00074 #endif 00075 }; 00076 00077 } 00078 00079 #endif