xFileDataNode.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // Filename: xFileDataNode.h
  2. // Created by: drose (08Oct04)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, 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://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef XFILEDATANODE_H
  19. #define XFILEDATANODE_H
  20. #include "pandatoolbase.h"
  21. #include "xFileNode.h"
  22. #include "xFileDataObject.h"
  23. #include "pointerTo.h"
  24. ////////////////////////////////////////////////////////////////////
  25. // Class : XFileDataNode
  26. // Description : This is an XFileNode which is also an
  27. // XFileDataObject. Specifically, this is the base
  28. // class of XFileDataNodeTemplate and
  29. // XFileDataNodeReference, both of which have a similar
  30. // interface--they can both appear as the child of a
  31. // XFileNode, and they both contain additional nodes and
  32. // data objects.
  33. ////////////////////////////////////////////////////////////////////
  34. class XFileDataNode : public XFileNode, public XFileDataObject {
  35. public:
  36. XFileDataNode(XFile *x_file, const string &name);
  37. public:
  38. static TypeHandle get_class_type() {
  39. return _type_handle;
  40. }
  41. static void init_type() {
  42. XFileNode::init_type();
  43. XFileDataObject::init_type();
  44. register_type(_type_handle, "XFileDataNode",
  45. XFileNode::get_class_type(),
  46. XFileDataObject::get_class_type());
  47. }
  48. virtual TypeHandle get_type() const {
  49. return get_class_type();
  50. }
  51. virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
  52. private:
  53. static TypeHandle _type_handle;
  54. };
  55. #include "xFileDataNode.I"
  56. #endif