Panda3D

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 */
17 INLINE BufferContextChain::
18 BufferContextChain() :
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 */
28 INLINE 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 */
37 INLINE size_t BufferContextChain::
38 get_total_size() const {
39 return _total_size;
40 }
41
42 /**
43 * Returns the total number of BufferContexts currently assigned to this
44 * tracker.
45 */
46 INLINE int BufferContextChain::
47 get_count() const {
48 return _count;
49 }
50
51 /**
52 * Adds or removes some from the total byte count.
53 */
54 INLINE void BufferContextChain::
55 adjust_bytes(int delta) {
56 _total_size += delta;
57 }
BufferContextChain::get_count
int get_count() const
Returns the total number of BufferContexts currently assigned to this tracker.
Definition: bufferContextChain.I:47
BufferContextChain::get_total_size
size_t get_total_size() const
Returns the total number of bytes represented by the BufferContexts currently assigned to this tracke...
Definition: bufferContextChain.I:38
LinkedListNode
This just stores the pointers to implement a doubly-linked list of some kind of object.
Definition: linkedListNode.h:31