mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
TypeHandle::compare_to()
This commit is contained in:
parent
4328dd4f63
commit
d33bc6d7b2
@ -104,6 +104,19 @@ operator >= (const TypeHandle &other) const {
|
||||
return (_index >= other._index);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: TypeHandle::compare_to
|
||||
// Access: Published
|
||||
// Description: Sorts TypeHandles arbitrarily (according to <, >,
|
||||
// etc.). Returns a number less than 0 if this type
|
||||
// sorts before the other one, greater than zero if it
|
||||
// sorts after, 0 if they are equivalent.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE int TypeHandle::
|
||||
compare_to(const TypeHandle &other) const {
|
||||
return _index - other._index;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: TypeHandle::get_name
|
||||
// Access: Published
|
||||
|
@ -99,6 +99,7 @@ PUBLISHED:
|
||||
INLINE bool operator <= (const TypeHandle &other) const;
|
||||
INLINE bool operator > (const TypeHandle &other) const;
|
||||
INLINE bool operator >= (const TypeHandle &other) const;
|
||||
INLINE int compare_to(const TypeHandle &other) const;
|
||||
|
||||
INLINE string get_name(TypedObject *object = (TypedObject *)NULL) const;
|
||||
INLINE bool is_derived_from(TypeHandle parent,
|
||||
|
Loading…
x
Reference in New Issue
Block a user