Panda3D
 All Classes Functions Variables Enumerations
pStatCollectorDef.h
1 // Filename: pStatCollectorDef.h
2 // Created by: drose (09Jul00)
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 PSTATCOLLECTORDEF_H
16 #define PSTATCOLLECTORDEF_H
17 
18 #include "pandabase.h"
19 #include "numeric_types.h"
20 
21 class Datagram;
22 class DatagramIterator;
23 class PStatClient;
24 class PStatClientVersion;
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : PStatCollectorDef
28 // Description : Defines the details about the Collectors: the name,
29 // the suggested color, etc.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDA_PSTATCLIENT PStatCollectorDef {
32 public:
34  PStatCollectorDef(int index, const string &name);
35  void set_parent(const PStatCollectorDef &parent);
36 
37  void write_datagram(Datagram &destination) const;
38  void read_datagram(DatagramIterator &source, PStatClientVersion *version);
39 
40  struct ColorDef {
41  float r, g, b;
42  };
43 
44  int _index;
45  string _name;
46  int _parent_index;
47  ColorDef _suggested_color;
48  int _sort;
49  string _level_units;
50  double _suggested_scale;
51  double _factor;
52  bool _is_active;
53  bool _active_explicitly_set;
54 };
55 
56 #endif
57 
Records the version number of a particular client.
A class to retrieve the individual data elements previously stored in a Datagram. ...
Defines the details about the Collectors: the name, the suggested color, etc.
Manages the communications to report statistics via a network connection to a remote PStatServer...
Definition: pStatClient.h:261
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
Definition: datagram.h:43