Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template basic_string_base

boost::container::dtl::basic_string_base

Synopsis

// In header: <boost/container/string.hpp>

template<typename Allocator> 
class basic_string_base {
public:
  // types
  typedef allocator_traits< allocator_type >            allocator_traits_type;
  typedef allocator_type                                stored_allocator_type;
  typedef allocator_traits_type::pointer                pointer;              
  typedef allocator_traits_type::value_type             value_type;           
  typedef allocator_traits_type::size_type              size_type;            
  typedef ::boost::intrusive::pointer_traits< pointer > pointer_traits;       

  // member classes/structs/unions

  struct long_t {
    // construct/copy/destruct
    long_t();
    long_t(size_type, size_type, pointer);
    long_t(const long_t &);
    long_t & operator=(const long_t &);

    // public data members
    size_type is_short;
    size_type length;
    size_type storage;
    pointer start;
  };

  struct members_holder : public allocator_type {
    // construct/copy/destruct
    members_holder();
    template<typename AllocatorConvertible> 
      explicit members_holder(BOOST_FWD_REF(AllocatorConvertible));

    // public member functions
    void init();
    const short_t * pshort_repr() const;
    const long_t * plong_repr() const;
    short_t * pshort_repr();
    long_t * plong_repr();

    // public data members
    repr_t m_repr;
  };

  union repr_t {

    // public data members
    long_raw_t r_aligner;
    short_t s_aligner;
    unsigned char data;
  };

  union repr_t_size_t {

    // public data members
    long_raw_t r;
    short_t s;
  };

  struct short_header {

    // public data members
    unsigned char is_short;
    unsigned char length;
  };

  struct short_t {

    // public data members
    short_header h;
    value_type data;
  };

  // construct/copy/destruct
  basic_string_base(const basic_string_base &);
  basic_string_base();
  explicit basic_string_base(const allocator_type &);
  explicit basic_string_base(BOOST_RV_REF(allocator_type));
  basic_string_base(const allocator_type &, size_type);
  explicit basic_string_base(size_type);
  basic_string_base & operator=(const basic_string_base &);
  ~basic_string_base();

  // protected member functions
  const allocator_type & alloc() const;
  allocator_type & alloc();
  bool is_short() const;
  short_t * construct_short();
  void destroy_short();
  short_t * assure_short();
  long_t * construct_long();
  void destroy_long();
  long_t * assure_long();
  pointer allocation_command(allocation_type, size_type, size_type &, 
                             pointer &);
  size_type next_capacity(size_type) const;
  void deallocate(pointer, size_type);
  void construct(pointer, const value_type & = value_type());
  void destroy(pointer, size_type);
  void destroy(pointer);
  void allocate_initial_block(size_type);
  void deallocate_block();
  size_type max_size() const;
  size_type priv_capacity() const;
  pointer priv_short_addr() const;
  pointer priv_long_addr() const;
  pointer priv_addr() const;
  pointer priv_end_addr() const;
  void priv_long_addr(pointer);
  size_type priv_storage() const;
  size_type priv_short_storage() const;
  size_type priv_long_storage() const;
  void priv_storage(size_type);
  void priv_long_storage(size_type);
  size_type priv_size() const;
  size_type priv_short_size() const;
  size_type priv_long_size() const;
  void priv_size(size_type);
  void priv_short_size(size_type);
  void priv_long_size(size_type);
  void swap_data(basic_string_base &);
};

Description

basic_string_base public construct/copy/destruct

  1. basic_string_base(const basic_string_base &);
  2. basic_string_base();
  3. explicit basic_string_base(const allocator_type & a);
  4. explicit basic_string_base(BOOST_RV_REF(allocator_type) a);
  5. basic_string_base(const allocator_type & a, size_type n);
  6. explicit basic_string_base(size_type n);
  7. basic_string_base & operator=(const basic_string_base &);
  8. ~basic_string_base();

basic_string_base protected member functions

  1. const allocator_type & alloc() const;
  2. allocator_type & alloc();
  3. bool is_short() const;
  4. short_t * construct_short();
  5. void destroy_short();
  6. short_t * assure_short();
  7. long_t * construct_long();
  8. void destroy_long();
  9. long_t * assure_long();
  10. pointer allocation_command(allocation_type command, size_type limit_size, 
                               size_type & prefer_in_recvd_out_size, 
                               pointer & reuse);
  11. size_type next_capacity(size_type additional_objects) const;
  12. void deallocate(pointer p, size_type n);
  13. void construct(pointer p, const value_type & value = value_type());
  14. void destroy(pointer p, size_type n);
  15. void destroy(pointer p);
  16. void allocate_initial_block(size_type n);
  17. void deallocate_block();
  18. size_type max_size() const;
  19. size_type priv_capacity() const;
  20. pointer priv_short_addr() const;
  21. pointer priv_long_addr() const;
  22. pointer priv_addr() const;
  23. pointer priv_end_addr() const;
  24. void priv_long_addr(pointer addr);
  25. size_type priv_storage() const;
  26. size_type priv_short_storage() const;
  27. size_type priv_long_storage() const;
  28. void priv_storage(size_type storage);
  29. void priv_long_storage(size_type storage);
  30. size_type priv_size() const;
  31. size_type priv_short_size() const;
  32. size_type priv_long_size() const;
  33. void priv_size(size_type sz);
  34. void priv_short_size(size_type sz);
  35. void priv_long_size(size_type sz);
  36. void swap_data(basic_string_base & other);

PrevUpHomeNext