Home | History | Annotate | Download | only in protobuf

Lines Matching defs:rep_

255   // if rep_ is NULL, then arena is NULL.
256 Rep* rep_;
273 return (rep_ == NULL) ? NULL : rep_->arena;
528 // if rep_ is NULL, then arena is NULL.
529 Rep* rep_;
980 rep_(NULL) {
987 rep_(NULL) {
988 // In case arena is NULL, then we do not create rep_, as code has an invariant
989 // `rep_ == NULL then arena == NULL`.
991 rep_ = reinterpret_cast<Rep*>(
993 rep_->arena = arena;
1001 rep_(NULL) {
1010 rep_(NULL) {
1028 InternalDeallocate(rep_, total_size_);
1057 rep_->elements[current_size_++] = value;
1063 return &rep_->elements[current_size_++];
1071 std::fill(&rep_->elements[current_size_],
1072 &rep_->elements[new_size], value);
1081 return rep_->elements[index];
1088 return &rep_->elements[index];
1095 rep_->elements[index] = value;
1101 rep_->elements[current_size_++] = value;
1107 return &rep_->elements[current_size_++];
1147 CopyArray(rep_->elements + current_size_,
1148 other.rep_->elements, other.current_size_);
1178 return rep_ ? rep_->elements : NULL;
1183 return rep_ ? rep_->elements : NULL;
1189 std::swap(rep_, other->rep_);
1217 swap(rep_->elements[index1], rep_->elements[index2]);
1223 return rep_ ? rep_->elements : NULL;
1228 return rep_ ? rep_->elements : NULL;
1233 return rep_ ? rep_->elements : NULL;
1238 return rep_ ? rep_->elements + current_size_ : NULL;
1243 return rep_ ? rep_->elements + current_size_ : NULL;
1248 return rep_ ? rep_->elements + current_size_ : NULL;
1253 return rep_ ?
1262 Rep* old_rep = rep_;
1271 rep_ = reinterpret_cast<Rep*>(
1274 rep_ = reinterpret_cast<Rep*>(
1278 rep_->arena = arena;
1290 Element* e = &rep_->elements[0];
1291 Element* limit = &rep_->elements[total_size_];
1296 MoveArray(rep_->elements, old_rep->elements, current_size_);
1350 rep_(NULL) {
1357 rep_(NULL) {
1362 if (rep_ != NULL) {
1363 for (int i = 0; i < rep_->allocated_size; i++) {
1364 TypeHandler::Delete(cast<TypeHandler>(rep_->elements[i]), arena_);
1367 delete [] reinterpret_cast<char*>(rep_);
1370 rep_ = NULL;
1395 temp.Destroy<TypeHandler>(); // Frees rep_ if `other` had no arena.
1411 return *cast<TypeHandler>(rep_->elements[index]);
1420 return cast<TypeHandler>(rep_->elements[index]);
1427 TypeHandler::Delete(cast<TypeHandler>(rep_->elements[index]), arena_);
1433 if (rep_ != NULL && current_size_ < rep_->allocated_size) {
1434 return cast<TypeHandler>(rep_->elements[current_size_++]);
1436 if (!rep_ || rep_->allocated_size == total_size_) {
1439 ++rep_->allocated_size;
1442 rep_->elements[current_size_++] = result;
1449 TypeHandler::Clear(cast<TypeHandler>(rep_->elements[--current_size_]));
1457 void* const* elements = rep_->elements;
1483 // Note: wrapper has already guaranteed that other.rep_ != NULL here.
1485 void** other_elements = other.rep_->elements;
1487 int allocated_elems = rep_->allocated_size - current_size_;
1491 if (rep_->allocated_size < current_size_) {
1492 rep_->allocated_size = current_size_;
1534 return rep_ ? rep_->elements : NULL;
1538 return rep_ ? const_cast<void**>(rep_->elements) : NULL;
1558 swap(rep_->elements[index1], rep_->elements[index2]);
1564 if (rep_ != NULL) {
1565 for (int i = 0; i < rep_->allocated_size; ++i) {
1567 *cast<TypeHandler>(rep_->elements[i]));
1576 if (rep_ != NULL && current_size_ < rep_->allocated_size) {
1577 return cast<TypeHandler>(rep_->elements[current_size_++]);
1591 if (arena == element_arena && rep_ &&
1592 rep_->allocated_size < total_size_) {
1596 void** elems = rep_->elements;
1597 if (current_size_ < rep_->allocated_size) {
1600 elems[rep_->allocated_size] = elems[current_size_];
1604 rep_->allocated_size = rep_->allocated_size + 1;
1639 if (rep_ && rep_->allocated_size < total_size_) {
1643 void** elems = rep_->elements;
1644 if (current_size_ < rep_->allocated_size) {
1647 elems[rep_->allocated_size] = elems[current_size_];
1651 ++rep_->allocated_size;
1662 if (!rep_ || current_size_ == total_size_) {
1665 ++rep_->allocated_size;
1666 } else if (rep_->allocated_size == total_size_) {
1672 cast<TypeHandler>(rep_->elements[current_size_]), arena_);
1673 } else if (current_size_ < rep_->allocated_size) {
1676 rep_->elements[rep_->allocated_size] = rep_->elements[current_size_];
1677 ++rep_->allocated_size;
1680 ++rep_->allocated_size;
1683 rep_->elements[current_size_++] = value;
1723 cast<TypeHandler>(rep_->elements[--current_size_]);
1724 --rep_->allocated_size;
1725 if (current_size_ < rep_->allocated_size) {
1728 rep_->elements[current_size_] = rep_->elements[rep_->allocated_size];
1734 return rep_ ? (rep_->allocated_size - current_size_) : 0;
1744 if (!rep_ || rep_->allocated_size == total_size_) {
1747 rep_->elements[rep_->allocated_size++] = value;
1756 GOOGLE_DCHECK(rep_ != NULL);
1757 GOOGLE_DCHECK_GT(rep_->allocated_size, current_size_);
1758 return cast<TypeHandler>(rep_->elements[--rep_->allocated_size]);
2240 std::swap(rep_, other->rep_);