activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matvey Aizenshtat (JIRA)" <>
Subject [jira] Created: (AMQCPP-143) declara BytesMessage::readXXX() methods as 'const'
Date Fri, 21 Sep 2007 11:41:23 GMT
declara BytesMessage::readXXX() methods as 'const' 

                 Key: AMQCPP-143
             Project: ActiveMQ C++ Client
          Issue Type: Improvement
          Components: CMS Impl
    Affects Versions: 2.2
         Environment: language specific, all the platforms
            Reporter: Matvey Aizenshtat
            Assignee: Nathan Mittler
            Priority: Minor

BytesMessage readXXX() methods (readBytes() etc) aren't 'const' since the internal stream
state is changed.

But if only the stream pointer is updated, I suppose we could have another solution here,
declare inputStream field as 'mutable':

mutable io::ByteArrayInputStream inputStream;

In that case we could keep read methods const.

I am requesting for that because at the moment such non-const API forces app level either
always deal with non-const objects or make const_cast<cms::BytesMessage *>(), that's
not good.

See also:

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message