version 1.1, 2002/08/21 22:45:50
|
version 1.2, 2002/09/13 21:40:42
|
|
|
// | // |
// Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) | // Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
// | // |
// Modified By: |
// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company |
|
// (carolann_graves@hp.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/Array.h> | #include <Pegasus/Common/Array.h> |
|
#include <Pegasus/Common/CIMName.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
} | } |
} | } |
| |
|
inline void BubbleSort(Array<CIMName>& x) |
|
{ |
|
Uint32 n = x.size(); |
|
|
|
if (n < 2) |
|
return; |
|
|
|
for (Uint32 i = 0; i < n - 1; i++) |
|
{ |
|
for (Uint32 j = 0; j < n - 1; j++) |
|
{ |
|
if (x[j].getString() > x[j+1].getString()) |
|
{ |
|
CIMName t = x[j]; |
|
x[j] = x[j+1]; |
|
x[j+1] = t; |
|
} |
|
} |
|
} |
|
} |
|
|
|
inline void BubbleSort(Array<CIMNamespaceName>& x) |
|
{ |
|
Uint32 n = x.size(); |
|
|
|
if (n < 2) |
|
return; |
|
|
|
for (Uint32 i = 0; i < n - 1; i++) |
|
{ |
|
for (Uint32 j = 0; j < n - 1; j++) |
|
{ |
|
if (x[j].getString() > x[j+1].getString()) |
|
{ |
|
CIMNamespaceName t = x[j]; |
|
x[j] = x[j+1]; |
|
x[j+1] = t; |
|
} |
|
} |
|
} |
|
} |
|
|
#if 0 | #if 0 |
// Determine need for these functions | // Determine need for these functions |
template<class PEGASUS_ARRAY_T> | template<class PEGASUS_ARRAY_T> |