Panda3D
 All Classes Functions Variables Enumerations
pStatCollectorDef.h
00001 // Filename: pStatCollectorDef.h
00002 // Created by:  drose (09Jul00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef PSTATCOLLECTORDEF_H
00016 #define PSTATCOLLECTORDEF_H
00017 
00018 #include "pandabase.h"
00019 #include "numeric_types.h"
00020 
00021 class Datagram;
00022 class DatagramIterator;
00023 class PStatClient;
00024 class PStatClientVersion;
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //       Class : PStatCollectorDef
00028 // Description : Defines the details about the Collectors: the name,
00029 //               the suggested color, etc.
00030 ////////////////////////////////////////////////////////////////////
00031 class EXPCL_PANDA_PSTATCLIENT PStatCollectorDef {
00032 public:
00033   PStatCollectorDef();
00034   PStatCollectorDef(int index, const string &name);
00035   void set_parent(const PStatCollectorDef &parent);
00036 
00037   void write_datagram(Datagram &destination) const;
00038   void read_datagram(DatagramIterator &source, PStatClientVersion *version);
00039 
00040   struct ColorDef {
00041     float r, g, b;
00042   };
00043 
00044   int _index;
00045   string _name;
00046   int _parent_index;
00047   ColorDef _suggested_color;
00048   int _sort;
00049   string _level_units;
00050   double _suggested_scale;
00051   double _factor;
00052   bool _is_active;
00053   bool _active_explicitly_set;
00054 };
00055 
00056 #endif
00057 
 All Classes Functions Variables Enumerations