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

Diff for /pegasus/src/Pegasus/Common/Buffer.h between version 1.14.2.1 and 1.15

version 1.14.2.1, 2013/01/08 13:36:16 version 1.15, 2009/12/15 11:39:33
Line 72 
Line 72 
      */      */
     const char* getData() const;     const char* getData() const;
  
     /**  
         Returns a pointer to the character buffer with the Buffer contents.  
         This function does NOT append a null character.  
         Resulting data should NOT be used with C string processing functions.  
     */  
     char* getContentPtr();  
   
     char get(Uint32 i) const;     char get(Uint32 i) const;
  
     void set(Uint32 i, char x);     void set(Uint32 i, char x);
Line 91 
Line 84 
  
     void append(char x);     void append(char x);
  
       void append_unchecked(char x);
   
     void append(const char* data, Uint32 size);     void append(const char* data, Uint32 size);
  
       void append_unchecked(const char* data, Uint32 size);
   
       void append(char c1, char c2);
   
       void append(char c1, char c2, char c3);
   
     void append(char c1, char c2, char c3, char c4);     void append(char c1, char c2, char c3, char c4);
  
     void append(     void append(
Line 156 
Line 157 
     return _rep->data;     return _rep->data;
 } }
  
 inline char* Buffer::getContentPtr()  
 {  
     return _rep->data;  
 }  
   
 inline char Buffer::get(Uint32 i) const inline char Buffer::get(Uint32 i) const
 { {
     return _rep->data[i];     return _rep->data[i];
Line 201 
Line 197 
     _rep->data[_rep->size++] = x;     _rep->data[_rep->size++] = x;
 } }
  
   inline void Buffer::append_unchecked(char x)
   {
       _rep->data[_rep->size++] = x;
   }
   
 inline void Buffer::append(const char* data, Uint32 size) inline void Buffer::append(const char* data, Uint32 size)
 { {
     Uint32 cap = _rep->size + size;     Uint32 cap = _rep->size + size;
Line 212 
Line 213 
     _rep->size += size;     _rep->size += size;
 } }
  
   inline void Buffer::append_unchecked(const char* data, Uint32 size)
   {
       memcpy(_rep->data + _rep->size, data, size);
       _rep->size += size;
   }
   
 inline void Buffer::clear() inline void Buffer::clear()
 { {
     if (_rep->cap != 0)     if (_rep->cap != 0)
Line 223 
Line 230 
     remove(pos, 1);     remove(pos, 1);
 } }
  
   inline void Buffer::append(char c1, char c2)
   {
       Uint32 cap = _rep->size + 2;
   
       if (cap > _rep->cap)
           _reserve_aux(cap);
   
       char* p = _rep->data + _rep->size;
       p[0] = c1;
       p[1] = c2;
       _rep->size += 2;
   }
   
   inline void Buffer::append(char c1, char c2, char c3)
   {
       Uint32 cap = _rep->size + 3;
   
       if (cap > _rep->cap)
           _reserve_aux(cap);
   
       char* p = _rep->data + _rep->size;
       p[0] = c1;
       p[1] = c2;
       p[2] = c3;
       _rep->size += 3;
   }
   
 inline void Buffer::append(char c1, char c2, char c3, char c4) inline void Buffer::append(char c1, char c2, char c3, char c4)
 { {
     Uint32 cap = _rep->size + 4;     Uint32 cap = _rep->size + 4;


Legend:
Removed from v.1.14.2.1  
changed lines
  Added in v.1.15

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2