Qpid C++ Messaging API  1.39.0
Address.h
1 #ifndef QPID_MESSAGING_ADDRESS_H
2 #define QPID_MESSAGING_ADDRESS_H
3 
4 /*
5  *
6  * Licensed to the Apache Software Foundation (ASF) under one
7  * or more contributor license agreements. See the NOTICE file
8  * distributed with this work for additional information
9  * regarding copyright ownership. The ASF licenses this file
10  * to you under the Apache License, Version 2.0 (the
11  * "License"); you may not use this file except in compliance
12  * with the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing,
17  * software distributed under the License is distributed on an
18  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19  * KIND, either express or implied. See the License for the
20  * specific language governing permissions and limitations
21  * under the License.
22  *
23  */
24 #include "qpid/messaging/ImportExport.h"
25 
26 #include "qpid/messaging/exceptions.h"
27 #include "qpid/types/Variant.h"
28 
29 #include <string>
30 #include <ostream>
31 
32 namespace qpid {
33 namespace messaging {
34 
35 class AddressImpl;
36 
122 class QPID_MESSAGING_CLASS_EXTERN Address
123 {
124  public:
125  QPID_MESSAGING_EXTERN Address();
126  QPID_MESSAGING_EXTERN Address(const std::string& address);
127  QPID_MESSAGING_EXTERN Address(const std::string& name, const std::string& subject,
128  const qpid::types::Variant::Map& options, const std::string& type = "");
129  QPID_MESSAGING_EXTERN Address(const Address& address);
130  QPID_MESSAGING_EXTERN ~Address();
131  QPID_MESSAGING_EXTERN Address& operator=(const Address&);
132  QPID_MESSAGING_EXTERN const std::string& getName() const;
133  QPID_MESSAGING_EXTERN void setName(const std::string&);
134  QPID_MESSAGING_EXTERN const std::string& getSubject() const;
135  QPID_MESSAGING_EXTERN void setSubject(const std::string&);
136  QPID_MESSAGING_EXTERN const qpid::types::Variant::Map& getOptions() const;
137  QPID_MESSAGING_EXTERN qpid::types::Variant::Map& getOptions();
138  QPID_MESSAGING_EXTERN void setOptions(const qpid::types::Variant::Map&);
139 
140  QPID_MESSAGING_EXTERN std::string getType() const;
149  QPID_MESSAGING_EXTERN void setType(const std::string&);
150 
151  QPID_MESSAGING_EXTERN std::string str() const;
152  QPID_MESSAGING_EXTERN operator bool() const;
153  QPID_MESSAGING_EXTERN bool operator !() const;
154  private:
155  AddressImpl* impl;
156  friend class AddressImpl;
157 };
158 
159 #ifndef SWIG
160 QPID_MESSAGING_EXTERN std::ostream& operator<<(std::ostream& out, const Address& address);
161 #endif
162 
163 }} // namespace qpid::messaging
164 
165 #endif
Definition: Address.h:122
Definition: Address.h:32