Panda3D
 All Classes Functions Variables Enumerations
indirectCompareSort.h
1 // Filename: indirectCompareSort.h
2 // Created by: drose (01Mar05)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef INDIRECTCOMPARESORT_H
16 #define INDIRECTCOMPARESORT_H
17 
18 #include "pandabase.h"
19 
20 ////////////////////////////////////////////////////////////////////
21 // Class : IndirectCompareSort
22 // Description : An STL function object class, this is intended to be
23 // used on any ordered collection of pointers to classes
24 // that define a get_sort() method. It defines the
25 // order of the pointers by sort comparison.
26 ////////////////////////////////////////////////////////////////////
27 template<class ObjectType>
29 public:
30  INLINE bool operator () (const ObjectType *a, const ObjectType *b) const;
31 };
32 
33 #include "indirectCompareSort.I"
34 
35 #endif
36 
bool operator()(const ObjectType *a, const ObjectType *b) const
Returns true if a sorts before b, false otherwise.
An STL function object class, this is intended to be used on any ordered collection of pointers to cl...