From 770fe5e291b1d3892cce32dc45a0fa23ea6987df Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 20 Dec 2013 18:51:42 +0000 Subject: NO-JIRA: Rename Message_ostream.h/.cpp to Message_io.h/.cpp. Allow for addition of istream operator in future. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1552780 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/examples/messaging/drain.cpp | 2 +- cpp/examples/messaging/spout.cpp | 2 +- cpp/include/qpid/messaging/Message_io.h | 34 +++++++++++++++++++++ cpp/include/qpid/messaging/Message_ostream.h | 34 --------------------- cpp/src/CMakeLists.txt | 2 +- cpp/src/qpid/messaging/Message_io.cpp | 45 ++++++++++++++++++++++++++++ cpp/src/qpid/messaging/Message_ostream.cpp | 45 ---------------------------- 7 files changed, 82 insertions(+), 82 deletions(-) create mode 100644 cpp/include/qpid/messaging/Message_io.h delete mode 100644 cpp/include/qpid/messaging/Message_ostream.h create mode 100644 cpp/src/qpid/messaging/Message_io.cpp delete mode 100644 cpp/src/qpid/messaging/Message_ostream.cpp (limited to 'cpp') diff --git a/cpp/examples/messaging/drain.cpp b/cpp/examples/messaging/drain.cpp index bfd9bdccbe..0c58cc25e6 100644 --- a/cpp/examples/messaging/drain.cpp +++ b/cpp/examples/messaging/drain.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/examples/messaging/spout.cpp b/cpp/examples/messaging/spout.cpp index b2fc3aa40b..d11bb8bd03 100644 --- a/cpp/examples/messaging/spout.cpp +++ b/cpp/examples/messaging/spout.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/include/qpid/messaging/Message_io.h b/cpp/include/qpid/messaging/Message_io.h new file mode 100644 index 0000000000..810c44810c --- /dev/null +++ b/cpp/include/qpid/messaging/Message_io.h @@ -0,0 +1,34 @@ +#ifndef QPID_MESSAGING_MESSAGE_IO_H +#define QPID_MESSAGING_MESSAGE_IO_H + +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +#include "Message.h" +#include + +namespace qpid { +namespace messaging { + +QPID_MESSAGING_EXTERN std::ostream& operator<<(std::ostream&, const Message&); + +}} // namespace qpid::messaging + +#endif /*!QPID_MESSAGING_MESSAGE_IO_H*/ diff --git a/cpp/include/qpid/messaging/Message_ostream.h b/cpp/include/qpid/messaging/Message_ostream.h deleted file mode 100644 index f5e36bda24..0000000000 --- a/cpp/include/qpid/messaging/Message_ostream.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef QPID_MESSAGING_MESSAGE_OSTREAM_H -#define QPID_MESSAGING_MESSAGE_OSTREAM_H - -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#include "Message.h" -#include - -namespace qpid { -namespace messaging { - -QPID_MESSAGING_EXTERN std::ostream& operator<<(std::ostream&, const Message&); - -}} // namespace qpid::messaging - -#endif /*!QPID_MESSAGING_MESSAGE_OSTREAM_H*/ diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt index 43037ee2bf..70288c7661 100644 --- a/cpp/src/CMakeLists.txt +++ b/cpp/src/CMakeLists.txt @@ -1064,7 +1064,7 @@ set (qpidmessaging_SOURCES qpid/messaging/ConnectionOptions.cpp qpid/messaging/MessageImpl.h qpid/messaging/MessageImpl.cpp - qpid/messaging/Message_ostream.cpp + qpid/messaging/Message_io.cpp qpid/messaging/ProtocolRegistry.cpp qpid/messaging/amqp/EncodedMessage.h qpid/messaging/amqp/EncodedMessage.cpp diff --git a/cpp/src/qpid/messaging/Message_io.cpp b/cpp/src/qpid/messaging/Message_io.cpp new file mode 100644 index 0000000000..b6bc43a4e6 --- /dev/null +++ b/cpp/src/qpid/messaging/Message_io.cpp @@ -0,0 +1,45 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +#include "qpid/messaging/Message_io.h" +#include + +namespace qpid { +namespace messaging { + +using namespace std; +ostream& operator<<(ostream& o, const Message& message) { + o << "Message(properties=" << message.getProperties(); + if (!message.getSubject().empty()) { + o << ", subject='" << message.getSubject() << "'"; + } + if (!message.getContentObject().isVoid()) { + o << ", content='"; + if (message.getContentType() == "amqp/map") { + o << message.getContentObject().asMap(); + } else { + o << message.getContentObject(); + } + } + o << "')"; + return o; +} + +}} // namespace qpid::messaging diff --git a/cpp/src/qpid/messaging/Message_ostream.cpp b/cpp/src/qpid/messaging/Message_ostream.cpp deleted file mode 100644 index 6adae12315..0000000000 --- a/cpp/src/qpid/messaging/Message_ostream.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#include "qpid/messaging/Message_ostream.h" -#include - -namespace qpid { -namespace messaging { - -using namespace std; -ostream& operator<<(ostream& o, const Message& message) { - o << "Message(properties=" << message.getProperties(); - if (!message.getSubject().empty()) { - o << ", subject='" << message.getSubject() << "'"; - } - if (!message.getContentObject().isVoid()) { - o << ", content='"; - if (message.getContentType() == "amqp/map") { - o << message.getContentObject().asMap(); - } else { - o << message.getContentObject(); - } - } - o << "')"; - return o; -} - -}} // namespace qpid::messaging -- cgit v1.2.1