00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00048 #ifndef ACESTL_INCL_ACESTL_COLLECTIONS_HPP_MESSAGE_QUEUE_SEQUENCE
00049 #define ACESTL_INCL_ACESTL_COLLECTIONS_HPP_MESSAGE_QUEUE_SEQUENCE
00050 
00051 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00052 # define ACESTL_VER_ACESTL_COLLECTIONS_HPP_MESSAGE_QUEUE_SEQUENCE_MAJOR     2
00053 # define ACESTL_VER_ACESTL_COLLECTIONS_HPP_MESSAGE_QUEUE_SEQUENCE_MINOR     1
00054 # define ACESTL_VER_ACESTL_COLLECTIONS_HPP_MESSAGE_QUEUE_SEQUENCE_REVISION  8
00055 # define ACESTL_VER_ACESTL_COLLECTIONS_HPP_MESSAGE_QUEUE_SEQUENCE_EDIT      58
00056 #endif 
00057 
00058 
00059 
00060 
00061 
00062 #ifndef ACESTL_INCL_ACESTL_HPP_ACESTL
00063 # include <acestl/acestl.hpp>
00064 #endif 
00065 #ifndef STLSOFT_INCL_STLSOFT_UTIL_STD_HPP_ITERATOR_HELPER
00066 # include <stlsoft/util/std/iterator_helper.hpp>
00067 #endif 
00068 #ifndef STLSOFT_INCL_STLSOFT_COLLECTIONS_UTIL_HPP_COLLECTIONS
00069 # include <stlsoft/collections/util/collections.hpp>
00070 #endif 
00071 #ifndef STLSOFT_INCL_STLSOFT_CONVERSION_HPP_SAP_CAST
00072 # include <stlsoft/conversion/sap_cast.hpp>
00073 #endif 
00074 #ifndef STLSOFT_INCL_STLSOFT_ALGORITHMS_HPP_BOUNDED
00075 # include <stlsoft/algorithms/bounded.hpp>  
00076 #endif 
00077 
00078 #if ACESTL_ACE_VERSION >= 0x00050004
00079   
00080 #ifndef STLSOFT_INCL_ACE_H_CONDITION_THREAD_MUTEX
00081 # define STLSOFT_INCL_ACE_H_CONDITION_THREAD_MUTEX
00082 #  include <ace/Condition_Thread_Mutex.h>
00083 #endif 
00084 #ifndef STLSOFT_INCL_ACE_H_GUARD_T
00085 # define STLSOFT_INCL_ACE_H_GUARD_T
00086 #  include <ace/Guard_T.h>
00087 #endif 
00088 #ifndef STLSOFT_INCL_ACE_H_NULL_CONDITION
00089 # define STLSOFT_INCL_ACE_H_NULL_CONDITION
00090 #  include <ace/Null_Condition.h>
00091 #endif 
00092 #ifndef STLSOFT_INCL_ACE_H_NULL_MUTEX
00093 # define STLSOFT_INCL_ACE_H_NULL_MUTEX
00094 #  include <ace/Null_Mutex.h>
00095 #endif 
00096 #ifndef STLSOFT_INCL_ACE_H_THREAD_MUTEX
00097 # define STLSOFT_INCL_ACE_H_THREAD_MUTEX
00098 #  include <ace/Thread_Mutex.h>
00099 #endif 
00100 #endif 
00101 #ifndef STLSOFT_INCL_ACE_H_MESSAGE_QUEUE_T
00102 # define STLSOFT_INCL_ACE_H_MESSAGE_QUEUE_T
00103 # include <ace/Message_Queue_T.h>
00104 #endif 
00105 #ifndef STLSOFT_INCL_ALGORITHM
00106 # define STLSOFT_INCL_ALGORITHM
00107 # include <algorithm>                
00108 #endif 
00109 
00110 #ifdef STLSOFT_UNITTEST
00111 # include <acestl/memory/message_block_functions.hpp>
00112 #endif 
00113 
00114 
00115 
00116 
00117 
00118 #ifndef _ACESTL_NO_NAMESPACE
00119 # if defined(_STLSOFT_NO_NAMESPACE) || \
00120      defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00121 
00122 namespace acestl
00123 {
00124 # else
00125 
00126 
00127 namespace stlsoft
00128 {
00129 
00130 namespace acestl_project
00131 {
00132 
00133 # endif 
00134 #endif 
00135 
00136 
00137 
00138 
00139 
00168 
00169 template <ACE_SYNCH_DECL>
00170 class message_queue_sequence
00171     : public stlsoft_ns_qual(stl_collection_tag)
00172 {
00175 public:
00177     typedef char                                    value_type;
00179     typedef ACE_Message_Queue<ACE_SYNCH_USE>        sequence_type;
00181     typedef message_queue_sequence<ACE_SYNCH_USE>   class_type;
00183     typedef ss_size_t                               size_type;
00184 
00192     class iterator
00193         : public stlsoft_ns_qual(iterator_base)<acestl_ns_qual_std(input_iterator_tag)
00194                                             ,   char
00195                                             ,   ss_ptrdiff_t
00196                                             ,   char*
00197                                             ,   char&
00198                                             >
00199     {
00200     private:
00201         friend class message_queue_sequence<ACE_SYNCH_USE>;
00202 
00203         typedef ACE_Message_Queue_Iterator<ACE_SYNCH_USE>   mq_iterator_type;
00204 
00205     private:
00206 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00207         struct shared_handle
00208         {
00209         public:
00210             typedef shared_handle   class_type;
00211 
00212         
00213         public:
00214             mq_iterator_type    m_mqi;
00215             ACE_Message_Block*  m_entry;
00216             as_size_t           m_entryLength;
00217             as_size_t           m_entryIndex;
00218         private:
00219             ss_sint32_t         m_refCount;
00220 
00222         public:
00223             ss_explicit_k shared_handle(sequence_type &mq)
00224                 : m_mqi(mq)
00225                 , m_entry(NULL)
00226                 , m_entryLength(0)
00227                 , m_entryIndex(0)
00228                 , m_refCount(1)
00229             {
00230                 if(m_mqi.next(m_entry))
00231                 {
00232                     for(;;)
00233                     {
00234                         if(0 != (m_entryLength = m_entry->length()))
00235                         {
00236                             break;
00237                         }
00238                         else if(NULL == (m_entry = nextEntry()))
00239                         {
00240                             break;
00241                         }
00242                     }
00243                 }
00244             }
00245 # if defined(STLSOFT_CF_COMPILER_WARNS_NO_PUBLIC_DTOR)
00246         protected:
00247 # else 
00248         private:
00249 # endif 
00250             ~shared_handle() stlsoft_throw_0()
00251             {
00252                 ACESTL_MESSAGE_ASSERT("Shared search handle being destroyed with outstanding references!", 0 == m_refCount);
00253             }
00254 
00256         public:
00257             ss_bool_t is_end_point() const
00258             {
00259                 return m_entryIndex == m_entryLength;
00260             }
00261             char    ¤t()
00262             {
00263                 ACESTL_ASSERT(NULL != m_entry);
00264                 ACESTL_ASSERT(m_entryIndex != m_entryLength);
00265 
00266                 return m_entryIndex[m_entry->rd_ptr()];
00267             }
00268             char    current() const
00269             {
00270                 ACESTL_ASSERT(NULL != m_entry);
00271                 ACESTL_ASSERT(m_entryIndex != m_entryLength);
00272 
00273                 return m_entryIndex[m_entry->rd_ptr()];
00274             }
00275 
00276             ss_bool_t   advance()
00277             {
00278                 ACESTL_MESSAGE_ASSERT("Invalid index", m_entryIndex < m_entryLength);
00279 
00280                 if(++m_entryIndex == m_entryLength)
00281                 {
00282                     m_entryIndex = 0;
00283 
00284                     for(;;)
00285                     {
00286                         if(NULL == (m_entry = nextEntry()))
00287                         {
00288                             return false;
00289                         }
00290                         else if(0 != (m_entryLength = m_entry->length()))
00291                         {
00292                             break;
00293                         }
00294                     }
00295                 }
00296 
00297                 return true;
00298             }
00299 
00301         public:
00302             ss_sint32_t AddRef()
00303             {
00304                 return ++m_refCount;
00305             }
00306             ss_sint32_t Release()
00307             {
00308                 ss_sint32_t rc = --m_refCount;
00309 
00310                 if(0 == rc)
00311                 {
00312                     delete this;
00313                 }
00314 
00315                 return rc;
00316             }
00317 
00318             void fast_copy(char const* f, char const* l, size_type n)
00319             {
00320                 ACESTL_ASSERT(0 != n);
00321                 ACESTL_ASSERT(f != l);
00322 
00323                 if(0 != n)
00324                 {
00325                     size_type n1 = m_entryLength - m_entryIndex;
00326 
00327                     if(n <= n1)
00328                     {
00329                         
00330 
00331                         ::memcpy(&m_entryIndex[m_entry->rd_ptr()], f, n);
00332 
00333                         ACESTL_ASSERT(n <= m_entryLength - m_entryIndex);
00334 
00335                         m_entryIndex += n;
00336 
00337                         ACESTL_ASSERT(m_entryIndex <= m_entryLength);
00338                     }
00339                     else
00340                     {
00341                         
00342 
00343                         ::memcpy(&m_entryIndex[m_entry->rd_ptr()], f, n1);
00344                         f += n1;
00345 
00346                         m_entry = nextEntry();
00347 
00348                         ACESTL_MESSAGE_ASSERT("Attempt to walk off end of iterator's range", NULL != m_entry);
00349 
00350                         m_entryIndex    =   0;
00351                         m_entryLength   =   m_entry->length();
00352 
00353                         fast_copy(f, l, n - n1);
00354                     }
00355                 }
00356             }
00357             void fast_copy(class_type const* l, char* o)
00358             {
00359                 size_type n1 = m_entryLength - m_entryIndex;
00360 
00361                 if( NULL != l &&
00362                     m_entry == l->m_entry)
00363                 {
00364                     
00365 
00366                     ::memcpy(o, &m_entryIndex[m_entry->rd_ptr()], n1);
00367                 }
00368                 else
00369                 {
00370                     
00371 
00372                     ::memcpy(o, &m_entryIndex[m_entry->rd_ptr()], n1);
00373                     o += n1;
00374 
00375                     m_entry = nextEntry();
00376 
00377                     if(NULL != m_entry)
00378                     {
00379                         m_entryIndex    =   0;
00380                         m_entryLength   =   m_entry->length();
00381 
00382                         fast_copy(l, o);
00383                     }
00384                 }
00385             }
00386             void fast_copy(size_type n, char* o)
00387             {
00388                 size_type n1 = m_entryLength - m_entryIndex;
00389 
00390                 if(n <= n1)
00391                 {
00392                     
00393                     
00394                     
00395                     
00396                     
00397                     
00398 
00399                     ::memcpy(o, &m_entryIndex[m_entry->rd_ptr()], n);
00400 
00401                     ACESTL_ASSERT(n <= m_entryLength - m_entryIndex);
00402 
00403                     m_entryIndex += n;
00404 
00405                     ACESTL_ASSERT(m_entryIndex <= m_entryLength);
00406                 }
00407                 else
00408                 {
00409                     ::memcpy(o, &m_entryIndex[m_entry->rd_ptr()], n1);
00410                     o += n1;
00411 
00412                     m_entry = nextEntry();
00413 
00414                     ACESTL_MESSAGE_ASSERT("Attempt to walk off end of iterator's range", (0 == n || NULL != m_entry));
00415 
00416                     if(NULL != m_entry)
00417                     {
00418                         m_entryIndex    =   0;
00419                         m_entryLength   =   m_entry->length();
00420 
00421                         fast_copy(n - n1, o);
00422                     }
00423                 }
00424             }
00425 
00426         
00427         private:
00428             ACE_Message_Block* nextEntry()
00429             {
00430                 ACE_Message_Block* entry = NULL;
00431 
00432                 return m_mqi.advance() ? (m_mqi.next(entry), entry) : NULL;
00433             }
00434 
00435         
00436         private:
00437             shared_handle(class_type const&);
00438             class_type& operator =(class_type const&);
00439         };
00440 #endif 
00441 
00442     public:
00443         typedef iterator                                    class_type;
00445         typedef char                                        value_type;
00446 
00447     private:
00448         iterator(sequence_type &mq)
00449             : m_handle(new shared_handle(mq))
00450         {}
00451     public:
00452         iterator()
00453             : m_handle(NULL)
00454         {}
00455         iterator(class_type const& rhs)
00456             : m_handle(rhs.m_handle)
00457         {
00458             if(NULL != m_handle)
00459             {
00460                 m_handle->AddRef();
00461             }
00462         }
00463         ~iterator() stlsoft_throw_0()
00464         {
00465             if(NULL != m_handle)
00466             {
00467                 m_handle->Release();
00468             }
00469         }
00470 
00471         class_type& operator =(class_type const& rhs)
00472         {
00473             shared_handle* this_handle = m_handle;
00474 
00475             m_handle = rhs.m_handle;
00476 
00477             if(NULL != m_handle)
00478             {
00479                 m_handle->AddRef();
00480             }
00481 
00482             if(NULL != this_handle)
00483             {
00484                 this_handle->Release();
00485             }
00486 
00487             return *this;
00488         }
00489 
00490     public:
00491         class_type& operator ++()
00492         {
00493             ACESTL_ASSERT(NULL != m_handle);
00494 
00495             if(!m_handle->advance())
00496             {
00497                 m_handle->Release();
00498 
00499                 m_handle = NULL;
00500             }
00501 
00502             return *this;
00503         }
00504 
00505         class_type operator ++(int)
00506         {
00507             class_type  ret(*this);
00508 
00509             operator ++();
00510 
00511             return ret;
00512         }
00513 
00514         value_type& operator *()
00515         {
00516             ACESTL_ASSERT(NULL != m_handle);
00517 
00518             return m_handle->current();
00519         }
00520 
00521         value_type operator *() const
00522         {
00523             ACESTL_ASSERT(NULL != m_handle);
00524 
00525             return m_handle->current();
00526         }
00527 
00528     public:
00529         ss_bool_t equal(class_type const& rhs) const
00530         {
00531             return class_type::equal_(*this, rhs, iterator_category());
00532         }
00533         ss_bool_t operator ==(class_type const& rhs) const
00534         {
00535             return equal(rhs);
00536         }
00537         ss_bool_t operator !=(class_type const& rhs) const
00538         {
00539             return !equal(rhs);
00540         }
00541 
00542     private:
00543         static ss_bool_t equal_(class_type const& lhs, class_type const& rhs, stlsoft_ns_qual_std(input_iterator_tag))
00544         {
00545             
00546             return lhs.is_end_point() == rhs.is_end_point();
00547         }
00548 #if 0
00549         static ss_bool_t equal_(class_type const& lhs, class_type const& rhs, stlsoft_ns_qual_std(forward_iterator_tag));
00550             
00551             if(is_end_point())
00552             {
00553                 return rhs.is_end_point();
00554             }
00555             else
00556             {
00557                 if(rhs.is_end_point())
00558                 {
00559                     return false;
00560                 }
00561                 else
00562                 {
00563                     ACESTL_ASSERT(NULL != m_handle);
00564                     ACESTL_ASSERT(NULL != rhs.m_handle);
00565                 }
00566             }
00567 #endif 
00568 
00569     private:
00570         ss_bool_t is_end_point() const
00571         {
00572             return NULL == m_handle || m_handle->is_end_point();
00573         }
00574 
00575     private:
00576         void fast_copy(char const* f, char const* l)
00577         {
00578             if(f != l)
00579             {
00580                 ACESTL_ASSERT(NULL != m_handle);
00581 
00582                 m_handle->fast_copy(f, l, static_cast<size_type>(l - f));
00583             }
00584         }
00585         void fast_copy(class_type const& l, char* o)
00586         {
00587             if(*this != l)
00588             {
00589                 ACESTL_ASSERT(NULL != m_handle);
00590 
00591                 m_handle->fast_copy(l.m_handle, o);
00592             }
00593         }
00594         void fast_copy(size_type n, char* o)
00595         {
00596             if(0 != n)
00597             {
00598                 ACESTL_ASSERT(NULL != m_handle);
00599 
00600                 m_handle->fast_copy(n, o);
00601             }
00602         }
00603 
00604     private:
00605         shared_handle* m_handle;
00606     };
00608 
00609 
00610 public:
00612     ss_explicit_k message_queue_sequence(sequence_type &mq)
00613         : m_mq(mq)
00614     {}
00615 
00618 public:
00622     iterator begin()
00623     {
00624         return iterator(m_mq);
00625     }
00629     iterator end()
00630     {
00631         return iterator();
00632     }
00634 
00637 public:
00639     size_type size() const
00640     {
00641         return m_mq.message_length() ;
00642     }
00644     as_bool_t empty() const
00645     {
00646         return const_cast<sequence_type&>(m_mq).is_empty();
00647     }
00649 
00652 public:
00653     static char* fast_copy(iterator f, iterator l, char* o)
00654     {
00655 #if defined(ACESTL_MQS_NO_FAST_COPY_TO)
00656         for(; f != l; ++f, ++o)
00657         {
00658             *o = *f;
00659         }
00660 #else 
00661         f.fast_copy(l, o);
00662 #endif 
00663 
00664         return o;
00665     }
00666     static char* fast_copy(iterator f, size_type n, char* o)
00667     {
00668 #if defined(ACESTL_MQS_NO_FAST_COPY_TO)
00669         for(; 0 != n; ++f, ++o, --n)
00670         {
00671             *o = *f;
00672         }
00673 #else 
00674         f.fast_copy(n, o);
00675 #endif 
00676 
00677         return o;
00678     }
00679 
00680     static iterator fast_copy(char const* f, char const* l, iterator o)
00681     {
00682 #if defined(ACESTL_MQS_NO_FAST_COPY_FROM)
00683         for(; f != l; ++f, ++o)
00684         {
00685             *o = *f;
00686         }
00687 #else 
00688         o.fast_copy(f, l);
00689 #endif 
00690 
00691         return o;
00692     }
00694 
00697 private:
00698     sequence_type   &m_mq;
00700 
00703 private:
00704     message_queue_sequence(class_type const&);
00705     class_type& operator =(class_type const&);
00707 };
00708 
00710 
00711 
00712 #ifdef STLSOFT_UNITTEST
00713 # include "./unittest/message_queue_sequence_unittest_.h"
00714 #endif 
00715 
00716 
00717 
00718 #ifndef _ACESTL_NO_NAMESPACE
00719 # if defined(_STLSOFT_NO_NAMESPACE) || \
00720      defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00721 } 
00722 # else
00723 } 
00724 } 
00725 # endif 
00726 #endif 
00727 
00728 
00729 
00730 #ifdef STLSOFT_CF_std_NAMESPACE
00731 namespace std
00732 {
00733 #endif 
00734 
00735 STLSOFT_TEMPLATE_SPECIALISATION
00736 inline char* copy(  acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    f
00737                 ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    l
00738                 ,   char*                                                               o)
00739 {
00740     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(f, l, o);
00741 }
00742 STLSOFT_TEMPLATE_SPECIALISATION
00743 inline char* copy(  acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      f
00744                 ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      l
00745                 ,   char*                                                               o)
00746 {
00747     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(f, l, o);
00748 }
00749 
00750 STLSOFT_TEMPLATE_SPECIALISATION
00751 inline signed char* copy(   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    f
00752                         ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    l
00753                         ,   signed char*                                                        o)
00754 {
00755     return reinterpret_cast<signed char*>(acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(f, l, reinterpret_cast<char*>(o)));
00756 }
00757 STLSOFT_TEMPLATE_SPECIALISATION
00758 inline signed char* copy(   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      f
00759                         ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      l
00760                         ,   signed char*                                                        o)
00761 {
00762     return reinterpret_cast<signed char*>(acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(f, l, reinterpret_cast<char*>(o)));
00763 }
00764 
00765 STLSOFT_TEMPLATE_SPECIALISATION
00766 inline unsigned char* copy( acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    f
00767                         ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    l
00768                         ,   unsigned char*                                                      o)
00769 {
00770     return reinterpret_cast<unsigned char*>(acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(f, l, reinterpret_cast<char*>(o)));
00771 }
00772 STLSOFT_TEMPLATE_SPECIALISATION
00773 inline unsigned char* copy( acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      f
00774                         ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      l
00775                         ,   unsigned char*                                                      o)
00776 {
00777     return reinterpret_cast<unsigned char*>(acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(f, l, reinterpret_cast<char*>(o)));
00778 }
00779 
00780 
00781 
00782 STLSOFT_TEMPLATE_SPECIALISATION
00783 inline acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator copy(   char*                                                               f
00784                                                                             ,   char*                                                               l
00785                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    o)
00786 {
00787     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(f, l, o);
00788 }
00789 STLSOFT_TEMPLATE_SPECIALISATION
00790 inline acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator copy(     char*                                                               f
00791                                                                             ,   char*                                                               l
00792                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      o)
00793 {
00794     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(f, l, o);
00795 }
00796 
00797 STLSOFT_TEMPLATE_SPECIALISATION
00798 inline acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator copy(   signed char*                                                        f
00799                                                                             ,   signed char*                                                        l
00800                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    o)
00801 {
00802     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(l), o);
00803 }
00804 STLSOFT_TEMPLATE_SPECIALISATION
00805 inline acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator copy(     signed char*                                                        f
00806                                                                             ,   signed char*                                                        l
00807                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      o)
00808 {
00809     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(l), o);
00810 }
00811 
00812 STLSOFT_TEMPLATE_SPECIALISATION
00813 inline acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator copy(   unsigned char*                                                      f
00814                                                                             ,   unsigned char*                                                      l
00815                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    o)
00816 {
00817     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(l), o);
00818 }
00819 STLSOFT_TEMPLATE_SPECIALISATION
00820 inline acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator copy(     unsigned char*                                                      f
00821                                                                             ,   unsigned char*                                                      l
00822                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      o)
00823 {
00824     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(l), o);
00825 }
00826 
00827 
00828 
00829 STLSOFT_TEMPLATE_SPECIALISATION
00830 inline acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator copy(   char const* f
00831                                                                             ,   char const* l
00832                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator o)
00833 {
00834     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(f, l, o);
00835 }
00836 STLSOFT_TEMPLATE_SPECIALISATION
00837 inline acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator copy(     char const* f
00838                                                                             ,   char const* l
00839                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator o)
00840 {
00841     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(f, l, o);
00842 }
00843 
00844 STLSOFT_TEMPLATE_SPECIALISATION
00845 inline acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator copy(   signed char const* f
00846                                                                             ,   signed char const* l
00847                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator o)
00848 {
00849     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(l), o);
00850 }
00851 STLSOFT_TEMPLATE_SPECIALISATION
00852 inline acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator copy(     signed char const* f
00853                                                                             ,   signed char const* l
00854                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator o)
00855 {
00856     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(l), o);
00857 }
00858 
00859 STLSOFT_TEMPLATE_SPECIALISATION
00860 inline acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator copy(   unsigned char const* f
00861                                                                             ,   unsigned char const* l
00862                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator o)
00863 {
00864     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(l), o);
00865 }
00866 STLSOFT_TEMPLATE_SPECIALISATION
00867 inline acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator copy(     unsigned char const* f
00868                                                                             ,   unsigned char const* l
00869                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator o)
00870 {
00871     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(l), o);
00872 }
00873 
00874 #ifdef STLSOFT_CF_std_NAMESPACE
00875 } 
00876 #endif 
00877 
00878 
00879 
00880 #ifndef _STLSOFT_NO_NAMESPACE
00881 namespace stlsoft
00882 {
00883 #endif 
00884 
00885 STLSOFT_TEMPLATE_SPECIALISATION
00886 inline char* copy_n(acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    f
00887                 ,   ss_size_t                                                           n
00888                 ,   char*                                                               o)
00889 {
00890     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(f, n, o);
00891 }
00892 STLSOFT_TEMPLATE_SPECIALISATION
00893 inline char* copy_n(acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      f
00894                 ,   ss_size_t                                                           n
00895                 ,   char*                                                               o)
00896 {
00897     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(f, n, o);
00898 }
00899 
00900 STLSOFT_TEMPLATE_SPECIALISATION
00901 inline signed char* copy_n( acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    f
00902                         ,   ss_size_t                                                           n
00903                         ,   signed char*                                                        o)
00904 {
00905     return reinterpret_cast<signed char*>(acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(f, n, reinterpret_cast<char*>(o)));
00906 }
00907 STLSOFT_TEMPLATE_SPECIALISATION
00908 inline signed char* copy_n( acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      f
00909                         ,   ss_size_t                                                           n
00910                         ,   signed char*                                                        o)
00911 {
00912     return reinterpret_cast<signed char*>(acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(f, n, reinterpret_cast<char*>(o)));
00913 }
00914 
00915 STLSOFT_TEMPLATE_SPECIALISATION
00916 inline unsigned char* copy_n(   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    f
00917                             ,   ss_size_t                                                           n
00918                             ,   unsigned char*                                                      o)
00919 {
00920     return reinterpret_cast<unsigned char*>(acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(f, n, reinterpret_cast<char*>(o)));
00921 }
00922 STLSOFT_TEMPLATE_SPECIALISATION
00923 inline unsigned char* copy_n(   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      f
00924                             ,   ss_size_t                                                           n
00925                             ,   unsigned char*                                                      o)
00926 {
00927     return reinterpret_cast<unsigned char*>(acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(f, n, reinterpret_cast<char*>(o)));
00928 }
00929 
00930 
00931 
00932 STLSOFT_TEMPLATE_SPECIALISATION
00933 inline acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator copy_n( char*                                                               f
00934                                                                             ,   ss_size_t                                                           n
00935                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    o)
00936 {
00937     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(f, f + n, o);
00938 }
00939 STLSOFT_TEMPLATE_SPECIALISATION
00940 inline acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator copy_n(   char*                                                               f
00941                                                                             ,   ss_size_t                                                           n
00942                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      o)
00943 {
00944     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(f, f + n, o);
00945 }
00946 
00947 STLSOFT_TEMPLATE_SPECIALISATION
00948 inline acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator copy_n( signed char*                                                        f
00949                                                                             ,   ss_size_t                                                           n
00950                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    o)
00951 {
00952     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(f) + n, o);
00953 }
00954 STLSOFT_TEMPLATE_SPECIALISATION
00955 inline acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator copy_n(   signed char*                                                        f
00956                                                                             ,   ss_size_t                                                           n
00957                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      o)
00958 {
00959     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(f) + n, o);
00960 }
00961 
00962 STLSOFT_TEMPLATE_SPECIALISATION
00963 inline acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator copy_n( unsigned char*                                                      f
00964                                                                             ,   ss_size_t                                                           n
00965                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    o)
00966 {
00967     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(f) + n, o);
00968 }
00969 STLSOFT_TEMPLATE_SPECIALISATION
00970 inline acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator copy_n(   unsigned char*                                                      f
00971                                                                             ,   ss_size_t                                                           n
00972                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator      o)
00973 {
00974     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(f) + n, o);
00975 }
00976 
00977 
00978 
00979 STLSOFT_TEMPLATE_SPECIALISATION
00980 inline acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator copy_n( char const*                                                         f
00981                                                                             ,   ss_size_t                                                           n
00982                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator    o)
00983 {
00984     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(f, f + n, o);
00985 }
00986 STLSOFT_TEMPLATE_SPECIALISATION
00987 inline acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator copy_n(   char const* f
00988                                                                             ,   ss_size_t n
00989                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator o)
00990 {
00991     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(f, f + n, o);
00992 }
00993 
00994 STLSOFT_TEMPLATE_SPECIALISATION
00995 inline acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator copy_n( signed char const* f
00996                                                                             ,   ss_size_t n
00997                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator o)
00998 {
00999     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(f) + n, o);
01000 }
01001 STLSOFT_TEMPLATE_SPECIALISATION
01002 inline acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator copy_n(   signed char const* f
01003                                                                             ,   ss_size_t n
01004                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator o)
01005 {
01006     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(f) + n, o);
01007 }
01008 
01009 STLSOFT_TEMPLATE_SPECIALISATION
01010 inline acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator copy_n( unsigned char const* f
01011                                                                             ,   ss_size_t n
01012                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::iterator o)
01013 {
01014     return acestl_ns_qual(message_queue_sequence)<ACE_NULL_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(f) + n, o);
01015 }
01016 STLSOFT_TEMPLATE_SPECIALISATION
01017 inline acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator copy_n(   unsigned char const* f
01018                                                                             ,   ss_size_t n
01019                                                                             ,   acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::iterator o)
01020 {
01021     return acestl_ns_qual(message_queue_sequence)<ACE_MT_SYNCH>::fast_copy(stlsoft_ns_qual(sap_cast)<char const*>(f), stlsoft_ns_qual(sap_cast)<char const*>(f) + n, o);
01022 }
01023 
01024 #ifndef _STLSOFT_NO_NAMESPACE
01025 } 
01026 #endif 
01027 
01028 
01029 
01030 #endif 
01031 
01032