Panda3D
pStatCollectorDef.h
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 pStatCollectorDef.h
10  * @author drose
11  * @date 2000-07-09
12  */
13 
14 #ifndef PSTATCOLLECTORDEF_H
15 #define PSTATCOLLECTORDEF_H
16 
17 #include "pandabase.h"
18 #include "numeric_types.h"
19 
20 class Datagram;
21 class DatagramIterator;
22 class PStatClient;
23 class PStatClientVersion;
24 
25 /**
26  * Defines the details about the Collectors: the name, the suggested color,
27  * etc.
28  */
29 class EXPCL_PANDA_PSTATCLIENT PStatCollectorDef {
30 public:
32  PStatCollectorDef(int index, const std::string &name);
33  void set_parent(const PStatCollectorDef &parent);
34 
35  void write_datagram(Datagram &destination) const;
36  void read_datagram(DatagramIterator &source, PStatClientVersion *version);
37 
38  struct ColorDef {
39  float r, g, b;
40  };
41 
42  int _index;
43  std::string _name;
44  int _parent_index;
45  ColorDef _suggested_color;
46  int _sort;
47  std::string _level_units;
48  double _suggested_scale;
49  double _factor;
50  bool _is_active;
51  bool _active_explicitly_set;
52 };
53 
54 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Records the version number of a particular client.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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:263
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
Definition: datagram.h:38