mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Added a convenience function to make an internal name with an integer suffix
This commit is contained in:
parent
7625c2cfa2
commit
baa7dfcb33
@ -301,6 +301,19 @@ finalize(BamReader *) {
|
||||
nassertv(get_ref_count() != 0);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: InternalName::make
|
||||
// Access: Published, Static
|
||||
// Description: Make using a string and an integer. Concatenates
|
||||
// the two.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(InternalName) InternalName::
|
||||
make(const string &name, int index) {
|
||||
std::ostringstream full;
|
||||
full << name << index;
|
||||
return make(full.str());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: InternalName::make_from_bam
|
||||
// Access: Protected, Static
|
||||
|
@ -52,6 +52,7 @@ PUBLISHED:
|
||||
bool unref() const;
|
||||
|
||||
INLINE static PT(InternalName) make(const string &name);
|
||||
INLINE static PT(InternalName) make(const string &name, int index);
|
||||
PT(InternalName) append(const string &basename);
|
||||
|
||||
INLINE InternalName *get_parent() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user