(file) Return to ArrayImpl.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/ArrayImpl.h between version 1.4 and 1.9

version 1.4, 2001/07/10 06:43:21 version 1.9, 2002/05/13 23:07:52
Line 56 
Line 56 
 Array<PEGASUS_ARRAY_T>::Array(Uint32 size) Array<PEGASUS_ARRAY_T>::Array(Uint32 size)
 { {
     _rep = Rep::create(size);     _rep = Rep::create(size);
   #if defined(PEGASUS_PLATFORM_HPUX_PARISC_ACC) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
       InitializeRaw<PEGASUS_ARRAY_T>(_rep->data(), size);
   #else
     InitializeRaw(_rep->data(), size);     InitializeRaw(_rep->data(), size);
   #endif
 } }
  
 #ifndef PEGASUS_ARRAY_T #ifndef PEGASUS_ARRAY_T
Line 82 
Line 86 
 Array<PEGASUS_ARRAY_T>::Array(const PEGASUS_ARRAY_T* items, Uint32 size) Array<PEGASUS_ARRAY_T>::Array(const PEGASUS_ARRAY_T* items, Uint32 size)
 { {
     _rep = Rep::create(size);     _rep = Rep::create(size);
   #if defined(PEGASUS_PLATFORM_HPUX_PARISC_ACC) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
       CopyToRaw<PEGASUS_ARRAY_T>(_rep->data(), items, size);
   #else
     CopyToRaw(_rep->data(), items, size);     CopyToRaw(_rep->data(), items, size);
   #endif
 } }
  
 #ifndef PEGASUS_ARRAY_T #ifndef PEGASUS_ARRAY_T
Line 132 
Line 140 
     Uint32 size = this->size();     Uint32 size = this->size();
     Rep* rep = Rep::create(capacity);     Rep* rep = Rep::create(capacity);
     rep->size = size;     rep->size = size;
   #if defined(PEGASUS_PLATFORM_HPUX_PARISC_ACC) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
       CopyToRaw<PEGASUS_ARRAY_T>(rep->data(), _rep->data(), size);
   #else
     CopyToRaw(rep->data(), _rep->data(), size);     CopyToRaw(rep->data(), _rep->data(), size);
   #endif
     Rep::dec(_rep);     Rep::dec(_rep);
     _rep = rep;     _rep = rep;
 } }
Line 142 
Line 154 
 #else #else
 PEGASUS_TEMPLATE_SPECIALIZATION PEGASUS_TEMPLATE_SPECIALIZATION
 #endif #endif
 void Array<PEGASUS_ARRAY_T>::_copyOnWriteAux()  void Array<PEGASUS_ARRAY_T>::_copyOnWrite()
 { {
     if (_rep->ref != 1)     if (_rep->ref != 1)
     {     {
Line 206 
Line 218 
 { {
     reserve(this->size() + size);     reserve(this->size() + size);
     _copyOnWrite();     _copyOnWrite();
   #if defined(PEGASUS_PLATFORM_HPUX_PARISC_ACC) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
       CopyToRaw<PEGASUS_ARRAY_T>(_data() + this->size(), x, size);
   #else
     CopyToRaw(_data() + this->size(), x, size);     CopyToRaw(_data() + this->size(), x, size);
   #endif
     _rep->size += size;     _rep->size += size;
 } }
  
Line 234 
Line 250 
     reserve(this->size() + size);     reserve(this->size() + size);
     _copyOnWrite();     _copyOnWrite();
     memmove(_data() + size, _data(), sizeof(PEGASUS_ARRAY_T) * this->size());     memmove(_data() + size, _data(), sizeof(PEGASUS_ARRAY_T) * this->size());
   #if defined(PEGASUS_PLATFORM_HPUX_PARISC_ACC) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
       CopyToRaw<PEGASUS_ARRAY_T>(_data(), x, size);
   #else
     CopyToRaw(_data(), x, size);     CopyToRaw(_data(), x, size);
   #endif
     _rep->size += size;     _rep->size += size;
 } }
  
Line 279 
Line 299 
         memmove(         memmove(
             _data() + pos + size, _data() + pos, sizeof(PEGASUS_ARRAY_T) * n);             _data() + pos + size, _data() + pos, sizeof(PEGASUS_ARRAY_T) * n);
  
   #if defined(PEGASUS_PLATFORM_HPUX_PARISC_ACC) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
       CopyToRaw<PEGASUS_ARRAY_T>(_data() + pos, x, size);
   #else
     CopyToRaw(_data() + pos, x, size);     CopyToRaw(_data() + pos, x, size);
   #endif
     _rep->size += size;     _rep->size += size;
 } }
  
Line 295 
Line 319 
  
     _copyOnWrite();     _copyOnWrite();
  
   #if defined(PEGASUS_PLATFORM_HPUX_PARISC_ACC) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
       Destroy<PEGASUS_ARRAY_T>(_data() + pos);
   #else
     Destroy(_data() + pos);     Destroy(_data() + pos);
   #endif
  
     Uint32 rem = this->size() - pos - 1;     Uint32 rem = this->size() - pos - 1;
  
Line 317 
Line 345 
  
     _copyOnWrite();     _copyOnWrite();
  
   #if defined(PEGASUS_PLATFORM_HPUX_PARISC_ACC) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
       Destroy<PEGASUS_ARRAY_T>(_data() + pos, size);
   #else
     Destroy(_data() + pos, size);     Destroy(_data() + pos, size);
   #endif
  
     Uint32 rem = this->size() - (pos + size);     Uint32 rem = this->size() - (pos + size);
  
Line 328 
Line 360 
     _rep->size -= size;     _rep->size -= size;
 } }
  
   #ifdef PEGASUS_HAS_EBCDIC
   
   #ifndef PEGASUS_ARRAY_T
   template<class PEGASUS_ARRAY_T>
   #else
   PEGASUS_TEMPLATE_SPECIALIZATION
   #endif
   void Array<PEGASUS_ARRAY_T>::etoa()
   {
   #if PEGASUS_ARRAY_T == Sint8
       _copyOnWrite();
       __etoa_l((char *)_data(),_rep->size);
   #endif
   }
   
   #ifndef PEGASUS_ARRAY_T
   template<class PEGASUS_ARRAY_T>
   #else
   PEGASUS_TEMPLATE_SPECIALIZATION
   #endif
   void Array<PEGASUS_ARRAY_T>::atoe()
   {
   #if PEGASUS_ARRAY_T == Sint8
       _copyOnWrite();
       __atoe_l((char *)_data(),_rep->size);
   #endif
   }
   
   #endif
   
 #endif /*defined(PEGASUS_EXPLICIT_INSTANTIATION) || !defined(PEGASUS_ARRAY_T)*/ #endif /*defined(PEGASUS_EXPLICIT_INSTANTIATION) || !defined(PEGASUS_ARRAY_T)*/


Legend:
Removed from v.1.4  
changed lines
  Added in v.1.9

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2