38class EXPCL_PANDA_GOBJ InternalName final :
public TypedWritableReferenceCount {
40 InternalName(InternalName *parent,
const std::string &basename);
43 INLINE
static PT(InternalName) make(
const std::string &name);
46 INLINE
static PT(InternalName) make(
const char (&literal)[N]);
49 virtual ~InternalName();
50 virtual bool unref()
const;
52 static PT(InternalName) make(
const std::string &name,
int index);
53 PT(InternalName) append(
const std::string &basename);
57 std::string
join(
const std::string &sep)
const;
66 const InternalName *
get_top()
const;
69 void output(std::ostream &out)
const;
72 INLINE
static PT(InternalName) get_root();
73 INLINE
static PT(InternalName) get_error();
74 INLINE
static PT(InternalName) get_vertex();
75 INLINE
static PT(InternalName) get_normal();
76 INLINE
static PT(InternalName) get_tangent();
77 INLINE
static PT(InternalName) get_tangent_name(
const std::string &name);
78 INLINE
static PT(InternalName) get_binormal();
79 INLINE
static PT(InternalName) get_binormal_name(
const std::string &name);
80 INLINE
static PT(InternalName) get_texcoord();
81 INLINE
static PT(InternalName) get_texcoord_name(
const std::string &name);
82 INLINE
static PT(InternalName) get_color();
83 INLINE
static PT(InternalName) get_rotate();
84 INLINE
static PT(InternalName) get_size();
85 INLINE
static PT(InternalName) get_aspect_ratio();
86 INLINE
static PT(InternalName) get_transform_blend();
87 INLINE
static PT(InternalName) get_transform_weight();
88 INLINE
static PT(InternalName) get_transform_index();
89 INLINE
static PT(InternalName) get_morph(InternalName *column,
const std::string &slider);
90 INLINE
static PT(InternalName) get_index();
91 INLINE
static PT(InternalName) get_world();
92 INLINE
static PT(InternalName) get_camera();
93 INLINE
static PT(InternalName) get_model();
94 INLINE
static PT(InternalName) get_view();
99 EXTENSION(
static PT(InternalName) make(PyObject *str));
106 typedef phash_map<PyObject *, InternalName *, pointer_hash> PyInternTable;
107 static PyInternTable _py_intern_table;
111 PT(InternalName) _parent;
112 std::string _basename;
114 typedef phash_map<std::string, InternalName *, string_hash> NameTable;
115 NameTable _name_table;
118 typedef phash_map<
const char *, PT(InternalName),
pointer_hash> LiteralTable;
119 static LiteralTable _literal_table;
122 static PT(InternalName) _root;
123 static PT(InternalName) _error;
124 static PT(InternalName) _default;
125 static PT(InternalName) _vertex;
126 static PT(InternalName) _normal;
127 static PT(InternalName) _tangent;
128 static PT(InternalName) _binormal;
129 static PT(InternalName) _texcoord;
130 static PT(InternalName) _color;
131 static PT(InternalName) _rotate;
132 static PT(InternalName) _size;
133 static PT(InternalName) _aspect_ratio;
134 static PT(InternalName) _transform_blend;
135 static PT(InternalName) _transform_weight;
136 static PT(InternalName) _transform_index;
137 static PT(InternalName) _index;
138 static PT(InternalName) _world;
139 static PT(InternalName) _camera;
140 static PT(InternalName) _model;
141 static PT(InternalName) _view;
151 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
152 static TypedWritable *make_texcoord_from_bam(
const FactoryParams ¶ms);
158 static void init_type() {
159 TypedWritableReferenceCount::init_type();
161 TypedWritableReferenceCount::get_class_type());
165 TypedWritableReferenceCount::get_class_type());
167 virtual TypeHandle get_type()
const {
168 return get_class_type();
170 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
173 static TypeHandle _type_handle;
174 static TypeHandle _texcoord_type_handle;
193class CPT_InternalName :
public ConstPointerTo<InternalName> {
195 INLINE CPT_InternalName(
const To *ptr =
nullptr);
198 INLINE CPT_InternalName(
const ConstPointerTo<InternalName> ©);
199 INLINE CPT_InternalName(ConstPointerTo<InternalName> &&from)
noexcept;
200 INLINE CPT_InternalName(
const std::string &name);
203 INLINE CPT_InternalName(
const char (&literal)[N]);
205 INLINE CPT_InternalName &operator = (
const To *ptr);
207 INLINE CPT_InternalName &operator = (
const ConstPointerTo<InternalName> ©);
209 INLINE CPT_InternalName &operator = (ConstPointerTo<InternalName> &&from)
noexcept;