Panda3D
 All Classes Functions Variables Enumerations
pStatViewLevel.h
1 // Filename: pStatViewLevel.h
2 // Created by: drose (11Jul00)
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 #ifndef PSTATVIEWLEVEL_H
16 #define PSTATVIEWLEVEL_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "pvector.h"
21 
22 class PStatClientData;
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : PStatViewLevel
26 // Description : This is a single level value, or band of color,
27 // within a View.
28 //
29 // It generally indicates either the elapsed time, or
30 // the "level" value, for a particular Collector within
31 // a given frame for a particular thread.
32 ////////////////////////////////////////////////////////////////////
34 public:
35  INLINE int get_collector() const;
36  INLINE double get_value_alone() const;
37  double get_net_value() const;
38 
39  void sort_children(const PStatClientData *client_data);
40 
41  int get_num_children() const;
42  const PStatViewLevel *get_child(int n) const;
43 
44 private:
45  int _collector;
46  double _value_alone;
47  PStatViewLevel *_parent;
48 
50  Children _children;
51 
52  friend class PStatView;
53 };
54 
55 #include "pStatViewLevel.I"
56 
57 #endif
void sort_children(const PStatClientData *client_data)
Sorts the children of this view level into order as specified by the client's sort index...
const PStatViewLevel * get_child(int n) const
Returns the nth child of this Level/Collector.
The data associated with a particular client, but not with any one particular frame or thread: the li...
double get_value_alone() const
Returns the total level value (or elapsed time value) for this Collector, not including any values ac...
This is a single level value, or band of color, within a View.
A View boils down the frame data to a linear list of times spent in a number of different Collectors...
Definition: pStatView.h:34
int get_num_children() const
Returns the number of children of this Level/Collector.
double get_net_value() const
Returns the total level value (or elapsed time) represented by this Collector, including all values i...
int get_collector() const
Returns the Collector index associated with this level.