elementcomparisonfunctions.h

来自「series60 应用程序开发的源代码 series60 应用程序开发的源代码」· C头文件 代码 · 共 45 行

H
45
字号
#ifndef ELEMENTCOMPARISONFUNCTIONS_H
#define ELEMENTCOMPARISONFUNCTIONS_H
// INCLUDES

// System includes
#include <e32base.h>

// FORWARD DECLARATIONS
class CChemicalElement;

// CLASS DECLARATION

/**
*
* @class    NElementComparisonFunctions elementcomparisonfunctions.h
* @brief    A namespace to encapsulate functions that are used by CElementList to do comparison
*            of elements for finding and sorting elements. They don't logically belong in either
*            the CElementList or CChemicalElement classes. A namespace is used to prevent them
*            being declared as global functions that would clutter up the global namespace.
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*/
namespace NElementComparisonFunctions
{
    //Equality functions
    //(true if aElement1 == aElement2)
    TBool ElementsHaveSameName(const CChemicalElement& aElement1, const CChemicalElement& aElement2);
    TBool ElementsHaveSameSymbol(const CChemicalElement& aElement1, const CChemicalElement& aElement2);
    TBool ElementsHaveSameAtomicNumber(const CChemicalElement& aElement1, const CChemicalElement& aElement2);
    //Comparison functions
    //(<0 if aElement1 < aElement2,
    // ==0 if aElement1 == aElement2,
    // >0 if aElement1 > aElement2)
    TInt CompareElementsName(const CChemicalElement& aElement1, const CChemicalElement& aElement2);
    TInt CompareElementsSymbol(const CChemicalElement& aElement1, const CChemicalElement& aElement2);
    TInt CompareElementsAtomicNumber(const CChemicalElement& aElement1, const CChemicalElement& aElement2);
    TInt CompareElementsRelativeAtomicMass(const CChemicalElement& aElement1, const CChemicalElement& aElement2);
};


#endif // #ifndef ELEMENTCOMPARISONFUNCTIONS_H

// End of File

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?