diff -r 27f5851bd5a5 -r d06b1526f62c csxhelp/HelpEngine/inc/CSXHHelpContentBase.h --- a/csxhelp/HelpEngine/inc/CSXHHelpContentBase.h Tue Feb 02 00:03:40 2010 +0200 +++ b/csxhelp/HelpEngine/inc/CSXHHelpContentBase.h Fri Feb 19 22:42:03 2010 +0200 @@ -52,6 +52,8 @@ * @return Pointer which contains Name */ IMPORT_C TPtr GetName() const; + + TInt32 Priority() const; protected: /** @@ -60,7 +62,7 @@ * Construct a CCSXHHelpContentBase * @param aName - Name */ - CCSXHHelpContentBase(const TDesC& name); + CCSXHHelpContentBase(const TDesC& name, const TInt32 aPriority = 0); private: // 1. For Generic TOC1: The TOC1 entry name @@ -70,10 +72,13 @@ //typedef TBuf<30> TCoeContextName; HBufC *iName; + TInt32 iPriority; template friend TInt Orderer(const T& left, const T& right); + template + friend TInt OrdererWithPriority(const T& left, const T& right); }; /** * @function Orderer @@ -87,7 +92,25 @@ TInt Orderer(const T& left, const T& right) { //return left.GetName().CompareC(right.GetName()); - return (left.iName)->CompareC(*right.iName); + return (left.iName)->CompareF(*right.iName); } + +template +TInt OrdererWithPriority(const T& left, const T& right) + { + if (left.iPriority < right.iPriority) + { + return -1; + } + else if (left.iPriority == right.iPriority) + { + return (left.iName)->CompareF(*right.iName); + } + else + { + return 1; + } + } + #endif /* INC_CSXHHELPCONTENTBASE_H_HEADER_INCLUDED_BC0553D0 */