Panda3D
 All Classes Functions Variables Enumerations
indirectCompareNames.h
1 // Filename: indirectCompareNames.h
2 // Created by: drose (23Feb01)
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 INDIRECTCOMPARENAMES_H
16 #define INDIRECTCOMPARENAMES_H
17 
18 #include "pandabase.h"
19 
20 ////////////////////////////////////////////////////////////////////
21 // Class : IndirectCompareNames
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_name() method, particularly for
25 // things that derive from Namable. It defines the
26 // order of the pointers by case-sensitive name
27 // comparison.
28 ////////////////////////////////////////////////////////////////////
29 template<class ObjectType>
31 public:
32  INLINE bool operator () (const ObjectType *a, const ObjectType *b) const;
33 };
34 
35 #include "indirectCompareNames.I"
36 
37 #endif
38 
An STL function object class, this is intended to be used on any ordered collection of pointers to cl...
bool operator()(const ObjectType *a, const ObjectType *b) const
Returns true if a sorts before b, false otherwise.