00001 // Filename: eventParameter.cxx 00002 // Created by: drose (08Feb99) 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 #include "eventParameter.h" 00020 #include "dcast.h" 00021 00022 // Tell GCC that we'll take care of the instantiation explicitly here. 00023 #ifdef __GNUC__ 00024 #pragma implementation 00025 #endif 00026 00027 TypeHandle EventStoreValueBase::_type_handle; 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Function: EventParameter::output 00031 // Access: Public 00032 // Description: 00033 //////////////////////////////////////////////////////////////////// 00034 void EventParameter:: 00035 output(ostream &out) const { 00036 if (_ptr == (TypedReferenceCount *)NULL) { 00037 out << "(empty)"; 00038 00039 } else if (_ptr->is_of_type(EventStoreValueBase::get_class_type())) { 00040 const EventStoreValueBase *sv_ptr; 00041 DCAST_INTO_V(sv_ptr, _ptr); 00042 sv_ptr->output(out); 00043 00044 } else { 00045 out << _ptr->get_type(); 00046 } 00047 }