[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Suggestion/Request for Update of AsnBuf
Vladislav,
Thank you for your suggestion. You are right. Currently our library
does not support the construction of an AsnBuf given just a regular
char* and a length. The way we adjust to this in our libraries is to
create a local AsnRvsBuf with the char* and the length, and then to call
the AsnBuf(std::streambuf* sb) constructor. This is essentially the
same thing that you are accomplishing by your code below. I do agree
with you that this constructor is a nice feature, however, I don't feel
it is a necessary feature to add since our library already supports
functionality to do just this.
Regards,
Joe
-----Original Message-----
From: owner-imc-snacc@xxxxxxxxxxxx [mailto:owner-imc-snacc@xxxxxxxxxxxx]
On Behalf Of Vladislav Evgeniev
Sent: Monday, September 12, 2005 11:01 AM
To: imc-snacc@xxxxxxxx
Subject: Suggestion/Request for Update of AsnBuf
Dear ESNACC development team:
I've got a suggestion regarding class AsnBuf. This class has a
constructor, allowing a buffer to be assigned:
AsnBuf(const char *seg, size_t segLen)
The assigned buffer is copied, which is not suitable for large messages.
In my opinion it would be very useful if you add another constructor,
which will use the provided buffer, instead of copying it. For example:
AsnBuf::AsnBuf(char *preFilled, size_t segLen)
{
m_card = m_deck.insert(m_deck.begin(), new Card(new
AsnRvsBuf(preFilled, segLen)));
}
Best regards,
Vladislav Evgeniev