Panda3D
pStatView.I
1 // Filename: pStatView.I
2 // Created by: drose (12Jul00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 
17 ////////////////////////////////////////////////////////////////////
18 // Function: PStatView::get_thread_data
19 // Access: Public
20 // Description: Returns the current PStatThreadData associated with
21 // the view. This was set by a previous call to
22 // set_thread_data().
23 ////////////////////////////////////////////////////////////////////
24 INLINE const PStatThreadData *PStatView::
26  return _thread_data;
27 }
28 
29 ////////////////////////////////////////////////////////////////////
30 // Function: PStatView::get_client_data
31 // Access: Public
32 // Description: Returns the current PStatClientData associated with
33 // the view. This was also set by a previous call to
34 // set_thread_data().
35 ////////////////////////////////////////////////////////////////////
36 INLINE const PStatClientData *PStatView::
38  return _client_data;
39 }
40 
41 
42 ////////////////////////////////////////////////////////////////////
43 // Function: PStatView::set_to_frame
44 // Access: Public
45 // Description: Sets to a particular frame number (or the nearest
46 // available), extracted from the View's PStatThreadData
47 // pointer. See the comments in the other flavor of
48 // set_to_frame().
49 ////////////////////////////////////////////////////////////////////
50 INLINE void PStatView::
51 set_to_frame(int frame_number) {
52  set_to_frame(_thread_data->get_frame(frame_number));
53 }
54 
55 ////////////////////////////////////////////////////////////////////
56 // Function: PStatView::set_to_time
57 // Access: Public
58 // Description: Sets to the frame that occurred at the indicated time
59 // (or the nearest available frame), extracted from the
60 // View's PStatThreadData pointer. See the comments in
61 // set_to_frame.
62 ////////////////////////////////////////////////////////////////////
63 INLINE void PStatView::
64 set_to_time(double time) {
65  set_to_frame(_thread_data->get_frame_at_time(time));
66 }
67 
68 ////////////////////////////////////////////////////////////////////
69 // Function: PStatView::get_show_level
70 // Access: Public
71 // Description: Returns true if we are showing level data, false if
72 // time data.
73 ////////////////////////////////////////////////////////////////////
74 INLINE bool PStatView::
75 get_show_level() const {
76  return _show_level;
77 }
78 
79 ////////////////////////////////////////////////////////////////////
80 // Function: PStatView::get_level_index
81 // Access: Public
82 // Description: Returns an index number that can be used to determine
83 // when the set of known levels has changed. Each time
84 // the set of levels in the view changes (because of new
85 // data arriving from the client, for instance), this
86 // number is incremented.
87 ////////////////////////////////////////////////////////////////////
88 INLINE int PStatView::
89 get_level_index() const {
90  return _level_index;
91 }
void set_to_frame(const PStatFrameData &frame_data)
Supplies the View with the data for the current frame.
Definition: pStatView.cxx:216
The data associated with a particular client, but not with any one particular frame or thread: the li...
void set_to_time(double time)
Sets to the frame that occurred at the indicated time (or the nearest available frame), extracted from the View's PStatThreadData pointer.
Definition: pStatView.I:64
const PStatClientData * get_client_data()
Returns the current PStatClientData associated with the view.
Definition: pStatView.I:37
A collection of FrameData structures for recently-received frames within a particular thread...
const PStatThreadData * get_thread_data()
Returns the current PStatThreadData associated with the view.
Definition: pStatView.I:25
int get_level_index() const
Returns an index number that can be used to determine when the set of known levels has changed...
Definition: pStatView.I:89
bool get_show_level() const
Returns true if we are showing level data, false if time data.
Definition: pStatView.I:75