Panda3D
 All Classes Functions Variables Enumerations
eggExternalReference.h
1 // Filename: eggExternalReference.h
2 // Created by: drose (11Feb99)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef EGGEXTERNALREFERENCE_H
16 #define EGGEXTERNALREFERENCE_H
17 
18 #include "pandabase.h"
19 
20 #include "eggFilenameNode.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : EggExternalReference
24 // Description : Defines a reference to another egg file which should
25 // be inserted at this point.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDAEGG EggExternalReference : public EggFilenameNode {
28 PUBLISHED:
29  EggExternalReference(const string &node_name, const string &filename);
31  EggExternalReference &operator = (const EggExternalReference &copy);
32 
33  virtual void write(ostream &out, int indent_level) const;
34 
35  virtual string get_default_extension() const;
36 
37 
38 public:
39  static TypeHandle get_class_type() {
40  return _type_handle;
41  }
42  static void init_type() {
43  EggFilenameNode::init_type();
44  register_type(_type_handle, "EggExternalReference",
45  EggFilenameNode::get_class_type());
46  }
47  virtual TypeHandle get_type() const {
48  return get_class_type();
49  }
50  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
51 
52 private:
53  static TypeHandle _type_handle;
54 };
55 
56 #include "eggExternalReference.I"
57 
58 #endif
This is an egg node that contains a filename.
Defines a reference to another egg file which should be inserted at this point.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
virtual string get_default_extension() const
Returns the default extension for this filename type.