Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
00001 #ifndef QPID_MESSAGING_LISTVIEW_H 00002 #define QPID_MESSAGING_LISTVIEW_H 00003 00004 /* 00005 * 00006 * Licensed to the Apache Software Foundation (ASF) under one 00007 * or more contributor license agreements. See the NOTICE file 00008 * distributed with this work for additional information 00009 * regarding copyright ownership. The ASF licenses this file 00010 * to you under the Apache License, Version 2.0 (the 00011 * "License"); you may not use this file except in compliance 00012 * with the License. You may obtain a copy of the License at 00013 * 00014 * http://www.apache.org/licenses/LICENSE-2.0 00015 * 00016 * Unless required by applicable law or agreed to in writing, 00017 * software distributed under the License is distributed on an 00018 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 00019 * KIND, either express or implied. See the License for the 00020 * specific language governing permissions and limitations 00021 * under the License. 00022 * 00023 */ 00024 00025 #include "qpid/client/ClientImportExport.h" 00026 #include "Variant.h" 00027 00028 namespace qpid { 00029 namespace messaging { 00030 00031 class ListViewImpl; 00032 class Message; 00033 00037 class ListView 00038 { 00039 public: 00040 typedef Variant::List::const_iterator const_iterator; 00041 typedef Variant::List::const_reverse_iterator const_reverse_iterator; 00042 00043 QPID_CLIENT_EXTERN ListView(const Message&); 00044 QPID_CLIENT_EXTERN ~ListView(); 00045 QPID_CLIENT_EXTERN ListView& operator=(const ListView&); 00046 00047 QPID_CLIENT_EXTERN const_iterator begin() const; 00048 QPID_CLIENT_EXTERN const_iterator end() const; 00049 QPID_CLIENT_EXTERN const_reverse_iterator rbegin() const; 00050 QPID_CLIENT_EXTERN const_reverse_iterator rend() const; 00051 00052 QPID_CLIENT_EXTERN bool empty() const; 00053 QPID_CLIENT_EXTERN size_t size() const; 00054 00055 QPID_CLIENT_EXTERN const Variant& front() const; 00056 QPID_CLIENT_EXTERN const Variant& back() const; 00057 00058 QPID_CLIENT_EXTERN const Variant::List& asList() const; 00059 private: 00060 ListViewImpl* impl; 00061 }; 00062 00063 QPID_CLIENT_EXTERN std::ostream& operator<<(std::ostream& out, const ListView& m); 00064 00065 }} // namespace qpid::messaging 00066 00067 #endif