Panda3D

eventParameter.cxx

00001 // Filename: eventParameter.cxx
00002 // Created by:  drose (08Feb99)
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 #include "eventParameter.h"
00016 #include "dcast.h"
00017 
00018 // Tell GCC that we'll take care of the instantiation explicitly here.
00019 #ifdef __GNUC__
00020 #pragma implementation
00021 #endif
00022 
00023 TypeHandle EventStoreValueBase::_type_handle;
00024 TypeHandle EventStoreTypedRefCount::_type_handle;
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //     Function: EventParameter::output
00028 //       Access: Published
00029 //  Description: 
00030 ////////////////////////////////////////////////////////////////////
00031 void EventParameter::
00032 output(ostream &out) const {
00033   if (_ptr == (TypedWritableReferenceCount *)NULL) {
00034     out << "(empty)";
00035 
00036   } else if (_ptr->is_of_type(EventStoreValueBase::get_class_type())) {
00037     const EventStoreValueBase *sv_ptr;
00038     DCAST_INTO_V(sv_ptr, _ptr);
00039     sv_ptr->output(out);
00040 
00041   } else {
00042     out << _ptr->get_type();
00043   }
00044 }
00045 
00046 ////////////////////////////////////////////////////////////////////
00047 //     Function: EventStoreValueBase::Destructor
00048 //       Access: Published, Virtual
00049 //  Description: 
00050 ////////////////////////////////////////////////////////////////////
00051 EventStoreValueBase::
00052 ~EventStoreValueBase() {
00053 }
00054 
00055 ////////////////////////////////////////////////////////////////////
00056 //     Function: EventStoreTypedRefCount::Destructor
00057 //       Access: Published, Virtual
00058 //  Description: 
00059 ////////////////////////////////////////////////////////////////////
00060 EventStoreTypedRefCount::
00061 ~EventStoreTypedRefCount() {
00062 }
00063 
00064 ////////////////////////////////////////////////////////////////////
00065 //     Function: EventStoreTypedRefCount::output
00066 //       Access: Published, Virtual
00067 //  Description: 
00068 ////////////////////////////////////////////////////////////////////
00069 void EventStoreTypedRefCount::
00070 output(ostream &out) const {
00071   if (_value == (TypedReferenceCount *)NULL) {
00072     out << "(empty)";
00073 
00074   } else {
00075     out << _value->get_type();
00076   }
00077 }
 All Classes Functions Variables Enumerations