14 #ifndef INTERNALNAME_H 15 #define INTERNALNAME_H 43 INLINE
static PT(
InternalName) make(
const std::string &name);
46 INLINE
static PT(
InternalName) make(
const char (&literal)[N]);
50 virtual bool unref()
const;
52 static PT(
InternalName) make(
const std::string &name,
int index);
56 std::string get_name()
const;
57 std::string join(
const std::string &sep)
const;
58 INLINE
const std::string &get_basename()
const;
60 MAKE_PROPERTY(parent, get_parent);
61 MAKE_PROPERTY(name, get_name);
62 MAKE_PROPERTY(basename, get_basename);
64 int find_ancestor(
const std::string &basename)
const;
67 std::string get_net_basename(
int n)
const;
69 void output(std::ostream &out)
const;
77 INLINE
static PT(
InternalName) get_tangent_name(
const std::string &name);
79 INLINE
static PT(
InternalName) get_binormal_name(
const std::string &name);
81 INLINE
static PT(
InternalName) get_texcoord_name(
const std::string &name);
106 typedef phash_map<PyObject *, InternalName *, pointer_hash> PyInternTable;
107 static PyInternTable _py_intern_table;
112 std::string _basename;
114 typedef phash_map<std::string, InternalName *, string_hash> NameTable;
115 NameTable _name_table;
119 static LiteralTable _literal_table;
145 static void register_with_read_factory();
158 static void init_type() {
159 TypedWritableReferenceCount::init_type();
161 TypedWritableReferenceCount::get_class_type());
165 TypedWritableReferenceCount::get_class_type());
168 return get_class_type();
170 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
181 INLINE std::ostream &operator << (std::ostream &out,
const InternalName &tcn);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a const pointer to an InternalName, and should be used in lieu of a CPT(InternalName) in func...
virtual void finalize(BamReader *manager)
Called by the BamReader to perform any final actions needed for setting up the object after all objec...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the base class for PointerTo and ConstPointerTo.
Base class for objects that can be written to and read from Bam files.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Encodes a string name in a hash table, mapping it to a pointer.
This is the default hash_compare class, which assumes the Key is a pointer value.
This file defines the classes PointerTo and ConstPointerTo (and their abbreviations,...
TypeHandle is the identifier used to differentiate C++ class types.
This is a standard, non-reentrant mutex, similar to the Mutex class.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
virtual bool unref() const
Explicitly decrements the reference count.