multiNodeAttribute.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Filename: multiNodeAttribute.h
  2. // Created by: drose (23Mar00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. #ifndef MULTINODEATTRIBUTE_H
  6. #define MULTINODEATTRIBUTE_H
  7. #include <pandabase.h>
  8. #include "multiAttribute.h"
  9. #include "pointerNameClass.h"
  10. #include "node.h"
  11. #include "pt_Node.h"
  12. #include "vector_PT_Node.h"
  13. #include <pointerTo.h>
  14. class MultiNodeTransition;
  15. // We need to define this temporary macro so we can pass a parameter
  16. // containing a comma through the macro.
  17. #define MULTIATTRIBUTE_NODE MultiAttribute<PT_Node, PointerNameClass>
  18. EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, MULTIATTRIBUTE_NODE);
  19. ////////////////////////////////////////////////////////////////////
  20. // Class : MultiNodeAttribute
  21. // Description :
  22. ////////////////////////////////////////////////////////////////////
  23. class EXPCL_PANDA MultiNodeAttribute :
  24. public MultiAttribute<PT_Node, PointerNameClass> {
  25. protected:
  26. INLINE_GRAPH MultiNodeAttribute() {};
  27. INLINE_GRAPH MultiNodeAttribute(const MultiNodeAttribute &copy) :
  28. MultiAttribute<PT_Node, PointerNameClass>(copy) {};
  29. INLINE_GRAPH void operator = (const MultiNodeAttribute &copy)
  30. {MultiAttribute<PT_Node, PointerNameClass>::operator = (copy);}
  31. public:
  32. virtual TypeHandle get_type() const {
  33. return get_class_type();
  34. }
  35. virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
  36. static TypeHandle get_class_type() {
  37. return _type_handle;
  38. }
  39. static void init_type() {
  40. MultiAttribute<PT_Node, PointerNameClass>::init_type();
  41. register_type(_type_handle, "MultiNodeAttribute",
  42. MultiAttribute<PT_Node, PointerNameClass>::
  43. get_class_type());
  44. }
  45. private:
  46. static TypeHandle _type_handle;
  47. };
  48. #endif