You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Motl <mo...@orcsoftware.com> on 2007/05/29 15:00:01 UTC
BytesMessage methods
Hi,
is there a reason why readXXX() methods of BytesMessage aren't 'const'?
Thanks
--
View this message in context: http://www.nabble.com/BytesMessage-methods-tf3833767s2354.html#a10853672
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: BytesMessage methods
Posted by Motl <mo...@orcsoftware.com>.
fair enough,
thanks for the fast answer
tabish121 wrote:
>
> They aren't const because in essence they are changing data in the
> object. They work like streams, moving the pointer in the stream along
> as the appropriate amount of data is read, so they can't be const since
> they affect the state of the object, which is why there is a reset
> method, to change the state of the stream back to the beginning.
>
> regards
> Tim
>
> On Tue, 2007-05-29 at 06:41 -0700, Motl wrote:
>> Yes, sure
>>
>> tabish121 wrote:
>> >
>> > Are you referring to the C++ client?
>> >
>> > On Tue, 2007-05-29 at 06:00 -0700, Motl wrote:
>> >> Hi,
>> >>
>> >> is there a reason why readXXX() methods of BytesMessage aren't
>> 'const'?
>> >>
>> >> Thanks
>> >
>> >
>>
>
>
--
View this message in context: http://www.nabble.com/BytesMessage-methods-tf3833767s2354.html#a10854703
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: BytesMessage methods
Posted by Timothy Bish <ti...@sensis.com>.
They aren't const because in essence they are changing data in the
object. They work like streams, moving the pointer in the stream along
as the appropriate amount of data is read, so they can't be const since
they affect the state of the object, which is why there is a reset
method, to change the state of the stream back to the beginning.
regards
Tim
On Tue, 2007-05-29 at 06:41 -0700, Motl wrote:
> Yes, sure
>
> tabish121 wrote:
> >
> > Are you referring to the C++ client?
> >
> > On Tue, 2007-05-29 at 06:00 -0700, Motl wrote:
> >> Hi,
> >>
> >> is there a reason why readXXX() methods of BytesMessage aren't 'const'?
> >>
> >> Thanks
> >
> >
>
Re: BytesMessage methods
Posted by Motl <mo...@orcsoftware.com>.
Yes, sure
tabish121 wrote:
>
> Are you referring to the C++ client?
>
> On Tue, 2007-05-29 at 06:00 -0700, Motl wrote:
>> Hi,
>>
>> is there a reason why readXXX() methods of BytesMessage aren't 'const'?
>>
>> Thanks
>
>
--
View this message in context: http://www.nabble.com/BytesMessage-methods-tf3833767s2354.html#a10854312
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: BytesMessage methods
Posted by Timothy Bish <ti...@sensis.com>.
Are you referring to the C++ client?
On Tue, 2007-05-29 at 06:00 -0700, Motl wrote:
> Hi,
>
> is there a reason why readXXX() methods of BytesMessage aren't 'const'?
>
> Thanks