00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef EGGFILENAMENODE_H
00016 #define EGGFILENAMENODE_H
00017
00018 #include "pandabase.h"
00019
00020 #include "eggNode.h"
00021 #include "filename.h"
00022
00023
00024
00025
00026
00027
00028
00029
00030 class EXPCL_PANDAEGG EggFilenameNode : public EggNode {
00031 PUBLISHED:
00032 INLINE EggFilenameNode();
00033 INLINE EggFilenameNode(const string &node_name, const Filename &filename);
00034 INLINE EggFilenameNode(const EggFilenameNode ©);
00035 INLINE EggFilenameNode &operator = (const EggFilenameNode ©);
00036
00037 virtual string get_default_extension() const;
00038
00039 INLINE const Filename &get_filename() const;
00040 INLINE void set_filename(const Filename &filename);
00041
00042 INLINE const Filename &get_fullpath() const;
00043 INLINE void set_fullpath(const Filename &fullpath);
00044
00045 public:
00046 class IndirectOrderByBasename {
00047 public:
00048 bool operator () (const EggFilenameNode *a, const EggFilenameNode *b) const {
00049 return a->get_filename().get_basename() < b->get_filename().get_basename();
00050 }
00051 };
00052
00053 protected:
00054 Filename _filename;
00055 Filename _fullpath;
00056
00057 public:
00058 static TypeHandle get_class_type() {
00059 return _type_handle;
00060 }
00061 static void init_type() {
00062 EggNode::init_type();
00063 register_type(_type_handle, "EggFilenameNode",
00064 EggNode::get_class_type());
00065 }
00066 virtual TypeHandle get_type() const {
00067 return get_class_type();
00068 }
00069 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00070
00071 private:
00072 static TypeHandle _type_handle;
00073 };
00074
00075 #include "eggFilenameNode.I"
00076
00077 #endif