FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FbxLessCompare< Type > Struct Template Reference

#include <fbxmap.h>

Class Description

template<typename Type>
struct FbxLessCompare< Type >

Default compare functor for FbxMap and FbxSet, which assumes operator < is defined.

Here is examples of different compare class implementations: With Key = int

class IntCompare
{
inline int operator()(int pKeyA, int pKeyB) const
{
return pKeyA < pKeyB ? -1 : (pKeyA > pKeyB ? 1 : 0);
}
};

With Key = Class

class ClassCompare
{
inline int operator()(const Class& pKeyA, const Class& pKeyB) const
{
return pKeyA < pKeyB ? -1 : (pKeyA > pKeyB ? 1 : 0);
}
};

With Key = char*

class StrCompare
{
inline int operator()(const char* pKeyA, const char* pKeyB) const
{
return strcmp(pKeyA, pKeyB);
}
};

Definition at line 58 of file fbxmap.h.

Public Member Functions

int operator() (const Type &pLeft, const Type &pRight) const
 

Member Function Documentation

◆ operator()()

int operator() ( const Type &  pLeft,
const Type &  pRight 
) const
inline

Definition at line 60 of file fbxmap.h.

61  {
62  return (pLeft < pRight) ? -1 : ((pRight < pLeft) ? 1 : 0);
63  }

The documentation for this struct was generated from the following file: