Qpid Management Framework  0.24
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Query.h
Go to the documentation of this file.
1 #ifndef QMF_QUERY_H
2 #define QMF_QUERY_H
3 /*
4  *
5  * Licensed to the Apache Software Foundation (ASF) under one
6  * or more contributor license agreements. See the NOTICE file
7  * distributed with this work for additional information
8  * regarding copyright ownership. The ASF licenses this file
9  * to you under the Apache License, Version 2.0 (the
10  * "License"); you may not use this file except in compliance
11  * with the License. You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing,
16  * software distributed under the License is distributed on an
17  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  * KIND, either express or implied. See the License for the
19  * specific language governing permissions and limitations
20  * under the License.
21  *
22  */
23 
24 #include <qmf/ImportExport.h>
25 #include "qmf/Handle.h"
26 #include "qpid/types/Variant.h"
27 #include <string>
28 
29 namespace qmf {
30 
31 #ifndef SWIG
32  template <class> class PrivateImplRef;
33 #endif
34 
35  class QueryImpl;
36  class SchemaId;
37  class DataAddr;
38 
39  enum QueryTarget {
44  };
45 
46  class QMF_CLASS_EXTERN Query : public qmf::Handle<QueryImpl> {
47  public:
48  QMF_EXTERN Query(QueryImpl* impl = 0);
49  QMF_EXTERN Query(const Query&);
50  QMF_EXTERN Query& operator=(const Query&);
51  QMF_EXTERN ~Query();
52 
53  QMF_EXTERN Query(QueryTarget, const std::string& predicate="");
54  QMF_EXTERN Query(QueryTarget, const std::string& className, const std::string& package, const std::string& predicate="");
55  QMF_EXTERN Query(QueryTarget, const SchemaId&, const std::string& predicate="");
56  QMF_EXTERN Query(const DataAddr&);
57 
58  QMF_EXTERN QueryTarget getTarget() const;
59  QMF_EXTERN const DataAddr& getDataAddr() const;
60  QMF_EXTERN const SchemaId& getSchemaId() const;
61  QMF_EXTERN void setPredicate(const qpid::types::Variant::List&);
62  QMF_EXTERN const qpid::types::Variant::List& getPredicate() const;
63  QMF_EXTERN bool matchesPredicate(const qpid::types::Variant::Map& map) const;
64 
65 #ifndef SWIG
66  private:
67  friend class qmf::PrivateImplRef<Query>;
68  friend struct QueryImplAccess;
69 #endif
70  };
71 
72 }
73 
74 #endif