diff options
author | weidai <weidai11@users.noreply.github.com> | 2005-07-12 04:23:32 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2005-07-12 04:23:32 +0000 |
commit | 1db8ea50840eb47f0f7d8f3c30d8e0916932ce90 (patch) | |
tree | 4b03760892a97a9bc452ebe8b7793bbebd402ad4 /mqueue.h | |
parent | 31068bd68590654dc218bbb183a2ca71bb4af08b (diff) | |
download | cryptopp-git-1db8ea50840eb47f0f7d8f3c30d8e0916932ce90.tar.gz |
port to MSVC .NET 2005 beta 2
Diffstat (limited to 'mqueue.h')
-rw-r--r-- | mqueue.h | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -15,7 +15,7 @@ public: void IsolatedInitialize(const NameValuePairs ¶meters) {m_queue.IsolatedInitialize(parameters); m_lengths.assign(1, 0U); m_messageCounts.assign(1, 0U);} - unsigned int Put2(const byte *begin, unsigned int length, int messageEnd, bool blocking) + size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking) { m_queue.Put(begin, length); m_lengths.back() += length; @@ -30,34 +30,35 @@ public: bool IsolatedMessageSeriesEnd(bool blocking) {m_messageCounts.push_back(0); return false;} - unsigned long MaxRetrievable() const + lword MaxRetrievable() const {return m_lengths.front();} bool AnyRetrievable() const {return m_lengths.front() > 0;} - unsigned int TransferTo2(BufferedTransformation &target, unsigned long &transferBytes, const std::string &channel=NULL_CHANNEL, bool blocking=true); - unsigned int CopyRangeTo2(BufferedTransformation &target, unsigned long &begin, unsigned long end=ULONG_MAX, const std::string &channel=NULL_CHANNEL, bool blocking=true) const; + size_t TransferTo2(BufferedTransformation &target, lword &transferBytes, const std::string &channel=NULL_CHANNEL, bool blocking=true); + size_t CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=NULL_CHANNEL, bool blocking=true) const; - unsigned long TotalBytesRetrievable() const + lword TotalBytesRetrievable() const {return m_queue.MaxRetrievable();} unsigned int NumberOfMessages() const - {return m_lengths.size()-1;} + {return (unsigned int)m_lengths.size()-1;} bool GetNextMessage(); unsigned int NumberOfMessagesInThisSeries() const {return m_messageCounts[0];} unsigned int NumberOfMessageSeries() const - {return m_messageCounts.size()-1;} + {return (unsigned int)m_messageCounts.size()-1;} unsigned int CopyMessagesTo(BufferedTransformation &target, unsigned int count=UINT_MAX, const std::string &channel=NULL_CHANNEL) const; - const byte * Spy(unsigned int &contiguousSize) const; + const byte * Spy(size_t &contiguousSize) const; void swap(MessageQueue &rhs); private: ByteQueue m_queue; - std::deque<unsigned long> m_lengths, m_messageCounts; + std::deque<lword> m_lengths; + std::deque<unsigned int> m_messageCounts; }; @@ -73,7 +74,7 @@ public: , m_firstChannel(firstChannel), m_secondChannel(secondChannel) {Detach(attachment);} - unsigned int ChannelPut2(const std::string &channel, const byte *begin, unsigned int length, int messageEnd, bool blocking); + size_t ChannelPut2(const std::string &channel, const byte *begin, size_t length, int messageEnd, bool blocking); bool ChannelMessageSeriesEnd(const std::string &channel, int propagation=-1, bool blocking=true); private: |