Panda3D
eventParameter.cxx
1 // Filename: eventParameter.cxx
2 // Created by: drose (08Feb99)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "eventParameter.h"
16 #include "dcast.h"
17 
18 // Tell GCC that we'll take care of the instantiation explicitly here.
19 #ifdef __GNUC__
20 #pragma implementation
21 #endif
22 
23 ////////////////////////////////////////////////////////////////////
24 // Function: EventParameter::output
25 // Access: Published
26 // Description:
27 ////////////////////////////////////////////////////////////////////
28 void EventParameter::
29 output(ostream &out) const {
30  if (_ptr == (TypedWritableReferenceCount *)NULL) {
31  out << "(empty)";
32 
33  } else if (_ptr->is_of_type(ParamValueBase::get_class_type())) {
34  const ParamValueBase *sv_ptr;
35  DCAST_INTO_V(sv_ptr, _ptr);
36  sv_ptr->output(out);
37 
38  } else {
39  out << _ptr->get_type();
40  }
41 }
A non-template base class of ParamValue (below), which serves mainly to define the placeholder for th...
Definition: paramValue.h:34
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.