qmf/Query.h Source File

Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

qmf/Query.h
Go to the documentation of this file.

    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 #include <qmf/ImportExport.h>
    00025 #include "qmf/Handle.h"
    00026 #include "qpid/types/Variant.h"
    00027 #include <string>
    00028
    00029 namespace qmf {
    00030
    00031 #ifndef SWIG
    00032     template <class> class PrivateImplRef;
    00033 #endif
    00034
    00035     class QueryImpl;
    00036     class SchemaId;
    00037     class DataAddr;
    00038
    00039     enum QueryTarget {
    00040     QUERY_OBJECT    = 1,
    00041     QUERY_OBJECT_ID = 2,
    00042     QUERY_SCHEMA    = 3,
    00043     QUERY_SCHEMA_ID = 4
    00044     };
    00045
    00046     class QMF_CLASS_EXTERN Query : public qmf::Handle<QueryImpl> {
    00047     public:
    00048         QMF_EXTERN Query(QueryImpl* impl = 0);
    00049         QMF_EXTERN Query(const Query&);
    00050         QMF_EXTERN Query& operator=(const Query&);
    00051         QMF_EXTERN ~Query();
    00052
    00053         QMF_EXTERN Query(QueryTarget, const std::string& predicate="");
    00054         QMF_EXTERN Query(QueryTarget, const std::string& className, const std::string& package, const std::string& predicate="");
    00055         QMF_EXTERN Query(QueryTarget, const SchemaId&, const std::string& predicate="");
    00056         QMF_EXTERN Query(const DataAddr&);
    00057
    00058         QMF_EXTERN QueryTarget getTarget() const;
    00059         QMF_EXTERN const DataAddr& getDataAddr() const;
    00060         QMF_EXTERN const SchemaId& getSchemaId() const;
    00061         QMF_EXTERN void setPredicate(const qpid::types::Variant::List&);
    00062         QMF_EXTERN const qpid::types::Variant::List& getPredicate() const;
    00063         QMF_EXTERN bool matchesPredicate(const qpid::types::Variant::Map& map) const;
    00064
    00065 #ifndef SWIG
    00066     private:
    00067         friend class qmf::PrivateImplRef<Query>;
    00068         friend struct QueryImplAccess;
    00069 #endif
    00070     };
    00071
    00072 }
    00073
    00074 #endif