UEFITool/common/guiddatabase.h

41 lines
1.3 KiB
C
Raw Normal View History

2017-02-14 01:39:16 -05:00
/* guiddatabase.h
Copyright (c) 2017, LongSoft. All rights reserved.
2017-02-14 01:39:16 -05:00
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
*/
#ifndef GUID_DATABASE_H
#define GUID_DATABASE_H
#include <map>
#include <string>
2017-02-14 01:39:16 -05:00
#include "basetypes.h"
#include "ustring.h"
#include "ffsparser.h"
#include "ffs.h"
#include "utility.h"
struct OperatorLessForGuids : public std::binary_function<EFI_GUID, EFI_GUID, bool>
{
bool operator()(const EFI_GUID& lhs, const EFI_GUID& rhs) const
{
return (memcmp(&lhs, &rhs, sizeof(EFI_GUID)) < 0);
}
};
typedef std::map<EFI_GUID, UString, OperatorLessForGuids> GuidDatabase;
2017-02-14 01:39:16 -05:00
UString guidDatabaseLookup(const EFI_GUID & guid);
void initGuidDatabase(const UString & path = "", UINT32* numEntries = NULL);
GuidDatabase guidDatabaseFromTreeRecursive(TreeModel * model, const UModelIndex index);
2019-01-07 15:01:04 -05:00
USTATUS guidDatabaseExportToFile(const UString & outPath, GuidDatabase & db);
2017-02-14 01:39:16 -05:00
#endif // GUID_DATABASE_H