Panda3D
Loading...
Searching...
No Matches
bufferContextChain.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file bufferContextChain.I
10 * @author drose
11 * @date 2006-03-16
12 */
13
14/**
15 *
16 */
17INLINE BufferContextChain::
18BufferContextChain() :
19 LinkedListNode(true), // This object is the root of a list of BufferContexts.
20 _total_size(0),
21 _count(0)
22{
23}
24
25/**
26 *
27 */
28INLINE BufferContextChain::
29~BufferContextChain() {
30 nassertv(_total_size == 0 && _count == 0);
31}
32
33/**
34 * Returns the total number of bytes represented by the BufferContexts
35 * currently assigned to this tracker.
36 */
38get_total_size() const {
39 return _total_size;
40}
41
42/**
43 * Returns the total number of BufferContexts currently assigned to this
44 * tracker.
45 */
47get_count() const {
48 return _count;
49}
50
51/**
52 * Adds or removes some from the total byte count.
53 */
54INLINE void BufferContextChain::
55adjust_bytes(int delta) {
56 _total_size += delta;
57}
int get_count() const
Returns the total number of BufferContexts currently assigned to this tracker.
size_t get_total_size() const
Returns the total number of bytes represented by the BufferContexts currently assigned to this tracke...
This just stores the pointers to implement a doubly-linked list of some kind of object.