ByteArray - Arrays of bytes.  
 More...
#include <glibmm/bytearray.h>
ByteArray - Arrays of bytes. 
ByteArray is a mutable array of bytes, to provide arrays of bytes which grow automatically as elements are added.
To create a new ByteArray use create(). To add elements to a ByteArray, use append(), and prepend().
To set the size of a ByteArray, use set_size().
- Since glibmm 2.36:
A Slot type to compare two elements in the array. 
The slot should return -1 if the first value is less than the second, 0 if they are equal and 1 if the first value is greater than the second.
Slot Prototype:
 int compare(const guint8* first, const guint8* second);  
 
 
  
  | 
        
          | Glib::ByteArray::ByteArray | ( |  | ) |  |  | protected | 
 
 
Adds the given bytes to the end of the ByteArray. 
The array will grow in size automatically if necessary. 
- Parameters
- 
  
    | data | The byte data to be added. |  | len | The number of bytes to add. |  
 
- Returns
- The ByteArray. 
 
 
      
        
          | guint8* Glib::ByteArray::get_data | ( |  | ) |  | 
      
 
 
      
        
          | const guint8* Glib::ByteArray::get_data | ( |  | ) | const | 
      
 
 
      
        
          | GByteArray* Glib::ByteArray::gobj | ( |  | ) |  | 
      
 
Provides access to the underlying C instance. 
 
 
      
        
          | const GByteArray* Glib::ByteArray::gobj | ( |  | ) | const | 
      
 
Provides access to the underlying C instance. 
 
 
      
        
          | GByteArray* Glib::ByteArray::gobj_copy | ( |  | ) | const | 
      
 
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. 
 
 
  
  | 
        
          | void Glib::ByteArray::operator delete | ( | void * | , |  
          |  |  | std::size_t |  |  
          |  | ) |  |  |  | protected | 
 
 
Adds the given data to the start of the ByteArray. 
The array will grow in size automatically if necessary. 
- Parameters
- 
  
    | data | The byte data to be added. |  | len | The number of bytes to add. |  
 
- Returns
- The ByteArray. 
 
 
      
        
          | void Glib::ByteArray::reference | ( |  | ) | const | 
      
 
Increment the reference count for this object. 
You should never need to do this manually - use the object via a RefPtr instead. 
 
 
Removes the byte at the given index from a ByteArray. 
The following bytes are moved down one place. 
- Parameters
- 
  
    | index | The index of the byte to remove. |  
 
- Returns
- The ByteArray. 
 
 
Removes the byte at the given index from a ByteArray. 
The last element in the array is used to fill in the space, so this function does not preserve the order of the ByteArray. But it is faster than g_byte_array_remove_index(). 
- Parameters
- 
  
    | index | The index of the byte to remove. |  
 
- Returns
- The ByteArray. 
 
 
Removes the given number of bytes starting at the given index from a ByteArray. 
The following elements are moved to close the gap.
- Since glibmm 2.4:
- Parameters
- 
  
    | index | The index of the first byte to remove. |  | length | The number of bytes to remove. |  
 
- Returns
- The ByteArray. 
 
 
Sets the size of the ByteArray, expanding it if necessary. 
- Parameters
- 
  
  
- Returns
- The ByteArray. 
 
 
      
        
          | guint Glib::ByteArray::size | ( |  | ) | const | 
      
 
 
Like g_byte_array_sort(), but the comparison function takes an extra user data argument. 
- Parameters
- 
  
    | compare_func | Comparison function. |  
 
 
 
      
        
          | void Glib::ByteArray::unreference | ( |  | ) | const | 
      
 
Decrement the reference count for this object. 
You should never need to do this manually - use the object via a RefPtr instead. 
 
 
A Glib::wrap() method for this object. 
- Parameters
- 
  
    | object | The C instance. |  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |  
 
- Returns
- A C++ instance that wraps this C instance.