dataNode.I 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // Filename: dataNode.I
  2. // Created by: drose (11Mar02)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. ////////////////////////////////////////////////////////////////////
  19. // Function: DataNode::Constructor
  20. // Access: Public
  21. // Description:
  22. ////////////////////////////////////////////////////////////////////
  23. INLINE DataNode::
  24. DataNode(const string &name) :
  25. PandaNode(name)
  26. {
  27. }
  28. ////////////////////////////////////////////////////////////////////
  29. // Function: DataNode::Copy Constructor
  30. // Access: Protected
  31. // Description:
  32. ////////////////////////////////////////////////////////////////////
  33. INLINE DataNode::
  34. DataNode(const DataNode &copy) :
  35. PandaNode(copy)
  36. {
  37. // Copying a DataNode doesn't copy its inputs or outputs.
  38. }
  39. ////////////////////////////////////////////////////////////////////
  40. // Function: DataNode::get_num_inputs
  41. // Access: Public
  42. // Description: Returns the number of different inputs that have been
  43. // defined for this node using define_input(). This
  44. // indicates the size of the DataNodeTransmit object
  45. // that should be passed to do_transmit_data().
  46. ////////////////////////////////////////////////////////////////////
  47. INLINE int DataNode::
  48. get_num_inputs() const {
  49. return _input_wires.size();
  50. }
  51. ////////////////////////////////////////////////////////////////////
  52. // Function: DataNode::get_num_outputs
  53. // Access: Public
  54. // Description: Returns the number of different outputs that have been
  55. // defined for this node using define_output(). This
  56. // indicates the size of the DataNodeTransmit object
  57. // that should be passed to do_transmit_data().
  58. ////////////////////////////////////////////////////////////////////
  59. INLINE int DataNode::
  60. get_num_outputs() const {
  61. return _output_wires.size();
  62. }