TypeHandle::compare_to()

This commit is contained in:
David Rose 2003-01-11 16:46:15 +00:00
parent 4328dd4f63
commit d33bc6d7b2
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -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,