00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef MODELROOT_H
00016 #define MODELROOT_H
00017
00018 #include "pandabase.h"
00019 #include "referenceCount.h"
00020 #include "modelNode.h"
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 class EXPCL_PANDA_PGRAPH ModelRoot : public ModelNode {
00032 PUBLISHED:
00033 INLINE ModelRoot(const string &name);
00034
00035 INLINE int get_model_ref_count() const;
00036
00037 INLINE const Filename &get_fullpath() const;
00038 INLINE void set_fullpath(const Filename &fullpath);
00039
00040
00041 class ModelReference : public ReferenceCount {
00042 PUBLISHED:
00043 INLINE ModelReference();
00044 };
00045
00046 INLINE ModelReference *get_reference() const;
00047 void set_reference(ModelReference *ref);
00048
00049 protected:
00050 INLINE ModelRoot(const ModelRoot ©);
00051
00052 public:
00053 virtual PandaNode *make_copy() const;
00054
00055 private:
00056 Filename _fullpath;
00057 PT(ModelReference) _reference;
00058
00059 public:
00060 static void register_with_read_factory();
00061 virtual void write_datagram(BamWriter *manager, Datagram &dg);
00062
00063 protected:
00064 static TypedWritable *make_from_bam(const FactoryParams ¶ms);
00065 void fillin(DatagramIterator &scan, BamReader *manager);
00066
00067 public:
00068 static TypeHandle get_class_type() {
00069 return _type_handle;
00070 }
00071 static void init_type() {
00072 ModelNode::init_type();
00073 register_type(_type_handle, "ModelRoot",
00074 ModelNode::get_class_type());
00075 }
00076 virtual TypeHandle get_type() const {
00077 return get_class_type();
00078 }
00079 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00080
00081 private:
00082 static TypeHandle _type_handle;
00083 };
00084
00085 #include "modelRoot.I"
00086
00087 #endif
00088
00089