[PATCH 1/2] [mama] Iterator operator added


Ian Bell <IBell@...>
 

From 47121238854a5b7c5049bf869c7cb28c11404552 Mon Sep 17 00:00:00 2001

Message-Id: <47121238854a5b7c5049bf869c7cb28c11404552.1348677184.git.ibell@...>

From: Ian Bell <ibell@...>

Date: Wed, 26 Sep 2012 17:31:35 +0100

Subject: [PATCH 1/2] [mama] Iterator operator added

 

Added -> operator to msg iterator.

 

Signed-off-by: Ian Bell <ibell@...>

---

mama/c_cpp/src/cpp/MamaMsg.cpp    |    5 +++++

mama/c_cpp/src/cpp/mama/MamaMsg.h |    1 +

2 files changed, 6 insertions(+)

 

diff --git a/mama/c_cpp/src/cpp/MamaMsg.cpp b/mama/c_cpp/src/cpp/MamaMsg.cpp

index bbdb1c9..b413bef 100644

--- a/mama/c_cpp/src/cpp/MamaMsg.cpp

+++ b/mama/c_cpp/src/cpp/MamaMsg.cpp

@@ -2490,6 +2490,11 @@ void MamaMsg::method (const MamaFieldDescriptor* field, fType value)   \

         return (mMsgField);

     }

+    MamaMsgField* MamaMsgIterator::operator->()

+    {

+        return &mMsgField;

+    }

+

     MamaMsgIterator& MamaMsgIterator::operator++()

     {

         mMsgField.set (mamaMsgIterator_next((mamaMsgIterator)myImpl));

diff --git a/mama/c_cpp/src/cpp/mama/MamaMsg.h b/mama/c_cpp/src/cpp/mama/MamaMsg.h

index 4c13163..c37680c 100644

--- a/mama/c_cpp/src/cpp/mama/MamaMsg.h

+++ b/mama/c_cpp/src/cpp/mama/MamaMsg.h

@@ -65,6 +65,7 @@ namespace Wombat

        bool operator!=(const MamaMsgIterator&) const;

         MamaMsgField&    operator*();

+        MamaMsgField*    operator->();

         MamaMsgIterator& operator++();

     protected:

--

1.7.9.5

 




Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Join Openmama-dev@lists.openmama.org to automatically receive all group messages.