00001 // Filename: dataNodeTransmit.h 00002 // Created by: drose (11Mar02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #ifndef DATANODETRANSMIT_H 00020 #define DATANODETRANSMIT_H 00021 00022 #include "pandabase.h" 00023 #include "eventParameter.h" 00024 00025 //////////////////////////////////////////////////////////////////// 00026 // Class : DataNodeTransmit 00027 // Description : Encapsulates the data generated from (or sent into) 00028 // any particular DataNode. This is basically just an 00029 // array of EventParameters, one for each registered 00030 // input or output wire. 00031 //////////////////////////////////////////////////////////////////// 00032 class EXPCL_PANDA DataNodeTransmit { 00033 public: 00034 INLINE DataNodeTransmit(); 00035 INLINE DataNodeTransmit(const DataNodeTransmit ©); 00036 INLINE void operator = (const DataNodeTransmit ©); 00037 INLINE ~DataNodeTransmit(); 00038 00039 INLINE void reserve(int num_wires); 00040 00041 INLINE const EventParameter &get_data(int index) const; 00042 INLINE bool has_data(int index) const; 00043 INLINE void set_data(int index, const EventParameter &data); 00044 00045 private: 00046 void slot_data(int index); 00047 00048 typedef pvector<EventParameter> Data; 00049 Data _data; 00050 }; 00051 00052 #include "dataNodeTransmit.I" 00053 00054 #endif