Panda3D

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 
00020 class Datagram;
00021 class DatagramIterator;
00022 class PStatClient;
00023 class PStatClientVersion;
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : PStatCollectorDef
00027 // Description : Defines the details about the Collectors: the name,
00028 //               the suggested color, etc.
00029 ////////////////////////////////////////////////////////////////////
00030 class EXPCL_PANDA_PSTATCLIENT PStatCollectorDef {
00031 public:
00032   PStatCollectorDef();
00033   PStatCollectorDef(int index, const string &name);
00034   void set_parent(const PStatCollectorDef &parent);
00035 
00036   void write_datagram(Datagram &destination) const;
00037   void read_datagram(DatagramIterator &source, PStatClientVersion *version);
00038 
00039   struct ColorDef {
00040     float r, g, b;
00041   };
00042 
00043   int _index;
00044   string _name;
00045   int _parent_index;
00046   ColorDef _suggested_color;
00047   int _sort;
00048   string _level_units;
00049   double _suggested_scale;
00050   double _factor;
00051   bool _is_active;
00052   bool _active_explicitly_set;
00053 };
00054 
00055 #endif
00056 
 All Classes Functions Variables Enumerations