You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2007/10/04 00:10:28 UTC

[jira] Assigned: (AMQCPP-143) declara BytesMessage::readXXX() methods as 'const'

     [ https://issues.apache.org/activemq/browse/AMQCPP-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish reassigned AMQCPP-143:
-----------------------------------

    Assignee: Timothy Bish  (was: Nathan Mittler)

> declara BytesMessage::readXXX() methods as 'const' 
> ---------------------------------------------------
>
>                 Key: AMQCPP-143
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-143
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>          Components: CMS Impl
>         Environment: language specific, all the platforms
>            Reporter: Matvey Aizenshtat
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 2.1.1
>
>
> 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, i.e.
> 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:
> http://www.nabble.com/BytesMessage-methods-tf3833767s2354.html#a10853672

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