alternative Standard Libary  0.29.8
std::string_rep Strukturreferenz

#include <cow_string_storage.hpp>

+ Zusammengehörigkeiten von std::string_rep:

Öffentliche Methoden

void add_ref ()
 
bool release ()
 
void init (short new_capacity=0)
 

Öffentliche Attribute

short refs
 
short size
 
short capacity
 
std::spinlock loc
 

Statische öffentliche Attribute

static const size_t kMaxCapacity = (1 << (sizeof(short) << 3)) >> 1
 

Ausführliche Beschreibung

Dokumentation der Elementfunktionen

◆ add_ref()

void std::string_rep::add_ref ( )
inline
40  {
41  SPINLOCK(loc) {
42  ++refs;
43  }
44  }
short refs
Definition: cow_string_storage.hpp:57
#define SPINLOCK(m)
Definition: spinlock.hpp:60
std::spinlock loc
Definition: cow_string_storage.hpp:60

◆ init()

void std::string_rep::init ( short  new_capacity = 0)
inline
51  {
52  refs = 1;
53  size = 0;
54  capacity = new_capacity;
55  }
short refs
Definition: cow_string_storage.hpp:57
short capacity
Definition: cow_string_storage.hpp:59
short size
Definition: cow_string_storage.hpp:58

◆ release()

bool std::string_rep::release ( )
inline
45  {
46  SPINLOCK(loc) {
47  --refs;
48  }
49  return refs <= 0;
50  }
short refs
Definition: cow_string_storage.hpp:57
#define SPINLOCK(m)
Definition: spinlock.hpp:60
std::spinlock loc
Definition: cow_string_storage.hpp:60

Dokumentation der Datenelemente

◆ capacity

short std::string_rep::capacity

◆ kMaxCapacity

const size_t std::string_rep::kMaxCapacity = (1 << (sizeof(short) << 3)) >> 1
static

◆ loc

std::spinlock std::string_rep::loc

◆ refs

short std::string_rep::refs

◆ size

short std::string_rep::size

Die Dokumentation für diese Struktur wurde erzeugt aufgrund der Datei: