doublePtrDataTransition.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // Filename: doublePtrDataTransition.h
  2. // Created by: jason (07Aug00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001, 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://www.panda3d.org/license.txt .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef DOUBLEPTRDATATRANSITION_H
  19. #define DOUBLEPTRDATATRANSITION_H
  20. #include <pandabase.h>
  21. #include "pointerDataTransition.h"
  22. EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, PointerDataTransition<double>);
  23. ////////////////////////////////////////////////////////////////////
  24. // Class : DoublePtrDataTransition
  25. // Description : A PointerDataTransition templated on double types.
  26. ////////////////////////////////////////////////////////////////////
  27. class EXPCL_PANDA DoublePtrDataTransition :
  28. public PointerDataTransition<double> {
  29. public:
  30. INLINE DoublePtrDataTransition();
  31. INLINE DoublePtrDataTransition(double* ptr);
  32. virtual NodeTransition *make_copy() const;
  33. virtual NodeAttribute *make_attrib() const;
  34. public:
  35. virtual TypeHandle get_type() const {
  36. return get_class_type();
  37. }
  38. virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
  39. static TypeHandle get_class_type() {
  40. return _type_handle;
  41. }
  42. static void init_type() {
  43. PointerDataTransition<double>::init_type();
  44. register_type(_type_handle, "DoublePtrDataTransition",
  45. PointerDataTransition<double>::get_class_type());
  46. }
  47. private:
  48. static TypeHandle _type_handle;
  49. };
  50. #include "doublePtrDataTransition.I"
  51. // Tell GCC that we'll take care of the instantiation explicitly here.
  52. #ifdef __GNUC__
  53. #pragma interface
  54. #endif
  55. #endif