Resolve C26495 Prefast Issues on MRTCore (#4362)
This commit is contained in:
Родитель
1ed3fb1b00
Коммит
b8fcfab663
|
@ -6,35 +6,35 @@
|
|||
namespace Microsoft::Resources
|
||||
{
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Describes a single resource qualifier.
|
||||
*/
|
||||
struct ResourceQualifier
|
||||
{
|
||||
/*!
|
||||
/*!
|
||||
* Gets the name of the qualifier, specified as an Atom.
|
||||
* \return Atom
|
||||
*/
|
||||
Atom name;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the type of the qualifier, specified as an Atom.
|
||||
* \return Atom
|
||||
*/
|
||||
Atom qualifierType;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the priority of the qualifier as an integer
|
||||
* in the range 0-1000.
|
||||
*
|
||||
*
|
||||
* \return int
|
||||
* Returns an integer in the range 0-1000 which
|
||||
* represents the default priority of this qualifier
|
||||
* relative to other resource qualifiers defined
|
||||
* in the Environment.
|
||||
*/
|
||||
int defaultRuntimePriority;
|
||||
int defaultBuildPriority;
|
||||
int defaultRuntimePriority = 0;
|
||||
int defaultBuildPriority = 0;
|
||||
|
||||
static const int MinPriority = MRM_MIN_QUALIFIER_PRIORITY;
|
||||
static const int MaxPriority = MRM_MAX_QUALIFIER_PRIORITY;
|
||||
|
@ -42,7 +42,7 @@ struct ResourceQualifier
|
|||
|
||||
class IBuildQualifierType;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* The QualifierBuildInfo struct encapsulates both runtime and build-time information
|
||||
* about a single attribute.
|
||||
*/
|
||||
|
@ -58,12 +58,12 @@ struct QualifierBuildInfo
|
|||
|
||||
class IEnvironmentVersionInfo;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* An IEnvironment is a named and versioned description of a specific
|
||||
* runtime environment in which a particular set of MRM content is
|
||||
* expected to be consumed.
|
||||
*
|
||||
* It defines the context attributes available in the runtime, as
|
||||
*
|
||||
* It defines the context attributes available in the runtime, as
|
||||
* well as the supported condition operators and the names of the
|
||||
* available implementations of the various types used by the modern
|
||||
* resource runtime itself.
|
||||
|
@ -126,6 +126,8 @@ protected:
|
|||
|
||||
MrmEnvironment() :
|
||||
m_pEnvironmentInitializer(nullptr),
|
||||
m_pQualifierInfo(nullptr),
|
||||
m_pAtoms(nullptr),
|
||||
m_pQualifierTypeNames(nullptr),
|
||||
m_pQualifierNames(nullptr),
|
||||
m_pItemTypeNames(nullptr),
|
||||
|
@ -427,63 +429,63 @@ public:
|
|||
class IEnvironmentVersionInfo : public DefObject
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
/*!
|
||||
* Gets the major version of this Environment description.
|
||||
* \return int
|
||||
*/
|
||||
virtual UINT16 GetMajorVersion() const = 0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the minor version of this Environment description.
|
||||
* \return int
|
||||
*/
|
||||
virtual UINT16 GetMinorVersion() const = 0;
|
||||
|
||||
/*!
|
||||
* Gets the checksum of a specific version of an Environment description.
|
||||
/*!
|
||||
* Gets the checksum of a specific version of an Environment description.
|
||||
* The version checksum is computed from all names and descriptions present
|
||||
* in a specific version of the Environment.
|
||||
*
|
||||
*
|
||||
* \return DEF_CHECKSUM
|
||||
*/
|
||||
virtual DEF_CHECKSUM GetVersionChecksum() const = 0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the number of qualifier types present in the specified version
|
||||
* of the Environment.
|
||||
* \return int
|
||||
*/
|
||||
virtual int GetNumQualifierTypes() const = 0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the number of qualifiers present in the specified version
|
||||
* of the Environment.
|
||||
* \return int
|
||||
*/
|
||||
virtual int GetNumQualifiers() const = 0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the number of item types present in the specified version
|
||||
* of the Environment.
|
||||
* \return int
|
||||
*/
|
||||
virtual int GetNumItemTypes() const = 0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the number of resource value types present in the specified version
|
||||
* of the Environment.
|
||||
* \return int
|
||||
*/
|
||||
virtual int GetNumResourceValueTypes() const = 0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the number of resource value locators present in the specified version
|
||||
* of the Environment.
|
||||
* \return int
|
||||
*/
|
||||
virtual int GetNumResourceValueLocators() const = 0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the number of condition operators present in the specified version
|
||||
* of the Environment.
|
||||
* \return int
|
||||
|
@ -503,7 +505,7 @@ public:
|
|||
class EnvironmentVersionInfo : public IEnvironmentVersionInfo
|
||||
{
|
||||
protected:
|
||||
MRMFILE_ENVIRONMENT_VERSION_INFO m_version;
|
||||
MRMFILE_ENVIRONMENT_VERSION_INFO m_version{};
|
||||
|
||||
EnvironmentVersionInfo(_In_opt_ const MRMFILE_ENVIRONMENT_VERSION_INFO* version)
|
||||
{
|
||||
|
@ -544,7 +546,7 @@ public:
|
|||
class EnvironmentReference : public IEnvironmentVersionInfo
|
||||
{
|
||||
protected:
|
||||
MRMFILE_ENVIRONMENT_REF m_ref;
|
||||
MRMFILE_ENVIRONMENT_REF m_ref{};
|
||||
|
||||
EnvironmentReference() {}
|
||||
|
||||
|
@ -730,8 +732,8 @@ public:
|
|||
protected:
|
||||
HRESULT Init(_In_ AtomPoolGroup* pAtoms);
|
||||
|
||||
AtomPoolGroup* m_pAtoms;
|
||||
DynamicArray<const IEnvironment*>* m_pEnvironments;
|
||||
AtomPoolGroup* m_pAtoms{ nullptr };
|
||||
DynamicArray<const IEnvironment*>* m_pEnvironments{ nullptr };
|
||||
};
|
||||
|
||||
class EnvironmentMapping : DefObject
|
||||
|
@ -762,7 +764,7 @@ public:
|
|||
_Outptr_result_buffer_maybenull_(*numMappedQualifiers) const Atom::SmallIndex** qualifierMappings) const;
|
||||
|
||||
private:
|
||||
EnvironmentMapping() : m_qualifierMappings(nullptr), m_qualifierNames(nullptr) {}
|
||||
EnvironmentMapping() : m_header(nullptr), m_qualifierMappings(nullptr), m_qualifierNames(nullptr), m_namesPool(nullptr) {}
|
||||
|
||||
HRESULT Init(
|
||||
_In_ const CoreProfile* coreProfile,
|
||||
|
@ -770,7 +772,7 @@ private:
|
|||
_In_reads_bytes_(dataSizeInBytes) const void* rawData,
|
||||
_In_ size_t dataSizeInBytes);
|
||||
|
||||
MRMFILE_ENVIRONMENT_VERSION_INFO m_version;
|
||||
MRMFILE_ENVIRONMENT_VERSION_INFO m_version{};
|
||||
const MRMFILE_ENVIRONMENT_MAPPING_HEADER* m_header;
|
||||
_Field_size_(m_version.numQualifiers) Atom::SmallIndex* m_qualifierMappings;
|
||||
_Field_size_(m_version.numQualifiers) PCWSTR* m_qualifierNames;
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace Microsoft::Resources
|
|||
|
||||
class IDecisionInfo;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* An ICondition represents a single comparison operation, typically used
|
||||
* to evaluate the relevance of some item for a specific context. It consists
|
||||
* of an operator and one or two operands.
|
||||
|
@ -75,7 +75,7 @@ public:
|
|||
static const double MinQualifierScore = 0.0;
|
||||
static const double MaxQualifierScore = 1.0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* An IQualifier represents a single comparison operation, with an
|
||||
* associated priority which indicates the importance of this qualifier relative
|
||||
* to any other qualifiers in consideration, for both normal and fallback
|
||||
|
@ -206,13 +206,13 @@ public:
|
|||
HRESULT GetBaseQualifierIndex(_Out_ int* index) const;
|
||||
|
||||
protected:
|
||||
const IRawDecisionInfo* m_pRaw;
|
||||
const IRawDecisionInfo* m_pRaw{ nullptr };
|
||||
|
||||
MRMFILE_BASE_QUALIFIER m_baseQualifier;
|
||||
MRMFILE_QUALIFIER m_qualifier;
|
||||
MRMFILE_BASE_QUALIFIER m_baseQualifier{};
|
||||
MRMFILE_QUALIFIER m_qualifier{};
|
||||
|
||||
int m_baseIndex;
|
||||
int m_index;
|
||||
int m_baseIndex{ 0 };
|
||||
int m_index{ 0 };
|
||||
};
|
||||
|
||||
class QualifierSetResult : public IQualifierSet
|
||||
|
@ -238,10 +238,10 @@ public:
|
|||
const IDecisionInfo* GetPool() const;
|
||||
|
||||
protected:
|
||||
const IRawDecisionInfo* m_pRaw;
|
||||
const IRawDecisionInfo* m_pRaw{ nullptr };
|
||||
|
||||
MRMFILE_QUALIFIER_SET m_qualifierSet;
|
||||
int m_index;
|
||||
MRMFILE_QUALIFIER_SET m_qualifierSet{};
|
||||
int m_index{ 0 };
|
||||
};
|
||||
|
||||
class DecisionResult : public IDecision
|
||||
|
@ -270,10 +270,10 @@ public:
|
|||
const IDecisionInfo* GetPool() const;
|
||||
|
||||
protected:
|
||||
const IRawDecisionInfo* m_pRaw;
|
||||
const IRawDecisionInfo* m_pRaw{ nullptr };
|
||||
|
||||
MRMFILE_DECISION m_decision;
|
||||
int m_index;
|
||||
MRMFILE_DECISION m_decision{};
|
||||
int m_index{ 0 };
|
||||
};
|
||||
|
||||
class IEnvironment;
|
||||
|
|
|
@ -22,21 +22,21 @@ private:
|
|||
fStringPoolIsOwned = 0x0100
|
||||
};
|
||||
|
||||
bool m_finalized;
|
||||
bool m_finalized{ false };
|
||||
|
||||
UINT32 m_flags;
|
||||
Atom::HashMethod m_hashMethod;
|
||||
UINT32 m_flags{ 0 };
|
||||
Atom::HashMethod m_hashMethod{ DEF_HASH_DEFAULT };
|
||||
|
||||
AtomPoolGroup* m_group;
|
||||
Atom::PoolIndex m_poolIndex;
|
||||
AtomPoolGroup* m_group{ nullptr };
|
||||
Atom::PoolIndex m_poolIndex { DEF_ATOM_POOL_INDEX_NONE };
|
||||
|
||||
Atom::AtomCount m_numAtoms;
|
||||
Atom::AtomCount m_sizeAtoms;
|
||||
DEFFILE_ATOMPOOL_HASHINDEX* m_hash;
|
||||
UINT32* m_offset;
|
||||
WriteableStringPool* m_pStrings;
|
||||
WCHAR m_description[FileAtomPool::DescriptionLength];
|
||||
BaseFile::SectionIndex m_sectionIndex;
|
||||
Atom::AtomCount m_numAtoms{ 0 };
|
||||
Atom::AtomCount m_sizeAtoms{ 0 };
|
||||
DEFFILE_ATOMPOOL_HASHINDEX* m_hash { nullptr };
|
||||
UINT32* m_offset{ nullptr };
|
||||
WriteableStringPool* m_pStrings{ nullptr };
|
||||
WCHAR m_description[FileAtomPool::DescriptionLength]{ 0 };
|
||||
BaseFile::SectionIndex m_sectionIndex{ DEFFILE_SECTION_INDEX_NONE };
|
||||
|
||||
protected:
|
||||
static const int DefaultInitialSize = 10;
|
||||
|
|
|
@ -54,7 +54,7 @@ private:
|
|||
|
||||
CallBackCompareFunc m_pFnComparer;
|
||||
CallbackHashFunc m_pFnHash;
|
||||
bool m_fSorted;
|
||||
bool m_fSorted{ false };
|
||||
|
||||
HASH_KEY* m_pHashTable;
|
||||
|
||||
|
|
|
@ -21,10 +21,10 @@ namespace Microsoft::Resources::Build
|
|||
|
||||
class FolderInfo;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Base class for per-file private data. Must be subclassed and
|
||||
* cannot be instantiated directly.
|
||||
*
|
||||
*
|
||||
* Per-file private data is identified by the object that
|
||||
* owns it and a data index. The data index is used to enforce uniqueness
|
||||
* when appropriate and cannot be negative. Otherwise the interpretation
|
||||
|
@ -47,30 +47,30 @@ public:
|
|||
*/
|
||||
virtual ~FileInfoPrivateData();
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the owner of this private data.
|
||||
*
|
||||
*
|
||||
* \return const IFileSection*
|
||||
* Returns a pointer to the object that owns this private
|
||||
* data.
|
||||
*/
|
||||
const void* GetOwner() const { return m_pOwner; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the index of this private data.
|
||||
*
|
||||
*
|
||||
* \return const int
|
||||
* Returns the owner-supplied index of this private data.
|
||||
*/
|
||||
const int GetIndex() const { return m_index; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Determines if a this \ref FileInfoPrivateData object matches
|
||||
* a supplied owner and index.
|
||||
*
|
||||
*
|
||||
* \param pOwner
|
||||
* Pointer to the desired owner, or NULL to accept any owner.
|
||||
*
|
||||
* Pointer to the desired owner, or NULL to accept any owner.
|
||||
*
|
||||
* \param index
|
||||
* Specifies the \ref index to be matched, or a value less than 0
|
||||
* to accept any index.
|
||||
|
@ -78,7 +78,7 @@ public:
|
|||
* \return bool
|
||||
* Returns true if the owner and index match, false otherwise
|
||||
* or if an error occurs.
|
||||
*
|
||||
*
|
||||
* If pOwner is NULL, index _must_ be less than 0, or an
|
||||
* INVALID_ARG error results.
|
||||
*/
|
||||
|
@ -91,14 +91,14 @@ public:
|
|||
return ((!pOwner) || (pOwner == m_pOwner)) && ((index < 0) || (index == m_index));
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Determines if a this object matches a supplied \ref FileInfoPrivateData.
|
||||
* A \ref FileInfePrivateData matches if both the owner and index are
|
||||
* equal to that of this object.
|
||||
*
|
||||
* equal to that of this object.
|
||||
*
|
||||
* \param pOther
|
||||
* Pointer to \ref FileInfoPrivateData to be matched.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if the supplied \ref FileInfoPrivate data matches this
|
||||
* one, false otherwise or if an error occurs.
|
||||
|
@ -112,12 +112,12 @@ public:
|
|||
return pOther->Matches(m_pOwner, m_index);
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Sets the next chained private element for this object.
|
||||
*
|
||||
*
|
||||
* \param pNext
|
||||
* Pointer to the \ref FileInfoPrivateData to be added.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* Returns S_OK if the private data was added, failure if an
|
||||
* error occurred.
|
||||
|
@ -127,22 +127,22 @@ public:
|
|||
*/
|
||||
HRESULT SetNext(__in_opt FileInfoPrivateData* pNext);
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the next chained \ref FileInfoPrivateData.
|
||||
*
|
||||
*
|
||||
* \return FileInfoPrivateData*
|
||||
* Returns a pointer to the next chained \ref FileInfoPrivateData,
|
||||
* or NULL if no chained elements are present.
|
||||
*/
|
||||
FileInfoPrivateData* GetNext() const { return m_pNext; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the next chained private \ref FileInfoPrivateData element
|
||||
* that matches the supplied criteria.
|
||||
*
|
||||
*
|
||||
* \param pOwner
|
||||
* Specifies the owner to be matched, or NULL to match any owner.
|
||||
*
|
||||
*
|
||||
* \param index
|
||||
* Specifies the private data index to be matched, or a value less than
|
||||
* zero to match any index.
|
||||
|
@ -161,10 +161,10 @@ public:
|
|||
*/
|
||||
bool TryGetNext(__in_opt const void* pOwner, __in int index, __out FileInfoPrivateData** ppDataOut) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the next chained private \ref FileInfoPrivateData element
|
||||
* with the specified owner.
|
||||
*
|
||||
*
|
||||
* \param pOwner
|
||||
* Specifies the owner to be matched, or NULL to match any owner.
|
||||
*
|
||||
|
@ -184,12 +184,12 @@ public:
|
|||
class FileInfo : public DefObject
|
||||
{
|
||||
protected:
|
||||
PWSTR m_pName;
|
||||
FolderInfo* m_pParentFolder;
|
||||
int m_index;
|
||||
FileInfoPrivateData* m_pPrivates;
|
||||
UINT16 m_flags;
|
||||
bool m_nameIsAscii;
|
||||
PWSTR m_pName{ nullptr };
|
||||
FolderInfo* m_pParentFolder{ nullptr };
|
||||
int m_index{ 0 };
|
||||
FileInfoPrivateData* m_pPrivates{ nullptr };
|
||||
UINT16 m_flags{ 0 };
|
||||
bool m_nameIsAscii{ false };
|
||||
|
||||
FileInfo(__in FolderInfo* pParent);
|
||||
|
||||
|
@ -205,17 +205,17 @@ public:
|
|||
* add add it to the parent folder. To ensure proper
|
||||
* semantics and consistency, use FolderInfo::GetOrAddFile
|
||||
* to create new files.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* The name of the file to be added.
|
||||
*
|
||||
*
|
||||
* \param pParent
|
||||
* Parent folder that will contain the new file.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to the new FileInfo, or NULL if an error
|
||||
* occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
static HRESULT CreateInstance(__in PCWSTR pName, __in FolderInfo* pParent, _Outptr_ FileInfo** result);
|
||||
|
@ -225,7 +225,7 @@ public:
|
|||
*
|
||||
* \param pNameOut
|
||||
* Returns the name of the file.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* Returns S_OK for success, failure if an error occurs.
|
||||
*/
|
||||
|
@ -241,7 +241,7 @@ public:
|
|||
*/
|
||||
FolderInfo* GetParentFolder() const { return m_pParentFolder; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the full path of a file.
|
||||
*
|
||||
* \param pStatus
|
||||
|
@ -249,13 +249,13 @@ public:
|
|||
*
|
||||
* \param pPathOut
|
||||
* Returns the full (absolute) path of the referenced file.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true for success, false if an error occurs.
|
||||
*/
|
||||
HRESULT GetFullPath(__inout StringResult* pPathOut) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the index of this file in the generated file list section.
|
||||
* Note that the file index is typically undefined (-1) until the file
|
||||
* list section is finalized.
|
||||
|
@ -274,23 +274,23 @@ public:
|
|||
*/
|
||||
void SetIndex(int index) { m_index = index; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the head of the list of private data associated with this
|
||||
* file entry.
|
||||
*
|
||||
*
|
||||
* \return const FileInfoPrivateData*
|
||||
* The first element in the list of private data associated with this
|
||||
* file entry.
|
||||
*/
|
||||
FileInfoPrivateData* GetPrivateData() const { return m_pPrivates; }
|
||||
|
||||
/*!
|
||||
* Gets the first element associated with a specified owner from the
|
||||
/*!
|
||||
* Gets the first element associated with a specified owner from the
|
||||
* private data list for this file element.
|
||||
*
|
||||
*
|
||||
* \param pOwner
|
||||
* Pointer to the desired owner, or NULL to match any owner.
|
||||
*
|
||||
*
|
||||
* \param ppDataOut
|
||||
* Returns a pointer to the requested private data structure. Returns
|
||||
* NULL if no matching private data is found or if an error occurs.
|
||||
|
@ -306,17 +306,17 @@ public:
|
|||
return TryGetPrivateData(pOwner, -1, ppDataOut);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Gets the first element with a specified owner and index from the
|
||||
/*!
|
||||
* Gets the first element with a specified owner and index from the
|
||||
* private data list for this file element.
|
||||
*
|
||||
*
|
||||
* \param pOwner
|
||||
* Pointer to the desired owner, or NULL to accept any owner.
|
||||
*
|
||||
* \param index
|
||||
* Index of the private data to be found, or a negative value to
|
||||
* accept any index.
|
||||
*
|
||||
*
|
||||
* \param ppDataOut
|
||||
* Returns a pointer to the requested private data structure. Returns
|
||||
* NULL if no matching private data is found or if an error occurs.
|
||||
|
@ -329,27 +329,27 @@ public:
|
|||
*/
|
||||
bool TryGetPrivateData(__in_opt const void* pOwner, __in int index, __out FileInfoPrivateData** ppDataOut) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Adds a supplied \ref FileInfoPrivateData to the chain
|
||||
* of private data associated with this file.
|
||||
*
|
||||
*
|
||||
* \param pPrivate
|
||||
* The \ref FileInfoPrivateData to be added.
|
||||
*
|
||||
* \param allowDuplicates
|
||||
* If true, the private data will be added even if data already
|
||||
* If true, the private data will be added even if data already
|
||||
* exists with the same parent and index. If false, adding duplicate
|
||||
* private data yields an E_DEF_ENTRY_ALREADY_EXISTS error.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* Returns S_OK if the private data was successfully added, failure
|
||||
* otherwise.
|
||||
*/
|
||||
HRESULT AddPrivateData(__in FileInfoPrivateData* pPrivate, __in bool allowDuplicates);
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Get the flag information that can have preload set
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns UINT16 flags, it always return success
|
||||
*/
|
||||
|
@ -370,23 +370,23 @@ public:
|
|||
class FolderInfo : public DefObject
|
||||
{
|
||||
protected:
|
||||
PWSTR m_pName;
|
||||
FolderInfo* m_pParentFolder;
|
||||
PWSTR m_pName{ nullptr };
|
||||
FolderInfo* m_pParentFolder{ nullptr };
|
||||
|
||||
int m_numSubfolders;
|
||||
int m_sizeSubfolders;
|
||||
FolderInfo** m_pSubfolders;
|
||||
int m_numSubfolders{ 0 };
|
||||
int m_sizeSubfolders{ 0 };
|
||||
FolderInfo** m_pSubfolders{ nullptr };
|
||||
|
||||
int m_numFiles;
|
||||
int m_sizeFiles;
|
||||
FileInfo** m_pFiles;
|
||||
int m_numFiles{ 0 };
|
||||
int m_sizeFiles{ 0 };
|
||||
FileInfo** m_pFiles{ nullptr };
|
||||
|
||||
int m_totalNumFiles;
|
||||
int m_totalNumFolders;
|
||||
int m_totalNumFiles{ 0 };
|
||||
int m_totalNumFolders{ 0 };
|
||||
|
||||
int m_index;
|
||||
int m_index{ 0 };
|
||||
|
||||
bool m_nameIsAscii;
|
||||
bool m_nameIsAscii{ false };
|
||||
|
||||
FolderInfo(__in PCWSTR pName, __in_opt FolderInfo* pParent);
|
||||
|
||||
|
@ -409,17 +409,17 @@ public:
|
|||
* add add it to the parent folder. To ensure proper
|
||||
* semantics and consistency, use FolderInfo::GetOrAddSubfolder
|
||||
* to create new subfolders.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* The name of the folder to be added.
|
||||
*
|
||||
*
|
||||
* \param pParent
|
||||
* Parent folder that will contain the new subfolder.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to the new FolderInfo, or NULL if an error
|
||||
* occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
static HRESULT CreateInstance(__in PCWSTR pName, __in FolderInfo* pParent, _Outptr_ FolderInfo** result);
|
||||
|
@ -430,14 +430,14 @@ public:
|
|||
* \param result
|
||||
* Returns a pointer to the new FolderInfo, or NULL if an error
|
||||
* occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
static HRESULT NewRootFolder(_Outptr_ FolderInfo** result);
|
||||
|
||||
/*!
|
||||
* Gets the base name of the folder.
|
||||
*
|
||||
*
|
||||
* \param pNameOut
|
||||
* Returns the base name of the referenced folder.
|
||||
*
|
||||
|
@ -449,10 +449,10 @@ public:
|
|||
//! Gets the base name of the folder.
|
||||
PCWSTR GetFolderName() const { return m_pName; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the number of immediate subfolders.
|
||||
* Does not include children of subfolders of the referenced folder.
|
||||
*
|
||||
*
|
||||
* \return int
|
||||
* Returns the number of referenced subfolders.
|
||||
*/
|
||||
|
@ -461,19 +461,19 @@ public:
|
|||
/*!
|
||||
* Gets the number of files contained in the referenced folder itself.
|
||||
* Does not include files contained in subfolders.
|
||||
*
|
||||
*
|
||||
* \return int
|
||||
* Returns the number of referenced files.
|
||||
*/
|
||||
int GetNumFiles() const { return m_numFiles; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the total number of referenced folders at or below the supplied folder.
|
||||
* Includes the folder itself, plus all children of subfolders.
|
||||
*
|
||||
*
|
||||
* \return int
|
||||
* Returns the total number of referenced folders at or below the
|
||||
* supplied folder.
|
||||
* supplied folder.
|
||||
*/
|
||||
int GetTotalNumFolders() const { return m_totalNumFolders; }
|
||||
|
||||
|
@ -482,7 +482,7 @@ public:
|
|||
*
|
||||
* Includes referenced files in the folder itself, plus any referenced files
|
||||
* contained in subfolders of any depth.
|
||||
*
|
||||
*
|
||||
* \return int
|
||||
* Returns the total number of referenced files at or below the
|
||||
* supplied folder.
|
||||
|
@ -492,12 +492,12 @@ public:
|
|||
//! Gets the parent of this folder, if defined.
|
||||
FolderInfo* GetParentFolder() const { return m_pParentFolder; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the full absolute path of the supplied folder.
|
||||
*
|
||||
* \param pPathOut
|
||||
* Returns the full absolute path of the supplied folder.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* Returns S_OK on success, failure if an error occurs.
|
||||
*/
|
||||
|
@ -510,7 +510,7 @@ public:
|
|||
* Index of the folder to be returned.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to an IFolderInfo describing
|
||||
* Returns a pointer to an IFolderInfo describing
|
||||
* the requested subdirectory, or NULL if an error occurs.
|
||||
*
|
||||
* \return HRESULT
|
||||
|
@ -527,7 +527,7 @@ public:
|
|||
* \param result
|
||||
* Returns a pointer to an IFolderInfo describing
|
||||
* the requested subdirectory, or NULL if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* Returns E_DEF_FOLDER_NOT_FOUND if no matching folder is found.
|
||||
*/
|
||||
|
@ -538,13 +538,13 @@ public:
|
|||
*
|
||||
* Returns false but doesn not set an error if no matching
|
||||
* folder is found.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* The name of the subfolder to be returned.
|
||||
*
|
||||
* \param ppFolderOut
|
||||
* Returns the matching folder, or NULL if no matching folder
|
||||
* is found.
|
||||
* is found.
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a matching folder was found, false if no match
|
||||
|
@ -552,13 +552,13 @@ public:
|
|||
*/
|
||||
bool TryGetSubfolder(__in PCWSTR pName, __inout FolderInfo** ppFolderOut) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the index of a subfolder by name.
|
||||
* Reports an error if no matching folder is found.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* The name of the subfolder to be returned.
|
||||
*
|
||||
*
|
||||
* \return int
|
||||
* Returns the integer index of the requested subdirectory,
|
||||
* or -1 if an error occurs or if the subdirectory is not found.
|
||||
|
@ -570,13 +570,13 @@ public:
|
|||
*
|
||||
* Returns false but does not report an error if no matching
|
||||
* folder is found.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* The name of the subfolder to be returned.
|
||||
*
|
||||
* \param ppIndexOut
|
||||
* Returns the index of the matching folder, or NULL if no matching folder
|
||||
* is found.
|
||||
* is found.
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a matching folder was found, false if no match
|
||||
|
@ -585,19 +585,19 @@ public:
|
|||
bool TryGetSubfolderIndex(__in PCWSTR pName, __out int* pIndexOut) const;
|
||||
|
||||
/*!
|
||||
* Gets or adds a named subfolder to a FolderInfo.
|
||||
* Gets or adds a named subfolder to a FolderInfo.
|
||||
*
|
||||
* If a subfolder with a matching name already exists, returns
|
||||
* the existing subfolder. If no matching subfolder exists,
|
||||
* adds a new subfolder and returns a pointer to it.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* Name of the new subfolder.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to a FolderInfo describing the
|
||||
* requested subfolder.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetOrAddSubfolder(_In_ PCWSTR pName, _Out_ FolderInfo** result);
|
||||
|
@ -611,7 +611,7 @@ public:
|
|||
* \param result
|
||||
* Returns a pointer to an IFileInfo describing
|
||||
* the requested file.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetFile(_In_ int index, _Out_ FileInfo** result) const;
|
||||
|
@ -619,14 +619,14 @@ public:
|
|||
/*!
|
||||
* Gets a file by name.
|
||||
* Reports an error if no matching file is found.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* The name of the file to be returned.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to an IFileInfo describing
|
||||
* the requested file, or NULL if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetFile(_In_ PCWSTR index, _Out_ FileInfo** result) const;
|
||||
|
@ -635,13 +635,13 @@ public:
|
|||
* Tries to get a file by name.
|
||||
* Returns false but does not set an error if no matching
|
||||
* file is found.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* The name of the file to be returned.
|
||||
*
|
||||
* \param ppFileOut
|
||||
* Returns the matching file, or NULL if no matching file
|
||||
* is found.
|
||||
* is found.
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a matching file was found, false if no match
|
||||
|
@ -652,10 +652,10 @@ public:
|
|||
/*!
|
||||
* Gets the index of a file by name.
|
||||
* Reports an error if no matching file is found.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* The name of the file to be returned.
|
||||
*
|
||||
*
|
||||
* \return int
|
||||
* Returns the integer index of the requested file,
|
||||
* or -1 if an error occurs or if the file is not found.
|
||||
|
@ -666,13 +666,13 @@ public:
|
|||
* Tries to get the index of a file by name.
|
||||
* Returns false but does not report an error if no matching
|
||||
* file is found.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* The name of the file to be returned.
|
||||
*
|
||||
* \param ppIndexOut
|
||||
* Returns the index of the matching file, or NULL if no matching file
|
||||
* is found.
|
||||
* is found.
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a matching file was found, false if no match
|
||||
|
@ -685,19 +685,19 @@ public:
|
|||
* If a file with a matching name already exists, returns a
|
||||
* pointer to the existing FileInfo. If no matching file exists,
|
||||
* adds a new FileInfo and returns a pointer to it.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* Name of the new file.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to a FileInfo describing the
|
||||
* requested file.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetOrAddFile(_In_ PCWSTR pName, _Out_ FileInfo** result);
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the index of this folder in the generated file list section.
|
||||
* Note that the folder index is typically undefined (-1) until the file
|
||||
* list section is finalized.
|
||||
|
@ -708,9 +708,9 @@ public:
|
|||
*/
|
||||
int GetIndex() const { return m_index; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Sets the index of this folder in the generated file list section.
|
||||
*
|
||||
*
|
||||
* \param index
|
||||
* The index to be assigned.
|
||||
*/
|
||||
|
@ -721,27 +721,27 @@ public:
|
|||
|
||||
/*!
|
||||
* Class used to construct a file list section.
|
||||
* The builder holds one or more "root" folders, specified as an
|
||||
* The builder holds one or more "root" folders, specified as an
|
||||
* absolute path, and any number of subfolders or files. Subfolders
|
||||
* and files are specified by name, relative to one of the folders.
|
||||
*/
|
||||
class FileListBuilder : public ISectionBuilder
|
||||
{
|
||||
private:
|
||||
FileBuilder* m_pParentFile;
|
||||
BaseFile::SectionIndex m_sectionIndex;
|
||||
FileBuilder* m_pParentFile{ nullptr };
|
||||
BaseFile::SectionIndex m_sectionIndex{ 0 };
|
||||
|
||||
FolderInfo* m_pRootFolder;
|
||||
FolderInfo* m_pRootFolder{ nullptr };
|
||||
|
||||
UINT32 m_flags;
|
||||
UINT32 m_flags{ 0 };
|
||||
|
||||
class FinalizedBuilder;
|
||||
|
||||
int m_numFinalizedFolders;
|
||||
int m_numFinalizedFiles;
|
||||
size_t m_cchFinalizedAsciiNames;
|
||||
size_t m_cchFinalizedUtf16Names;
|
||||
mutable FinalizedBuilder* m_pFinalized;
|
||||
int m_numFinalizedFolders{ 0 };
|
||||
int m_numFinalizedFiles{ 0 };
|
||||
size_t m_cchFinalizedAsciiNames{ 0 };
|
||||
size_t m_cchFinalizedUtf16Names{ 0 };
|
||||
mutable FinalizedBuilder* m_pFinalized{ nullptr };
|
||||
/*
|
||||
mutable FolderInfo** m_pAllFolders;
|
||||
mutable FileInfo** m_pAllFiles;
|
||||
|
@ -757,10 +757,10 @@ protected:
|
|||
* A string pool containing all of the strings from a specified folder
|
||||
* and all of its contents might need fewer characters than reported
|
||||
* by this function, but it will not require more.
|
||||
*
|
||||
*
|
||||
* \param pFolder
|
||||
* The folder to be checked.
|
||||
*
|
||||
*
|
||||
* \return int
|
||||
* The total size in bytes needed to hold the strings.
|
||||
*/
|
||||
|
@ -772,10 +772,10 @@ protected:
|
|||
* A string pool containing all of the strings from a specified folder
|
||||
* and all of its contents might need fewer characters than reported
|
||||
* by this function, but it will not require more.
|
||||
*
|
||||
*
|
||||
* \param pFolder
|
||||
* The folder to be checked.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
|
||||
|
@ -789,10 +789,10 @@ protected:
|
|||
* Assigns indices to a folder and its contents.
|
||||
* Updates the folder itself, all of its contents, and recursively
|
||||
* updates all children. Once assigned, file and folder indices are immutable.
|
||||
*
|
||||
*
|
||||
* \param pFolderInfo
|
||||
* The folder to which indices will be assigned.
|
||||
*
|
||||
*
|
||||
* \param index
|
||||
* The index to be assigned to pFolder.
|
||||
*
|
||||
|
@ -807,7 +807,7 @@ protected:
|
|||
*
|
||||
* \param sizeFiles
|
||||
* The total size in elements of the files array.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* Returns S_OK on success, failure if an error occurs.
|
||||
*/
|
||||
|
@ -830,7 +830,7 @@ protected:
|
|||
*
|
||||
* \param parentIndex
|
||||
* The index of the folder's parent.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* Return S_OK on success, failure if an error occurs.
|
||||
*/
|
||||
|
@ -859,14 +859,14 @@ public:
|
|||
/*!
|
||||
* Creates a new FileListBuilder.
|
||||
* Builds a file list section as part of a supplied FileBuilder.
|
||||
*
|
||||
*
|
||||
* \param pParentFile
|
||||
* The FileBuilder to which the section will belong.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to the newe FileListBuilder, or NULL
|
||||
* if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
static HRESULT CreateInstance(_In_ FileBuilder* pParentFile, _In_ UINT32 flags, _Outptr_ FileListBuilder** result);
|
||||
|
@ -884,7 +884,7 @@ public:
|
|||
//! Gets the total number of files referenced by this builder.
|
||||
int GetTotalNumFiles() const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets a root folder specified by index.
|
||||
*
|
||||
* \param index
|
||||
|
@ -893,7 +893,7 @@ public:
|
|||
* \param result
|
||||
* A FolderInfo describing the requested root
|
||||
* folder, or NULL if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetRootFolder(_In_ int index, _Out_ FolderInfo** result) const;
|
||||
|
@ -901,14 +901,14 @@ public:
|
|||
/*!
|
||||
* Gets a root folder specified by name.
|
||||
* Reports an error if no matching folder is found.
|
||||
*
|
||||
*
|
||||
* \param pPath
|
||||
* Name of the root folder to be returned.
|
||||
*
|
||||
* \param result
|
||||
* A FolderInfo describing the requested root
|
||||
* A FolderInfo describing the requested root
|
||||
* folder, or NULL if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetRootFolder(_In_ PCWSTR pPath, _Out_ FolderInfo** result) const;
|
||||
|
@ -917,15 +917,15 @@ public:
|
|||
* Tries to get a root folder specified by name.
|
||||
* Returns false but does not report an error if no
|
||||
* matching folder is found.
|
||||
*
|
||||
*
|
||||
* \param pPath
|
||||
* Name of the root folder to be returned.
|
||||
*
|
||||
*
|
||||
* \param ppFolderOut
|
||||
* Returns a pointer to a FolderInfo describing the
|
||||
* requested root folder, or NULL if no match is found
|
||||
* or if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a matching folder is found, false
|
||||
* if no match is found or if an error occurs.
|
||||
|
@ -938,25 +938,25 @@ public:
|
|||
* returns a pointer to the existing IFolderInfo.
|
||||
* If no matching folder exists, adds a new IFolderInfo
|
||||
* and returns a pointer to it.
|
||||
*
|
||||
*
|
||||
* \param pPath
|
||||
* Name of the new root folder.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to an IFileInfo describing the
|
||||
* requested file.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetOrAddRootFolder(_In_ PCWSTR pPath, _Out_ FolderInfo** result);
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets a folder by index. Can only be called once the
|
||||
* builder has been finalized.
|
||||
*
|
||||
*
|
||||
* \param index
|
||||
* The index of the folder to be returned.
|
||||
*
|
||||
*
|
||||
* \param ppFolderOut
|
||||
* Returns the requested \ref FolderInfo, or NULL if an
|
||||
* error occurs.
|
||||
|
@ -967,13 +967,13 @@ public:
|
|||
*/
|
||||
bool TryGetFolderByIndex(__in int index, __out FolderInfo** ppFolderOut) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets a file by index. Can only be called once the
|
||||
* builder has been finalized.
|
||||
*
|
||||
*
|
||||
* \param index
|
||||
* The index of the file to be returned.
|
||||
*
|
||||
*
|
||||
* \param ppFileOut
|
||||
* Returns the requested \ref FileInfo, or NULL if an
|
||||
* error occurs.
|
||||
|
@ -984,54 +984,54 @@ public:
|
|||
*/
|
||||
bool TryGetFileByIndex(__in int index, __out FileInfo** ppFileOut) const;
|
||||
|
||||
/*!
|
||||
* Gets an \ref IFileList that represents the contents of
|
||||
* this builder. The return \ref IFileList is owned by
|
||||
/*!
|
||||
* Gets an \ref IFileList that represents the contents of
|
||||
* this builder. The return \ref IFileList is owned by
|
||||
* the builder and should not be deleted.
|
||||
*
|
||||
*
|
||||
* Can only be called once this \ref FileListBuilder
|
||||
* has been finalized. Reports a NOT_READY error if
|
||||
* has been finalized. Reports a NOT_READY error if
|
||||
* the builder has not been finalized.
|
||||
*
|
||||
* \param ppFileListOut
|
||||
* Returns a pointer to an \ref IFileList that represents
|
||||
* this file list.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* Returns S_OK on success, failure if an error occurs.
|
||||
*/
|
||||
HRESULT GetFileList(__out IFileList** ppFileListOut) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Determines if a supplied file index is valid.
|
||||
*
|
||||
* Can only be called once this \ref FileListBuilder
|
||||
* has been finalized. Reports a NOT_READY error if
|
||||
* has been finalized. Reports a NOT_READY error if
|
||||
* the builder has not been finalized.
|
||||
*
|
||||
*
|
||||
* \param indexIn
|
||||
* The index to be tested.
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if the builder has been finalized and the
|
||||
* supplied index refers to a valid file in this file
|
||||
* supplied index refers to a valid file in this file
|
||||
* list, false otherwise.
|
||||
*/
|
||||
bool IsValidFileIndex(__inout int indexIn) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Determines if a supplied folder index is valid.
|
||||
*
|
||||
* Can only be called once this \ref FileListBuilder
|
||||
* has been finalized. Reports a NOT_READY error if
|
||||
* has been finalized. Reports a NOT_READY error if
|
||||
* the builder has not been finalized.
|
||||
*
|
||||
*
|
||||
* \param indexIn
|
||||
* The index to be tested.
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if the builder has been finalized and the
|
||||
* supplied index refers to a valid folder in this file
|
||||
* supplied index refers to a valid folder in this file
|
||||
* list, false otherwise.
|
||||
*/
|
||||
bool IsValidFolderIndex(__inout int indexIn) const;
|
||||
|
|
|
@ -318,7 +318,7 @@ public:
|
|||
* add add it to the parent scope. To ensure proper
|
||||
* semantics and consistency, use ScopeInfo::GetOrAddItem
|
||||
* to create new items.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* The name of the item to be added.
|
||||
*
|
||||
|
@ -328,7 +328,7 @@ public:
|
|||
* \param result
|
||||
* Returns a pointer to the new ItemInfo, or NULL if an error
|
||||
* occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
|
||||
|
@ -360,10 +360,10 @@ public:
|
|||
* add add it to the parent scope. To ensure proper
|
||||
* semantics and consistency, use ScopeInfo::GetOrAddScope
|
||||
* to create new child scopes.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* The name of the scope to be added.
|
||||
*
|
||||
*
|
||||
* \param pParent
|
||||
* Parent scope that will contain the new scope
|
||||
*
|
||||
|
@ -373,7 +373,7 @@ public:
|
|||
* \param result
|
||||
* Returns a pointer to the new ScopeInfo, or NULL if an error
|
||||
* occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
static HRESULT CreateInstance(_In_ const HierarchicalNameSegment* pName, _In_ ScopeInfo* pParent, _Outptr_ ScopeInfo** result);
|
||||
|
@ -386,11 +386,11 @@ public:
|
|||
|
||||
HRESULT AddToGlobal(_In_ ScopeInfo* parent);
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the number of immediate children
|
||||
* Does not include further descendents of child scopes
|
||||
* of the referenced scope.
|
||||
*
|
||||
*
|
||||
* \return int
|
||||
* Returns the number of children
|
||||
*/
|
||||
|
@ -399,13 +399,13 @@ public:
|
|||
int GetNumChildScopes() const { return m_numChildScopes; }
|
||||
int GetNumChildItems() const { return m_numChildItems; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the total number of referenced scopes at or below the supplied scope.
|
||||
* Includes the scope itself, plus all descendents.
|
||||
*
|
||||
*
|
||||
* \return int
|
||||
* Returns the total number of referenced scopes at or below the
|
||||
* supplied scope.
|
||||
* supplied scope.
|
||||
*/
|
||||
int GetTotalNumScopes() const { return m_totalNumScopes; }
|
||||
|
||||
|
@ -414,7 +414,7 @@ public:
|
|||
*
|
||||
* Includes referenced items in the scope itself, plus any referenced items
|
||||
* contained in subscopes of any depth.
|
||||
*
|
||||
*
|
||||
* \return int
|
||||
* Returns the total number of referenced items at or below the
|
||||
* supplied scope.
|
||||
|
@ -433,7 +433,7 @@ public:
|
|||
* Reports an error if no matching child is found.
|
||||
* \param pName
|
||||
* The name of the immediate child to be returned.
|
||||
*
|
||||
*
|
||||
* \return HNamesNode*
|
||||
* Returns a pointer to an HNamesNode describing
|
||||
* the requested child, or NULL if an error occurs.
|
||||
|
@ -443,13 +443,13 @@ public:
|
|||
bool TryGetChild(_In_ const HierarchicalNameSegment* pName, _Outptr_opt_result_maybenull_ HNamesNode** ppChildOut) const;
|
||||
|
||||
/*!
|
||||
* Gets an descendent node by name, parsing path
|
||||
* Gets an descendent node by name, parsing path
|
||||
* separators as appropriate.
|
||||
*
|
||||
* Reports an error if no matching descendent is found.
|
||||
* \param pName
|
||||
* The name of the descendent to be returned.
|
||||
*
|
||||
*
|
||||
* \return HNamesNode*
|
||||
* Returns a pointer to an HNamesNode describing
|
||||
* the requested descendent, or NULL if an error occurs.
|
||||
|
@ -463,14 +463,14 @@ public:
|
|||
* If a child scope with a matching name already exists, returns
|
||||
* the existing scope. If no matching child scope exists,
|
||||
* adds a new scope and returns a pointer to it.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* Name of the new child scope.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to a ScopeInfo describing the
|
||||
* requested child scope.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetOrAddScope(_In_ PCWSTR pName, _Out_ ScopeInfo** result);
|
||||
|
@ -482,14 +482,14 @@ public:
|
|||
* If a item with a matching name already exists, returns a
|
||||
* pointer to the existing ItemInfo. If no matching item exists,
|
||||
* adds a new ItemInfo and returns a pointer to it.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* Name of the new item.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to a ItemInfo describing the
|
||||
* requested item.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetOrAddItem(_In_ PCWSTR pName, _Out_ ItemInfo** result);
|
||||
|
@ -517,21 +517,21 @@ protected:
|
|||
|
||||
/*!
|
||||
* _INTERNAL ONLY_
|
||||
* Gets or adds a specific named scope to a ScopeInfo.
|
||||
* Does _not_ look for separators or validate the
|
||||
* Gets or adds a specific named scope to a ScopeInfo.
|
||||
* Does _not_ look for separators or validate the
|
||||
* requested path.
|
||||
*
|
||||
* If a child scope with a matching name already exists, returns
|
||||
* the existing scope. If no matching child scope exists,
|
||||
* adds a new scope and returns a pointer to it.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* Name of the new child scope.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to a ScopeInfo describing the
|
||||
* requested child scope.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetOrAddChildScope(_In_ const HierarchicalNameSegment* pName, _Out_ ScopeInfo** result);
|
||||
|
@ -542,16 +542,16 @@ protected:
|
|||
* If a item with a matching name already exists, returns a
|
||||
* pointer to the existing ItemInfo. If no matching item exists,
|
||||
* adds a new ItemInfo and returns a pointer to it.
|
||||
*
|
||||
*
|
||||
* Does _not_ look for separators or validate the requested path.
|
||||
*
|
||||
*
|
||||
* \param pName
|
||||
* Name of the new item.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to a ItemInfo describing the
|
||||
* requested item.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetOrAddChildItem(_In_ const HierarchicalNameSegment* pName, _Out_ ItemInfo** result);
|
||||
|
@ -607,14 +607,14 @@ public:
|
|||
/*!
|
||||
* Gets a root scope specified by name.
|
||||
* Reports an error if no matching scope is found.
|
||||
*
|
||||
*
|
||||
* \param pPath
|
||||
* Name of the root scope to be returned.
|
||||
*
|
||||
* \param result
|
||||
* A ScopeInfo describing the requested root
|
||||
* A ScopeInfo describing the requested root
|
||||
* folder, or NULL if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetRootScope(_In_ PCWSTR pPath, _Out_ ScopeInfo** result) const;
|
||||
|
@ -623,15 +623,15 @@ public:
|
|||
* Tries to get a root scope specified by name.
|
||||
* Returns false but does not report an error if no
|
||||
* matching scope is found.
|
||||
*
|
||||
*
|
||||
* \param pPath
|
||||
* Name of the root scope to be returned.
|
||||
*
|
||||
*
|
||||
* \param ppScopeOut
|
||||
* Returns a pointer to a ScopeInfo describing the
|
||||
* requested root scope, or NULL if no match is found
|
||||
* or if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a matching scope is found, false
|
||||
* if no match is found or if an error occurs.
|
||||
|
@ -645,14 +645,14 @@ public:
|
|||
* returns a pointer to the existing ScopeInfo.
|
||||
* If no matching scope exists, adds a new ScopeInfo
|
||||
* and returns a pointer to it.
|
||||
*
|
||||
*
|
||||
* \param pPath
|
||||
* Name of the new root scope.
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to an ItemInfo describing the
|
||||
* requested file.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetOrAddRootScope(_In_ PCWSTR pPath, _Out_ ScopeInfo** result);
|
||||
|
@ -661,12 +661,12 @@ public:
|
|||
|
||||
HRESULT GetOrAddItem(_In_ PCWSTR pPath, _Out_ ItemInfo** result);
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets a scope by index.
|
||||
*
|
||||
*
|
||||
* \param index
|
||||
* The index of the scope to be returned.
|
||||
*
|
||||
*
|
||||
* \param ppScopeOut
|
||||
* Returns the requested \ref ScopeInfo, or NULL if an
|
||||
* error occurs.
|
||||
|
@ -677,12 +677,12 @@ public:
|
|||
*/
|
||||
bool TryGetScopeByIndex(_In_ int index, _Outptr_result_maybenull_ ScopeInfo** ppScopeOut) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets an item by index.
|
||||
*
|
||||
*
|
||||
* \param index
|
||||
* The index of the item to be returned.
|
||||
*
|
||||
*
|
||||
* \param ppItemOut
|
||||
* Returns the requested \ref ItemInfo, or NULL if an
|
||||
* error occurs.
|
||||
|
@ -693,7 +693,7 @@ public:
|
|||
*/
|
||||
bool TryGetItemByIndex(_In_ int index, _Outptr_result_maybenull_ ItemInfo** ppItemOut) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Determines if a supplied item index is valid.
|
||||
*
|
||||
* \param indexIn
|
||||
|
@ -705,7 +705,7 @@ public:
|
|||
*/
|
||||
bool IsValidItemIndex(__in int indexIn) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Determines if a supplied scope index is valid.
|
||||
*
|
||||
* \param indexIn
|
||||
|
@ -749,10 +749,10 @@ private:
|
|||
IAtomPool* m_pScopeNames;
|
||||
IAtomPool* m_pItemNames;
|
||||
|
||||
int m_numFinalizedNames;
|
||||
int m_cchFinalizedAsciiNames;
|
||||
int m_cchFinalizedUtf16Names;
|
||||
int m_cchLongestFinalizedName;
|
||||
int m_numFinalizedNames{ 0 };
|
||||
int m_cchFinalizedAsciiNames{ 0 };
|
||||
int m_cchFinalizedUtf16Names{ 0 };
|
||||
int m_cchLongestFinalizedName{ 0 };
|
||||
|
||||
protected:
|
||||
HierarchicalNamesBuilder(_In_ UINT32 flags);
|
||||
|
@ -764,21 +764,21 @@ protected:
|
|||
* A string pool containing all of the strings from a specified scope
|
||||
* and all of its contents might need fewer characters than reported
|
||||
* by this function, but it will not require more.
|
||||
*
|
||||
*
|
||||
* \param pScopeInfo
|
||||
* The scope to be checked.
|
||||
*
|
||||
* \param pCchAsciiStringsOut
|
||||
* The unpadded size in char required to hold any ascii strings in the this
|
||||
* scope and below.
|
||||
*
|
||||
*
|
||||
* \param pCchUtf16StringsOut
|
||||
* The unpadded size in WCHAR required to hold any UTF-16 strings in this
|
||||
* The unpadded size in WCHAR required to hold any UTF-16 strings in this
|
||||
* scope and below.
|
||||
*
|
||||
* \param pCchLongestPathOut
|
||||
* The length of the longest path below this scope, in characters.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* S_OK on success, failure if an error occurs.
|
||||
*/
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
BaseFile::SectionIndex GetSectionIndex() const { return m_sectionIndex; }
|
||||
|
||||
private:
|
||||
MRMFILE_ENVIRONMENT_MAPPING_HEADER m_header;
|
||||
MRMFILE_ENVIRONMENT_MAPPING_HEADER m_header{};
|
||||
|
||||
_Field_size_(m_header.numNewQualifiers) PCWSTR* m_names;
|
||||
|
||||
|
@ -81,7 +81,7 @@ private:
|
|||
UINT32 m_finalizedSizeInBytes;
|
||||
BaseFile::SectionIndex m_sectionIndex;
|
||||
|
||||
EnvironmentMappingSectionBuilder() : m_names(nullptr), m_namesPool(nullptr), m_finalizedSizeInBytes(0) {}
|
||||
EnvironmentMappingSectionBuilder() : m_names(nullptr), m_namesPool(nullptr), m_finalizedSizeInBytes(0), m_sectionIndex(0) {}
|
||||
|
||||
HRESULT Init(_In_ const IEnvironment* pSourceEnvironment, _In_ const IEnvironment* pTargetEnvironment);
|
||||
};
|
||||
|
@ -239,37 +239,37 @@ private:
|
|||
|
||||
HRESULT ReadSchemaDescription(_In_ const IHierarchicalSchemaDescription* pDescription);
|
||||
|
||||
bool m_finalized;
|
||||
int m_numFinalizedScopes;
|
||||
int m_numFinalizedItems;
|
||||
int m_cchUniqueId;
|
||||
int m_cchSimpleId;
|
||||
int m_cbNamesBlob;
|
||||
bool m_finalized{ false };
|
||||
int m_numFinalizedScopes{ 0 };
|
||||
int m_numFinalizedItems{ 0 };
|
||||
int m_cchUniqueId{ 0 };
|
||||
int m_cchSimpleId{ 0 };
|
||||
int m_cbNamesBlob{ 0 };
|
||||
|
||||
BaseFile::SectionIndex m_sectionIndex;
|
||||
BaseFile::SectionIndex m_sectionIndex{ 0 };
|
||||
|
||||
mutable HierarchicalSchemaVersionInfoBuilder* m_pVersionInfo;
|
||||
mutable HierarchicalSchemaVersionInfoBuilder* m_pVersionInfo{ nullptr };
|
||||
|
||||
PriSectionBuilder* m_pPriBuilder;
|
||||
PriSectionBuilder* m_pPriBuilder{ nullptr };
|
||||
|
||||
int m_numPreviousScopes;
|
||||
int m_numPreviousItems;
|
||||
int m_numPreviousMinorVersion;
|
||||
int m_numPreviousScopes{ 0 };
|
||||
int m_numPreviousItems{ 0 };
|
||||
int m_numPreviousMinorVersion{ 0 };
|
||||
|
||||
PWSTR m_pSimpleId;
|
||||
PWSTR m_pUniqueId;
|
||||
PWSTR m_pSimpleId{ nullptr };
|
||||
PWSTR m_pUniqueId{ nullptr };
|
||||
|
||||
PriBuildType m_priBuildType;
|
||||
bool m_bIsVersionUpdated;
|
||||
UINT16 m_majorVersion;
|
||||
UINT16 m_minorVersion;
|
||||
PriBuildType m_priBuildType{ PriBuildFromScratch };
|
||||
bool m_bIsVersionUpdated{ false };
|
||||
UINT16 m_majorVersion{ 0 };
|
||||
UINT16 m_minorVersion{ 0 };
|
||||
|
||||
HierarchicalNamesBuilder* m_pNames;
|
||||
const IAtomPool* m_pScopeNames;
|
||||
const IAtomPool* m_pItemNames;
|
||||
const IHierarchicalSchema* m_pPreviousSchema;
|
||||
HierarchicalNamesBuilder* m_pNames{ nullptr };
|
||||
const IAtomPool* m_pScopeNames{ nullptr };
|
||||
const IAtomPool* m_pItemNames{ nullptr };
|
||||
const IHierarchicalSchema* m_pPreviousSchema{ nullptr };
|
||||
|
||||
UINT32 m_buildFlags;
|
||||
UINT32 m_buildFlags{ 0 };
|
||||
|
||||
HierarchicalSchemaSectionBuilder();
|
||||
|
||||
|
@ -308,8 +308,8 @@ private:
|
|||
|
||||
UINT32 GetUniqueIdLength() const;
|
||||
|
||||
IHierarchicalSchema* m_schemaToReference;
|
||||
BaseFile::SectionIndex m_sectionIndex;
|
||||
IHierarchicalSchema* m_schemaToReference = nullptr;
|
||||
BaseFile::SectionIndex m_sectionIndex = 0;
|
||||
};
|
||||
|
||||
class ResourceMapSectionBuilder;
|
||||
|
@ -359,22 +359,22 @@ private:
|
|||
_In_ DynamicArray<ResourceMapSectionBuilder*>* pResourceMapBuilders,
|
||||
_In_ ScopeInfo* pScopeInfo);
|
||||
|
||||
bool m_mapGenerated;
|
||||
bool m_finalized;
|
||||
bool m_mapGenerated{ false };
|
||||
bool m_finalized{ false };
|
||||
|
||||
int m_numFileCandidates;
|
||||
int m_numFinalizedItems;
|
||||
UINT32 m_cbNamesBlob;
|
||||
int m_numFileCandidates{ 0 };
|
||||
int m_numFinalizedItems{ 0 };
|
||||
UINT32 m_cbNamesBlob{ 0 };
|
||||
|
||||
BaseFile::SectionIndex m_sectionIndex;
|
||||
BaseFile::SectionIndex m_sectionIndex{ 0 };
|
||||
|
||||
PriSectionBuilder* m_pPriSectionBuilder;
|
||||
HierarchicalSchemaSectionBuilder* m_pSchema;
|
||||
const UnifiedEnvironment* m_pEnvironment;
|
||||
HierarchicalNamesBuilder* m_pNames;
|
||||
DynamicArray<MRMFILE_REVERSEFILEMAP_ENTRY>* m_pEntries;
|
||||
PriSectionBuilder* m_pPriSectionBuilder{ nullptr };
|
||||
HierarchicalSchemaSectionBuilder* m_pSchema{ nullptr };
|
||||
const UnifiedEnvironment* m_pEnvironment{ nullptr };
|
||||
HierarchicalNamesBuilder* m_pNames{ nullptr };
|
||||
DynamicArray<MRMFILE_REVERSEFILEMAP_ENTRY>* m_pEntries{ nullptr };
|
||||
|
||||
UINT32 m_buildFlags;
|
||||
UINT32 m_buildFlags{ 0 };
|
||||
|
||||
ReverseFileMapSectionBuilder(_In_ PriSectionBuilder* pPriBuilder, _In_ const UnifiedEnvironment* pEnvironment);
|
||||
|
||||
|
@ -481,7 +481,7 @@ private:
|
|||
static bool IsResolved(_In_ const ItemRef* item) { return (item->linksToResourceIndex >= 0); }
|
||||
|
||||
bool m_finalized;
|
||||
BaseFile::SectionIndex m_sectionIndex;
|
||||
BaseFile::SectionIndex m_sectionIndex = 0;
|
||||
|
||||
HierarchicalSchemaSectionBuilder* m_schema;
|
||||
DefList<SchemaRef> m_schemas;
|
||||
|
@ -536,8 +536,8 @@ public:
|
|||
int GetItemIndex() const;
|
||||
|
||||
private:
|
||||
BUILDER_CANDIDATE m_builderCandidate;
|
||||
DecisionInfoSectionBuilder* m_pDecisionInfo;
|
||||
BUILDER_CANDIDATE m_builderCandidate = {};
|
||||
DecisionInfoSectionBuilder* m_pDecisionInfo{ nullptr };
|
||||
Atom m_instanceValueType;
|
||||
};
|
||||
|
||||
|
@ -679,43 +679,43 @@ protected:
|
|||
|
||||
HRESULT GetOrAddResourceValueTypeIndex(_In_ MrmEnvironment::ResourceValueType valueType, _Out_ int* pIndexOut);
|
||||
|
||||
BaseFile::SectionIndex m_sectionIndex;
|
||||
bool m_finalized;
|
||||
BaseFile::SectionIndex m_sectionIndex{ 0 };
|
||||
bool m_finalized{ false };
|
||||
|
||||
PriSectionBuilder* m_pPriBuilder;
|
||||
HierarchicalSchemaSectionBuilder* m_pSchema;
|
||||
HierarchicalSchemaReferenceSectionBuilder* m_schemaReferenceBuilder;
|
||||
PriSectionBuilder* m_pPriBuilder{ nullptr };
|
||||
HierarchicalSchemaSectionBuilder* m_pSchema{ nullptr };
|
||||
HierarchicalSchemaReferenceSectionBuilder* m_schemaReferenceBuilder{ nullptr };
|
||||
|
||||
DecisionInfoSectionBuilder* m_pDecisionInfo;
|
||||
const UnifiedEnvironment* m_pEnvironment;
|
||||
DecisionInfoSectionBuilder* m_pDecisionInfo{ nullptr };
|
||||
const UnifiedEnvironment* m_pEnvironment{ nullptr };
|
||||
|
||||
ResourceLinkSectionBuilder* m_links;
|
||||
ResourceLinkSectionBuilder* m_links{ nullptr };
|
||||
|
||||
DynamicArray<Atom>* m_pValueTypes;
|
||||
DataBlobBuilder* m_pDataBuilder;
|
||||
DynamicArray<Atom>* m_pValueTypes{ nullptr };
|
||||
DataBlobBuilder* m_pDataBuilder{ nullptr };
|
||||
|
||||
MapBuilderItemData* m_pItems;
|
||||
MapBuilderItemData* m_pItems{ nullptr };
|
||||
|
||||
DynamicArray<BuilderDirEntry>* m_pFinalizedDir;
|
||||
int m_cbFinalizedSchemaRef;
|
||||
DynamicArray<BuilderDirEntry>* m_pFinalizedDir{ nullptr };
|
||||
int m_cbFinalizedSchemaRef{ 0 };
|
||||
|
||||
int m_cbFinalizedEnvironmentRefs;
|
||||
int m_cbFinalizedEnvironmentRefs{ 0 };
|
||||
|
||||
int m_numFinalizedTotalRanges;
|
||||
int m_numFinalizedTotalItems;
|
||||
int m_numFinalizedValues;
|
||||
bool m_hasLargeValues;
|
||||
int m_numFinalizedTotalRanges{ 0 };
|
||||
int m_numFinalizedTotalItems{ 0 };
|
||||
int m_numFinalizedValues{ 0 };
|
||||
bool m_hasLargeValues{ false };
|
||||
|
||||
int m_numFinalizedStandardDirEntries;
|
||||
int m_numFinalizedStandardRanges;
|
||||
int m_numFinalizedStandardItems;
|
||||
int m_numFinalizedStandardDirEntries{ 0 };
|
||||
int m_numFinalizedStandardRanges{ 0 };
|
||||
int m_numFinalizedStandardItems{ 0 };
|
||||
|
||||
int m_numFinalizedLargeDirEntries;
|
||||
int m_numFinalizedLargeRanges;
|
||||
int m_numFinalizedLargeItems;
|
||||
int m_numFinalizedLargeDirEntries{ 0 };
|
||||
int m_numFinalizedLargeRanges{ 0 };
|
||||
int m_numFinalizedLargeItems{ 0 };
|
||||
|
||||
UINT32 m_cbFinalizedLargeData;
|
||||
PriBuildType m_priBuildType;
|
||||
UINT32 m_cbFinalizedLargeData{ 0 };
|
||||
PriBuildType m_priBuildType{ PriBuildFromScratch };
|
||||
};
|
||||
|
||||
class IBuildInstanceReference : public DefObject
|
||||
|
@ -791,8 +791,8 @@ public:
|
|||
private:
|
||||
FileSectionBuildInstanceReference(_In_ FileListBuilder* pBuilder, _In_ FileInfo* pFileInfo);
|
||||
|
||||
FileListBuilder* m_pFileListBuilder;
|
||||
FileInfo* m_pFileInfo;
|
||||
FileListBuilder* m_pFileListBuilder{ nullptr };
|
||||
FileInfo* m_pFileInfo{ nullptr };
|
||||
};
|
||||
|
||||
class ExternalFileStaticDataInstanceReference : public IBuildInstanceReference
|
||||
|
@ -821,7 +821,7 @@ private:
|
|||
|
||||
HRESULT Init();
|
||||
|
||||
MRMFILE_INDEX_INSTANCE m_mrmIndexInstance;
|
||||
MRMFILE_INDEX_INSTANCE m_mrmIndexInstance{};
|
||||
const FileInfo* m_pFileInfo;
|
||||
ResourceCandidateResult m_resourceCandidateResult;
|
||||
};
|
||||
|
@ -972,8 +972,8 @@ protected:
|
|||
|
||||
HRESULT InitDefaultContents();
|
||||
|
||||
DecisionInfoBuilderData* m_pData;
|
||||
UINT32 m_flags;
|
||||
DecisionInfoBuilderData* m_pData{ nullptr };
|
||||
UINT32 m_flags{ 0 };
|
||||
};
|
||||
|
||||
class DecisionInfoSectionBuilder : public ISectionBuilder, public DecisionInfoBuilder
|
||||
|
@ -1006,8 +1006,8 @@ private:
|
|||
|
||||
HRESULT Init(_In_ FileBuilder* pFileBuilder, _In_ const UnifiedEnvironment* pEnvironment);
|
||||
|
||||
FileBuilder* m_pFileBuilder;
|
||||
BaseFile::SectionIndex m_sectionIndex;
|
||||
FileBuilder* m_pFileBuilder{ nullptr };
|
||||
BaseFile::SectionIndex m_sectionIndex{ 0 };
|
||||
bool m_finalized;
|
||||
};
|
||||
|
||||
|
@ -1178,7 +1178,7 @@ private:
|
|||
|
||||
DEF_CHECKSUM m_valueHash;
|
||||
BlobResult m_actualDataBlob;
|
||||
DynamicArray<UINT>* m_metadata;
|
||||
DynamicArray<UINT>* m_metadata{ nullptr };
|
||||
};
|
||||
|
||||
class OrchestratorHashNode : public DefObject
|
||||
|
@ -1229,10 +1229,10 @@ private:
|
|||
|
||||
HRESULT Init(int initCapacity);
|
||||
|
||||
int m_nodeCount;
|
||||
int m_currentSize;
|
||||
float m_loadFactor;
|
||||
DynamicArray<OrchestratorHashNode*>* m_entries;
|
||||
int m_nodeCount{ 0 };
|
||||
int m_currentSize{ 0 };
|
||||
float m_loadFactor{ 0.0 };
|
||||
DynamicArray<OrchestratorHashNode*>* m_entries{ nullptr };
|
||||
};
|
||||
|
||||
class DataItemOrchestrator : public DefObject
|
||||
|
@ -1524,38 +1524,38 @@ private:
|
|||
HRESULT GetMapBuilderForAddCandidate(_In_opt_ PCWSTR schemaName, _Out_ ResourceMapSectionBuilder** result);
|
||||
|
||||
private:
|
||||
FileBuilder* m_pFileBuilder;
|
||||
AtomPoolGroup* m_pAtoms;
|
||||
FileBuilder* m_pFileBuilder{ nullptr };
|
||||
AtomPoolGroup* m_pAtoms{ nullptr };
|
||||
|
||||
UnifiedEnvironment* m_pUnifiedEnvironment;
|
||||
DecisionInfoSectionBuilder* m_pDecisionInfo;
|
||||
DynamicArray<HierarchicalSchemaSectionBuilder*>* m_pSchemas;
|
||||
DynamicArray<ResourceMapSectionBuilder*>* m_pMaps;
|
||||
UnifiedEnvironment* m_pUnifiedEnvironment{ nullptr };
|
||||
DecisionInfoSectionBuilder* m_pDecisionInfo{ nullptr };
|
||||
DynamicArray<HierarchicalSchemaSectionBuilder*>* m_pSchemas{ nullptr };
|
||||
DynamicArray<ResourceMapSectionBuilder*>* m_pMaps{ nullptr };
|
||||
|
||||
EnvironmentMappingSectionBuilder* m_environmentMapping;
|
||||
IEnvironment* m_environmentBaseline;
|
||||
EnvironmentMappingSectionBuilder* m_environmentMapping{ nullptr };
|
||||
IEnvironment* m_environmentBaseline{ nullptr };
|
||||
|
||||
PWSTR m_pPrimarySchemaName;
|
||||
HierarchicalSchemaSectionBuilder* m_pPrimarySchema;
|
||||
ResourceMapSectionBuilder* m_pPrimaryMap;
|
||||
PWSTR m_pPrimarySchemaName{ nullptr };
|
||||
HierarchicalSchemaSectionBuilder* m_pPrimarySchema{ nullptr };
|
||||
ResourceMapSectionBuilder* m_pPrimaryMap{ nullptr };
|
||||
|
||||
PWSTR m_pAlternateSchemaName;
|
||||
HierarchicalSchemaSectionBuilder* m_pAlternateSchema;
|
||||
ResourceMapSectionBuilder* m_pAlternateMap;
|
||||
PWSTR m_pAlternateSchemaName{ nullptr };
|
||||
HierarchicalSchemaSectionBuilder* m_pAlternateSchema{ nullptr };
|
||||
ResourceMapSectionBuilder* m_pAlternateMap{ nullptr };
|
||||
|
||||
BaseFile::SectionIndex m_sectionIndex;
|
||||
PriBuilderPhase m_priBuilderPhase;
|
||||
PriBuildType m_priBuildType;
|
||||
BaseFile::SectionIndex m_sectionIndex{ 0 };
|
||||
PriBuilderPhase m_priBuilderPhase{ PriUninitialized };
|
||||
PriBuildType m_priBuildType{ PriBuildFromScratch };
|
||||
|
||||
bool m_bAllocFileBuilder;
|
||||
UINT32 m_nFlags;
|
||||
bool m_bAllocFileBuilder{ false };
|
||||
UINT32 m_nFlags{ 0 };
|
||||
|
||||
DataItemOrchestrator* m_dataItems;
|
||||
FileListBuilder* m_pFileListBuilder;
|
||||
DataItemOrchestrator* m_dataItems{ nullptr };
|
||||
FileListBuilder* m_pFileListBuilder{ nullptr };
|
||||
|
||||
DynamicArray<ResourceLinkSectionBuilder*>* m_linkBuilders;
|
||||
DynamicArray<ResourceLinkSectionBuilder*>* m_linkBuilders{ nullptr };
|
||||
|
||||
MrmBuildConfiguration* m_pBuilderConfiguration; // do not delete this here
|
||||
MrmBuildConfiguration* m_pBuilderConfiguration{ nullptr }; // do not delete this here
|
||||
};
|
||||
|
||||
class PriFileBuilder : public FileBuilder
|
||||
|
@ -1767,10 +1767,10 @@ protected:
|
|||
_In_ PCWSTR pszFilePathNotToDelete);
|
||||
|
||||
private:
|
||||
PriFileBuilder* m_pPriFileBuilder;
|
||||
PriMapMerger* m_pPriMapMerger;
|
||||
PriBuilderPhase m_priBuilderPhase;
|
||||
CoreProfile* m_pProfile;
|
||||
PriFileBuilder* m_pPriFileBuilder{ nullptr };
|
||||
PriMapMerger* m_pPriMapMerger{ nullptr };
|
||||
PriBuilderPhase m_priBuilderPhase{ PriUninitialized };
|
||||
CoreProfile* m_pProfile{ nullptr };
|
||||
static const int CLEANUP_MIN_DAYS;
|
||||
static const int CLEANUP_MAX_FILES;
|
||||
};
|
||||
|
|
|
@ -87,7 +87,7 @@ private:
|
|||
bool bFinalized;
|
||||
CoreProfile* m_pProfile;
|
||||
mutable const IHierarchicalSchema* m_pFirstEntrySchema;
|
||||
FileListBuilder* m_pFileListBuilder;
|
||||
FileListBuilder* m_pFileListBuilder{ nullptr };
|
||||
DynamicArray<PriFile*>* m_pPriFileList;
|
||||
};
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class DataBlobBuilder : public DefObject
|
|||
{
|
||||
protected:
|
||||
MEM_LINKED_DATABLOB* m_pHeadDataList;
|
||||
mutable MEM_LINKED_DATABLOB* m_pCurDataList;
|
||||
mutable MEM_LINKED_DATABLOB* m_pCurDataList{ nullptr };
|
||||
UINT32 m_offset;
|
||||
static const UINT32 maxListBufferSize = 1024 * 1024; // 1M
|
||||
|
||||
|
@ -75,7 +75,7 @@ public:
|
|||
virtual HRESULT AddDataAsReference(__in_bcount(cbData) const BYTE* pData, __in UINT32 cbData, __out UINT32* pWrittenOffset);
|
||||
|
||||
/*!
|
||||
* Iterates through the data list entries and returns true if the given pData with size cbData
|
||||
* Iterates through the data list entries and returns true if the given pData with size cbData
|
||||
* is present at offset dataBlobBuilderOffset.
|
||||
* Returns false otherwise.
|
||||
*/
|
||||
|
@ -241,7 +241,7 @@ public:
|
|||
*/
|
||||
HRESULT AddDataString(__in PCWSTR pString, __out PrebuildItemReference* pRefOut);
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Copies the specified string to the data segment (including
|
||||
* null-terminator), to a supplied maximum length. Fails
|
||||
* if the string exceeds the supplied length.
|
||||
|
@ -253,18 +253,18 @@ public:
|
|||
*/
|
||||
HRESULT AddDataString(__in_ecount(cchString) PCWSTR pString, __in int cchString, __out PrebuildItemReference* pRefOut);
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Turns a PrebuildItemReference into a BuiltItemReference
|
||||
* that can be used to construct an instance locator.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
HRESULT GetBuiltItemInfo(__in const PrebuildItemReference* pPrebuildReference, __out BuiltItemReference* pRefOut) const;
|
||||
|
||||
/*!
|
||||
* Return string by its item index. It ignore large index or not since the item index
|
||||
/*!
|
||||
* Return string by its item index. It ignore large index or not since the item index
|
||||
* indicate whether it is large or not.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Microsoft::Resources::Build
|
|||
* @{
|
||||
*/
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* The SectionCopier is an \see ISectionBuilder that copies data from
|
||||
* an existing file into a new section, possibly remapping section and
|
||||
* atom pools in the process.
|
||||
|
@ -25,9 +25,9 @@ namespace Microsoft::Resources::Build
|
|||
class SectionCopier : public ISectionBuilder
|
||||
{
|
||||
protected:
|
||||
const IFileSection* m_pFileSection;
|
||||
RemapInfo* m_pRemap;
|
||||
BaseFile::SectionIndex m_sectionIndex;
|
||||
const IFileSection* m_pFileSection{ nullptr };
|
||||
RemapInfo* m_pRemap{ nullptr };
|
||||
BaseFile::SectionIndex m_sectionIndex{ DEFFILE_SECTION_INDEX_NONE };
|
||||
|
||||
SectionCopier();
|
||||
|
||||
|
@ -39,9 +39,9 @@ public:
|
|||
* @{
|
||||
*/
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Constructs a new section copier for an existing file section.
|
||||
*
|
||||
*
|
||||
* \param pFileSection
|
||||
* The \ref IFileSection "file section" to be copied.
|
||||
*
|
||||
|
@ -50,7 +50,7 @@ public:
|
|||
*
|
||||
* \param result
|
||||
* Returns the new SectionCopier, or NULL if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
static HRESULT CreateInstance(_In_ const IFileSection* const pFileSection, _In_ RemapInfo* pRemap, _Outptr_ SectionCopier** result);
|
||||
|
@ -95,11 +95,11 @@ public:
|
|||
|
||||
/*!@}*/
|
||||
protected:
|
||||
/*!
|
||||
/*!
|
||||
* Applies any appropriate mappings to the section data. The
|
||||
* base implemenation does no remapping, but derived classes
|
||||
* base implemenation does no remapping, but derived classes
|
||||
* can override this method to provide type-specific remapping
|
||||
* behavior.
|
||||
* behavior.
|
||||
*
|
||||
* \param pHeader
|
||||
* Pointer to the destination section header. Derived classes are
|
||||
|
@ -112,7 +112,7 @@ protected:
|
|||
*
|
||||
* \param cbSectionData
|
||||
* Size of the destination section data, in bytes.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* Returns S_OK on success, failure if an error occurs.
|
||||
*/
|
||||
|
@ -123,7 +123,7 @@ protected:
|
|||
/*!@}*/
|
||||
/*!@}*/
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \addtogroup DefBuild
|
||||
* @{
|
||||
* \addtogroup DefBuild_SectionCopiers
|
||||
|
@ -146,7 +146,7 @@ public:
|
|||
_Outptr_ SectionCopier** result);
|
||||
};
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \addtogroup DefBuild
|
||||
* @{
|
||||
* \addtogroup DefBuild_SectionCopiers
|
||||
|
@ -157,7 +157,7 @@ public:
|
|||
class FileAtomPoolCopier : public SectionCopier
|
||||
{
|
||||
protected:
|
||||
Atom::PoolIndex m_originalIndex;
|
||||
Atom::PoolIndex m_originalIndex{ DEF_ATOM_NULL_POOL_INDEX };
|
||||
|
||||
FileAtomPoolCopier() {}
|
||||
|
||||
|
@ -179,7 +179,7 @@ public:
|
|||
virtual ~FileAtomPoolCopier() {}
|
||||
|
||||
protected:
|
||||
/*!
|
||||
/*!
|
||||
* Applies pool mappings to the file atom pool. Remaps the atom pool's
|
||||
* own index and the corresponding qualifier.
|
||||
*
|
||||
|
@ -194,7 +194,7 @@ protected:
|
|||
*
|
||||
* \param cbSectionData
|
||||
* Size of the destination section data, in bytes.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* Returns S_OK on success, failure if an error occurs.
|
||||
*/
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
};
|
||||
|
||||
/*!
|
||||
* A simple string pool for sharing like strings at build time.
|
||||
* A simple string pool for sharing like strings at build time.
|
||||
* TSW = Writable string type (e.g. PWSTR)
|
||||
* TSC = Constant string type (e.g. PCWSTR)
|
||||
* TCH = Character type (e.g. WCHAR)
|
||||
|
@ -51,12 +51,12 @@ template<typename TSW, typename TSC, typename TCH>
|
|||
class TWriteableStringPool : public DefObject
|
||||
{
|
||||
private:
|
||||
UINT32 m_flags;
|
||||
DEFCOMPAREOPTIONS m_comparison;
|
||||
UINT32 m_flags{ 0 };
|
||||
DEFCOMPAREOPTIONS m_comparison{ DefCompare_Default };
|
||||
|
||||
UINT32 m_numChars;
|
||||
UINT m_sizeChars;
|
||||
TCH* m_pChars;
|
||||
UINT32 m_numChars{ 0 };
|
||||
UINT m_sizeChars{ 0 };
|
||||
TCH* m_pChars{ nullptr };
|
||||
|
||||
protected:
|
||||
typedef PoolStringOps<TSC, TCH> StringOps;
|
||||
|
@ -64,15 +64,15 @@ protected:
|
|||
protected:
|
||||
TWriteableStringPool() {}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Protected constructor for \ref TWriteableStringPool that initializes
|
||||
* the string pool to use a supplied, static buffer.
|
||||
*
|
||||
*
|
||||
* \param comparison
|
||||
* Specifies the rules used to compare and unify strings.
|
||||
*
|
||||
* \param pBuffer
|
||||
* The buffer into which the string pool will be generated.
|
||||
* The buffer into which the string pool will be generated.
|
||||
*
|
||||
* \param cchPool
|
||||
* The size of the string pool supplied by \ref pBuffer, in characters.
|
||||
|
@ -93,10 +93,10 @@ protected:
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Protected constructor for \ref TWriteableStringPool that allocates
|
||||
* a resizable buffer with a supplied initial size.
|
||||
*
|
||||
*
|
||||
* \param comparison
|
||||
* Specifies the rules used to compare and unify strings.
|
||||
*
|
||||
|
@ -123,13 +123,13 @@ protected:
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Extends the string pool at least enough to accomodate a string
|
||||
* of a specified length.
|
||||
*
|
||||
*
|
||||
* \param cchNeeded
|
||||
* Specifies the amount of space needed, in characters.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* Returns S_OK on success, failure if an error occurs.
|
||||
*/
|
||||
|
@ -181,16 +181,16 @@ public:
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Protected constructor for \ref TWriteableStringPool that allocates
|
||||
* a resizable buffer with a supplied initial size.
|
||||
*
|
||||
*
|
||||
* \param comparison
|
||||
* Specifies the rules used to compare and unify strings.
|
||||
*
|
||||
* \param cchInitial
|
||||
* Specifies the initial size of the buffer, in characters.
|
||||
*
|
||||
*
|
||||
* \param result
|
||||
* Returns a new instance
|
||||
*/
|
||||
|
@ -223,21 +223,21 @@ public:
|
|||
|
||||
/*!@}*/
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the number of characters currently in use in the string pool.
|
||||
* \return UINT32
|
||||
* The number of characters in use in the string pool.
|
||||
*/
|
||||
UINT32 GetNumCharsInPool() const { return m_numChars; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the offset of a specified string in the string pool. If the string
|
||||
* is not already present, adds the string and returns the offset of the
|
||||
* is not already present, adds the string and returns the offset of the
|
||||
* new string.
|
||||
*
|
||||
*
|
||||
* \param pString
|
||||
* The string to be added.
|
||||
*
|
||||
*
|
||||
* \return UINT32
|
||||
* Returns the offset of the string that matches \ref pString
|
||||
* in the string pool, or -1 if an error occurs.
|
||||
|
@ -274,22 +274,22 @@ public:
|
|||
return offset;
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Reports whether the string pool uses case-insensitive comparison.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if the string pool uses case-insensitive comparison,
|
||||
* Returns true if the string pool uses case-insensitive comparison,
|
||||
* false otherwise.
|
||||
*/
|
||||
bool GetIsCaseInsensitive() const { return ((m_comparison & fCompareCaseInsensitive) != 0); }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the offset of a specified string in the string pool, reporting an error
|
||||
* if no matching string is found.
|
||||
*
|
||||
*
|
||||
* \param pString
|
||||
* The string to be retrieved.
|
||||
*
|
||||
*
|
||||
* \return int
|
||||
* Returns the offset of the matching string in the string pool, or
|
||||
* -1 if an error occurs or if no matching string is found.
|
||||
|
@ -305,17 +305,17 @@ public:
|
|||
return offset;
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Tries to get the offset of a specified string in the string pool. Does
|
||||
* not report an error if no matching string is found.
|
||||
*
|
||||
*
|
||||
* \param pString
|
||||
* The string to be retrieved.
|
||||
*
|
||||
* \param pOffsetOut
|
||||
* Returns the offset of a matching string in the string pool, or -1 if
|
||||
* no matching string is found.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a matching string is found, false if an error occurs or
|
||||
* if no matching string is found.
|
||||
|
@ -370,7 +370,7 @@ public:
|
|||
return &m_pChars[offset];
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the string at a specified offset in the string pool.
|
||||
* Reports an error if the offset is out of range.
|
||||
*
|
||||
|
@ -380,7 +380,7 @@ public:
|
|||
* \param pStringOut
|
||||
* A _ref StringResult in which the requested string is
|
||||
* returned.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
* Returns S_OK on success, failure if an error occurs.
|
||||
*/
|
||||
|
@ -396,11 +396,11 @@ public:
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Determines if a supplied string matches a specified
|
||||
* location in the string pool, using the comparison
|
||||
* location in the string pool, using the comparison
|
||||
* rules in effect for this pool.
|
||||
*
|
||||
*
|
||||
* \param offset
|
||||
* The offset in the string buffer to be compared.
|
||||
*
|
||||
|
@ -426,9 +426,9 @@ public:
|
|||
return StringOps::StringsMatch(&m_pChars[offset], pString, m_comparison);
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Returns a read-only pointer to the buffer used by the string pool.
|
||||
*
|
||||
*
|
||||
* \return PCWSTR
|
||||
* The buffer used by the string pool.
|
||||
*/
|
||||
|
@ -440,16 +440,16 @@ class WriteableStringPool : public TWriteableStringPool<PWSTR, PCWSTR, WCHAR>
|
|||
public:
|
||||
static HRESULT CreateInstance(_Outptr_ WriteableStringPool** result) { return CreateInstance(DefaultInitialSize, false, result); }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Creates a resizable \ref WriteableStringPool with the default size and
|
||||
* the specified comparison method.
|
||||
*
|
||||
*
|
||||
* \param comparison
|
||||
* Specifies the comparison method to be used.
|
||||
*
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to the new pool, or NULL if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
static HRESULT CreateInstance(_In_ UINT32 comparison, _Outptr_ WriteableStringPool** result)
|
||||
|
@ -457,19 +457,19 @@ public:
|
|||
return CreateInstance(DefaultInitialSize, comparison, result);
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Creates a resizable \ref WriteableStringPool with the specified size and
|
||||
* the comparison method.
|
||||
*
|
||||
* the comparison method.
|
||||
*
|
||||
* \param cchInitial
|
||||
* Specifies the initial size for the buffer, in characters.
|
||||
*
|
||||
* \param comparison
|
||||
* Specifies the comparison method to be used.
|
||||
*
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to the new pool, or NULL if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
static HRESULT CreateInstance(_In_ UINT32 cchInitial, _In_ UINT32 comparison, _Outptr_ WriteableStringPool** result)
|
||||
|
@ -482,10 +482,10 @@ public:
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Creates a static \ref WriteableStringPool using a supplied static
|
||||
* buffer and the default comparison method.
|
||||
*
|
||||
*
|
||||
* \param pBuffer
|
||||
* The static buffer into which strings will be generated
|
||||
*
|
||||
|
@ -494,7 +494,7 @@ public:
|
|||
*
|
||||
* \param result
|
||||
* Returns a pointer to the new pool, or NULL if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
static HRESULT CreateInstance(_In_reads_(cchBuffer) WCHAR* pBuffer, _In_ UINT32 cchBuffer, _Outptr_ WriteableStringPool** result)
|
||||
|
@ -502,10 +502,10 @@ public:
|
|||
return CreateInstance(pBuffer, cchBuffer, fCompareDefault, result);
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Creates a static \ref WriteableStringPool using a supplied static
|
||||
* buffer and specified comparison method.
|
||||
*
|
||||
*
|
||||
* \param pBuffer
|
||||
* The static buffer into which strings will be generated
|
||||
*
|
||||
|
@ -514,10 +514,10 @@ public:
|
|||
*
|
||||
* \param comparison
|
||||
* Specifies the comparison method to be used.
|
||||
*
|
||||
*
|
||||
* \param result
|
||||
* Returns a pointer to the new pool, or NULL if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return HRESULT
|
||||
*/
|
||||
static HRESULT CreateInstance(
|
||||
|
|
|
@ -10,7 +10,7 @@ extern "C"
|
|||
{
|
||||
#endif
|
||||
|
||||
/*! \defgroup MrmFile_Base MrmFile_Base:
|
||||
/*! \defgroup MrmFile_Base MrmFile_Base:
|
||||
* Create or manipulate base MRM files
|
||||
*/
|
||||
/*@{*/
|
||||
|
@ -228,7 +228,7 @@ extern "C"
|
|||
* Global reference to a hierarchical schema at a specific version. Layout in memory is:
|
||||
* HSCHEMA_REF hdr
|
||||
* WCHAR uniqueId[hdr.cchUniqueId]
|
||||
* A block of multiple schema references consists of an array of MRMFILE_HSCHEMA_REF
|
||||
* A block of multiple schema references consists of an array of MRMFILE_HSCHEMA_REF
|
||||
* followed by an array of WCHAR containing all names.
|
||||
*/
|
||||
typedef struct _MRMFILE_HSCHEMA_REF
|
||||
|
@ -646,8 +646,8 @@ extern "C"
|
|||
* DEFFILE_SECTION_INDEX environments[hdr.numEnvironments]
|
||||
* DEFFILE_SECTION_INDEX schemas[hdr.numSchemas]
|
||||
* DEFFILE_SECTION_INDEX conditionInfos[hdr.numConditionInfos]
|
||||
* DEFFILE_SECTION_INDEX indexes[hdr.numIndexes]
|
||||
* UINT16 defaultResourceIndex
|
||||
* DEFFILE_SECTION_INDEX indexes[hdr.numIndexes]
|
||||
* UINT16 defaultResourceIndex
|
||||
* WCHAR literals[hdr.cchLiterals];
|
||||
* BYTE pad[*]
|
||||
*/
|
||||
|
|
|
@ -19,17 +19,17 @@ public:
|
|||
static const int DescriptionLength = DEFFILE_ATOMPOOL_DESC_LENGTH;
|
||||
|
||||
protected:
|
||||
UINT32 m_flags;
|
||||
Atom::PoolIndex m_poolIndex;
|
||||
AtomPoolGroup* m_pAll;
|
||||
UINT32 m_flags{ 0 };
|
||||
Atom::PoolIndex m_poolIndex{ DEF_ATOM_NULL_POOL_INDEX };
|
||||
AtomPoolGroup* m_pAll{ nullptr };
|
||||
|
||||
UINT32 m_cbTotalSize;
|
||||
UINT32 m_cbTotalSize{ 0 };
|
||||
|
||||
const DEFFILE_ATOMPOOL_HEADER* m_pHeader;
|
||||
const HashIndex* m_pHashes;
|
||||
const UINT32* m_pOffsets;
|
||||
const WCHAR* m_pPool;
|
||||
const WCHAR* m_pPoolGroup;
|
||||
const DEFFILE_ATOMPOOL_HEADER* m_pHeader{ nullptr };
|
||||
const HashIndex* m_pHashes{ nullptr };
|
||||
const UINT32* m_pOffsets{ nullptr };
|
||||
const WCHAR* m_pPool{ nullptr };
|
||||
const WCHAR* m_pPoolGroup{ nullptr };
|
||||
|
||||
static const DEFFILE_SECTION_TYPEID gAtomPoolSectionType;
|
||||
|
||||
|
@ -90,13 +90,13 @@ public:
|
|||
/*!
|
||||
* Retrieves a string from an atom pool by index. Returns NULL
|
||||
* if the index is out of range.
|
||||
*
|
||||
*
|
||||
*/
|
||||
bool TryGetString(Atom::Index index, __inout_opt StringResult* pStringOut) const;
|
||||
|
||||
/*!
|
||||
* Gets an atom that corresponds to a specified string from an atom
|
||||
* pool. Sets pAtomOut to DEF_ATOM_NULL and returns FALSE if no
|
||||
* pool. Sets pAtomOut to DEF_ATOM_NULL and returns FALSE if no
|
||||
* matching string is found.
|
||||
*/
|
||||
bool TryGetAtom(__in PCWSTR pString, __out_opt Atom* pAtomOut) const;
|
||||
|
@ -134,7 +134,7 @@ public:
|
|||
static const DEFFILE_SECTION_TYPEID GetSectionTypeId();
|
||||
|
||||
/*!
|
||||
* Reports the size needed to hold an atom pool with the
|
||||
* Reports the size needed to hold an atom pool with the
|
||||
* specified number of atoms and pool characters.
|
||||
*/
|
||||
static UINT32 GetSizeInBytes(__in UINT32 nAtoms, __in UINT32 cchPool);
|
||||
|
@ -164,7 +164,7 @@ public:
|
|||
static HRESULT CreateAtomPoolGroupFromFile(__in const BaseFile* pFile, _Outptr_ AtomPoolGroup** result);
|
||||
|
||||
/*!
|
||||
* Extracts all atom pools from DEF file into a
|
||||
* Extracts all atom pools from DEF file into a
|
||||
* supplied DEFFILE_ATOMS.
|
||||
*/
|
||||
static HRESULT InitFromFile(__inout AtomPoolGroup* pAtoms, __in const BaseFile* pFile);
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
//! Gets the length in characters of the longest absolute path stored in this file list.
|
||||
virtual int GetLongestPath() const = 0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Determines if a supplied file index is valid.
|
||||
*
|
||||
* \param indexIn
|
||||
|
@ -46,14 +46,14 @@ public:
|
|||
*
|
||||
* \return bool
|
||||
* Returns true if supplied index refers to a valid file
|
||||
* in this file list, false otherwise or if an error
|
||||
* in this file list, false otherwise or if an error
|
||||
* occurs.
|
||||
*/
|
||||
virtual bool IsValidFileIndex(__inout int indexIn) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Determines if a supplied folder index is valid.
|
||||
*
|
||||
*
|
||||
* \param indexIn
|
||||
* The index to be tested.
|
||||
*
|
||||
|
@ -62,7 +62,7 @@ public:
|
|||
*
|
||||
* \return bool
|
||||
* Returns true if supplied index refers to a valid folder
|
||||
* in this file list, false otherwise or if an error
|
||||
* in this file list, false otherwise or if an error
|
||||
* occurs.
|
||||
*/
|
||||
virtual bool IsValidFolderIndex(__inout int indexIn) const;
|
||||
|
@ -72,7 +72,7 @@ public:
|
|||
*
|
||||
* \param folderIndex
|
||||
* Index of the folder to be queried.
|
||||
*
|
||||
*
|
||||
* \param pStatus
|
||||
* Reports extended status if an error occurs.
|
||||
*
|
||||
|
@ -81,11 +81,11 @@ public:
|
|||
*/
|
||||
virtual HRESULT GetFolderName(__in int folderIndex, __inout StringResult* pNameOut) const = 0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the name of a file specified by index.
|
||||
* \param fileIndex
|
||||
* Index of the file to be queried.
|
||||
*
|
||||
*
|
||||
* \param pStatus
|
||||
* Reports extended status if an error occurs.
|
||||
*
|
||||
|
@ -105,7 +105,7 @@ public:
|
|||
*
|
||||
* \param pStatus
|
||||
* Reports extended status if an error occurs.
|
||||
*
|
||||
*
|
||||
* \param pFirstSubfolderOut
|
||||
* Returns the index of the first subfolder, or -1 if the specified
|
||||
* folder has no subfolders.
|
||||
|
@ -127,7 +127,7 @@ public:
|
|||
*
|
||||
* \param pStatus
|
||||
* Reports extended status if an error occurs.
|
||||
*
|
||||
*
|
||||
* \param pFirstFileOut
|
||||
* Returns the index of the first file, or -1 if the specified
|
||||
* folder contains no files.
|
||||
|
@ -141,7 +141,7 @@ public:
|
|||
*/
|
||||
virtual HRESULT GetFiles(__in int folderIndex, __out_opt int* pFirstFileOut, __out_opt int* pNumFilesOut) const = 0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the parent of a folder. Both the folder and the parent
|
||||
* are specified by index.
|
||||
*
|
||||
|
@ -149,14 +149,14 @@ public:
|
|||
* Index of the folder to be queried.
|
||||
*
|
||||
* \param pStatus
|
||||
* Reports extended status if an error occurs. Does not
|
||||
* Reports extended status if an error occurs. Does not
|
||||
* report an error if the folder in question is a root
|
||||
* folder with an absolute path.
|
||||
*
|
||||
* \param pParentFolderIndexOut
|
||||
* Returns the index of the parent folder, or -1 if the folder
|
||||
* in question is a root folder.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a valid parent is returned. Returns false if
|
||||
* the folder in question is a root folder or if an error occurs.
|
||||
|
@ -175,14 +175,14 @@ public:
|
|||
*
|
||||
* \param pParentFolderIndexOut
|
||||
* Returns the index of the parent folder.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a valid parent is returned, or false
|
||||
* if an error occurs.
|
||||
*/
|
||||
virtual HRESULT GetFileParentFolderIndex(__in int fileIndex, __out int* pParentFolderIndexOut) const = 0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the full, absolute path of a file specified by index.
|
||||
*
|
||||
* \param fileIndex
|
||||
|
@ -193,13 +193,13 @@ public:
|
|||
*
|
||||
* \param pPathOut
|
||||
* Returns the path of the file.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true on success, false if an error occurs.
|
||||
*/
|
||||
virtual HRESULT GetFilePath(__in int fileIndex, __inout StringResult* pPathOut) const = 0;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the full, absolute path of a file specified by index.
|
||||
*
|
||||
* \param fileIndex
|
||||
|
@ -210,10 +210,10 @@ public:
|
|||
*
|
||||
* \param pPathOut
|
||||
* Returns the path of the file.
|
||||
*
|
||||
*
|
||||
* \param pFlag
|
||||
* Returns the flag info of the returned file
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true on success, false if an error occurs.
|
||||
*/
|
||||
|
@ -230,7 +230,7 @@ public:
|
|||
*
|
||||
* \param pPathOut
|
||||
* Returns the path of the folder.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true on success, false if an error occurs.
|
||||
*/
|
||||
|
@ -240,7 +240,7 @@ public:
|
|||
* Tries to get the file index corresponding to a supplied absolute path.
|
||||
*
|
||||
* Does not report an error if no matching file is found.
|
||||
*
|
||||
*
|
||||
* \param pPath
|
||||
* The path to be searched for.
|
||||
*
|
||||
|
@ -250,7 +250,7 @@ public:
|
|||
* \param pIndexOut
|
||||
* Returns the index of the matching file, or -1 if no
|
||||
* matching file is found.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a matching file is found, or false
|
||||
* if an error occurs or if no matching file is found.
|
||||
|
@ -260,7 +260,7 @@ public:
|
|||
/*!
|
||||
* Tries to get the folder index corresponding to a supplied absolute path.
|
||||
* Does not report an error if no matching folder is found.
|
||||
*
|
||||
*
|
||||
* \param pPath
|
||||
* The path to be searched for.
|
||||
*
|
||||
|
@ -270,7 +270,7 @@ public:
|
|||
* \param pIndexOut
|
||||
* Returns the index of the matching folder, or -1 if no
|
||||
* matching folder is found.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a matching folder is found, or false
|
||||
* if an error occurs or if no matching folder is found.
|
||||
|
@ -283,11 +283,11 @@ public:
|
|||
* of characters matched.
|
||||
*
|
||||
* Matches _only_ subfolders (i.e. requires a trailing slash), so:
|
||||
* "\\this\that\other\dir"
|
||||
* "\\this\that\other\dir"
|
||||
* Matches "\\this\that\other\", even if "dir" is a valid subdirectory.
|
||||
* Add a trailing slash or use \ref TryGetFolderIndex (without a slash)
|
||||
* to match the full folder path.
|
||||
*
|
||||
*
|
||||
* \param pFullPath
|
||||
* The full path to be matched.
|
||||
*
|
||||
|
@ -302,7 +302,7 @@ public:
|
|||
* \param pcchUsedOut
|
||||
* If non-NULL, returns the number of characters from \ref pFullPath that were
|
||||
* used by the match.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true on success, false if no matching folder is found or if an error
|
||||
* occurred.
|
||||
|
@ -335,18 +335,18 @@ protected:
|
|||
class FileFileList : public FileSectionBase, public IFileList
|
||||
{
|
||||
private:
|
||||
DEFFILE_FILELIST_HEADER_EX m_header;
|
||||
const DEFFILE_FILELIST_HEADER_EX* m_pHeader;
|
||||
const DEFFILE_FILELIST_FOLDER_ENTRY* m_pFolders;
|
||||
const DEFFILE_FILELIST_FILE_ENTRY* m_pFiles;
|
||||
DEFFILE_FILELIST_HEADER_EX m_header{};
|
||||
const DEFFILE_FILELIST_HEADER_EX* m_pHeader{ nullptr };
|
||||
const DEFFILE_FILELIST_FOLDER_ENTRY* m_pFolders{ nullptr };
|
||||
const DEFFILE_FILELIST_FILE_ENTRY* m_pFiles{ nullptr };
|
||||
|
||||
// Not null-terminated
|
||||
const char* m_pAsciiNames;
|
||||
const WCHAR* m_pUtf16Names;
|
||||
const char* m_pAsciiNames{ nullptr };
|
||||
const WCHAR* m_pUtf16Names{ nullptr };
|
||||
|
||||
// It simplifies a lot of code to have a hidden
|
||||
// root folder.
|
||||
DEFFILE_FILELIST_FOLDER_ENTRY m_root;
|
||||
DEFFILE_FILELIST_FOLDER_ENTRY m_root{};
|
||||
|
||||
public:
|
||||
/*!
|
||||
|
@ -368,7 +368,7 @@ public:
|
|||
static HRESULT CreateInstance(__in_bcount(cbData) const BYTE* pData, __in int cbData, _Outptr_ FileFileList** result);
|
||||
|
||||
/*!
|
||||
* Allocates and initializes a \ref FileFileList from a
|
||||
* Allocates and initializes a \ref FileFileList from a
|
||||
* supplied \ref IFileSection.
|
||||
*
|
||||
* \param IFileSection
|
||||
|
@ -383,7 +383,7 @@ public:
|
|||
*/
|
||||
static HRESULT CreateInstance(__in IFileSection* pSection, _Outptr_ FileFileList** result);
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Delete a \ref FileFileList.
|
||||
*/
|
||||
virtual ~FileFileList() {}
|
||||
|
|
|
@ -192,7 +192,7 @@ public:
|
|||
|
||||
private:
|
||||
bool m_largeNode;
|
||||
DEFFILE_HNAMES_HEADER_EX m_header;
|
||||
DEFFILE_HNAMES_HEADER_EX m_header{};
|
||||
const DEFFILE_HNAMES_HEADER_EX* m_pHeader;
|
||||
__field_ecount(m_pHeader->numNodes) const DEFFILE_HNAMES_NODE* m_pNodes;
|
||||
__field_ecount(m_pHeader->numScopes) const DEFFILE_HNAMES_SCOPE* m_pScopes;
|
||||
|
|
|
@ -536,7 +536,7 @@ private:
|
|||
ManagedFile* pFile;
|
||||
} FileManagerFileInfo;
|
||||
|
||||
UINT32 m_defaultFileFlags;
|
||||
UINT32 m_defaultFileFlags = 0;
|
||||
mutable DynamicArray<FileManagerFileInfo>* m_pFiles;
|
||||
mutable MrmFileResolver* m_pFileResolver;
|
||||
|
||||
|
@ -664,9 +664,9 @@ public:
|
|||
private:
|
||||
ManagedSchema(_In_ const ManagedFile* pInitialFile, _In_ const IHierarchicalSchema* pInitialMap);
|
||||
|
||||
UINT64 m_generation;
|
||||
const IHierarchicalSchema* m_pCurrentSchema;
|
||||
const ManagedFile* m_pCurrentFile;
|
||||
UINT64 m_generation{ 0 };
|
||||
const IHierarchicalSchema* m_pCurrentSchema{ nullptr };
|
||||
const ManagedFile* m_pCurrentFile{ nullptr };
|
||||
|
||||
typedef struct _SchemaPerFileInfo
|
||||
{
|
||||
|
@ -740,6 +740,7 @@ private:
|
|||
ManagedResourceMap() :
|
||||
m_generation(0),
|
||||
m_pCurrentMap(nullptr),
|
||||
m_pCurrentFile(nullptr),
|
||||
m_pSchema(nullptr),
|
||||
m_pDecisions(nullptr),
|
||||
m_pUnifiedResourceView(nullptr),
|
||||
|
@ -906,20 +907,20 @@ public:
|
|||
bool TryGetReverseFileMap(_Outptr_opt_ const ReverseFileMap** ppMapOut) const;
|
||||
|
||||
protected:
|
||||
CoreProfile* m_pProfile;
|
||||
CoreProfile* m_pProfile{ nullptr };
|
||||
|
||||
PriFileManager* m_pFileManager;
|
||||
AtomPoolGroup* m_pAtoms;
|
||||
UnifiedEnvironment* m_pEnvironment;
|
||||
UnifiedDecisionInfo* m_pDecisions;
|
||||
ProviderResolver* m_pResolver;
|
||||
PriFileManager* m_pFileManager{ nullptr };
|
||||
AtomPoolGroup* m_pAtoms{ nullptr };
|
||||
UnifiedEnvironment* m_pEnvironment{ nullptr };
|
||||
UnifiedDecisionInfo* m_pDecisions{ nullptr };
|
||||
ProviderResolver* m_pResolver{ nullptr };
|
||||
|
||||
DynamicArray<UnifiedViewFileInfo*>* m_pReferencedFiles;
|
||||
DynamicArray<UnifiedViewFileInfo*>* m_pReferencedFiles{ nullptr };
|
||||
|
||||
DynamicArray<ManagedSchema*>* m_pSchemas;
|
||||
DynamicArray<ManagedResourceMap*>* m_pMaps;
|
||||
DynamicArray<ManagedSchema*>* m_pSchemas{ nullptr };
|
||||
DynamicArray<ManagedResourceMap*>* m_pMaps{ nullptr };
|
||||
|
||||
UnifiedViewFileInfo* m_pAppFile;
|
||||
UnifiedViewFileInfo* m_pAppFile{ nullptr };
|
||||
|
||||
UnifiedResourceView(_In_ CoreProfile* pProfile);
|
||||
|
||||
|
@ -1042,14 +1043,14 @@ protected:
|
|||
|
||||
class DecisionInfoCache;
|
||||
|
||||
const UnifiedEnvironment* m_pEnvironment;
|
||||
const IDecisionInfo* m_pDecisions;
|
||||
UINT64 m_generation;
|
||||
const UnifiedEnvironment* m_pEnvironment{ nullptr };
|
||||
const IDecisionInfo* m_pDecisions{ nullptr };
|
||||
UINT64 m_generation = 0;
|
||||
|
||||
mutable DecisionInfoCache* m_pCache;
|
||||
mutable SRWLOCK m_srwLock;
|
||||
mutable SRWLOCK m_srwQualifierSetLock;
|
||||
mutable SRWLOCK m_srwQualifierLock;
|
||||
mutable DecisionInfoCache* m_pCache{ nullptr };
|
||||
mutable SRWLOCK m_srwLock{ nullptr };
|
||||
mutable SRWLOCK m_srwQualifierSetLock{ nullptr };
|
||||
mutable SRWLOCK m_srwQualifierLock{ nullptr };
|
||||
};
|
||||
|
||||
class ProviderResolver : public ResolverBase
|
||||
|
@ -1092,8 +1093,8 @@ protected:
|
|||
|
||||
class PerQualifierPoolInfo;
|
||||
|
||||
mutable IProviderDataSources* m_pDataSources;
|
||||
mutable PerQualifierPoolInfo* m_pQualifiers;
|
||||
mutable IProviderDataSources* m_pDataSources{ nullptr };
|
||||
mutable PerQualifierPoolInfo* m_pQualifiers{ nullptr };
|
||||
};
|
||||
|
||||
class PerThreadQualifier;
|
||||
|
@ -1162,13 +1163,13 @@ public:
|
|||
protected:
|
||||
class PerQualifierPoolInfo;
|
||||
|
||||
const IResolver* m_pParent;
|
||||
mutable PerQualifierPoolInfo* m_pQualifiers;
|
||||
bool m_bHasScoreCache;
|
||||
bool m_bIsDifferentQualifierValueFromParent;
|
||||
PerThreadQualifier* m_pPerThreadQualifier;
|
||||
bool m_bClonedResolver;
|
||||
mutable SRWLOCK m_srwQualifierValuesLock;
|
||||
const IResolver* m_pParent{ nullptr };
|
||||
mutable PerQualifierPoolInfo* m_pQualifiers{ nullptr };
|
||||
bool m_bHasScoreCache{ false };
|
||||
bool m_bIsDifferentQualifierValueFromParent{ false };
|
||||
PerThreadQualifier* m_pPerThreadQualifier{ nullptr };
|
||||
bool m_bClonedResolver{ false };
|
||||
mutable SRWLOCK m_srwQualifierValuesLock{ nullptr };
|
||||
|
||||
OverrideResolver(_In_ const IResolver* pParent);
|
||||
|
||||
|
|
|
@ -68,8 +68,8 @@ public:
|
|||
protected:
|
||||
SchemaCollectionSchemaWrapper(_In_ const IHierarchicalSchema* schema, _In_ bool assumeOwnership);
|
||||
|
||||
const IHierarchicalSchema* m_mySchema;
|
||||
const IHierarchicalSchema* m_schema;
|
||||
const IHierarchicalSchema* m_mySchema{ nullptr };
|
||||
const IHierarchicalSchema* m_schema{ nullptr };
|
||||
};
|
||||
|
||||
class IResourceMapBase;
|
||||
|
@ -124,8 +124,8 @@ public:
|
|||
int GetNumItems() const { return m_pHeader->numItems; }
|
||||
|
||||
protected:
|
||||
const MRMFILE_HSCHEMA_VERSION_INFO* m_pHeader;
|
||||
PCWSTR m_pUniqueId;
|
||||
const MRMFILE_HSCHEMA_VERSION_INFO* m_pHeader{ nullptr };
|
||||
PCWSTR m_pUniqueId{ nullptr };
|
||||
|
||||
HRESULT Init(_In_reads_bytes_(cbData) const void* pData, _In_ size_t cbData);
|
||||
|
||||
|
@ -313,17 +313,17 @@ private:
|
|||
|
||||
StringResult m_simpleName;
|
||||
StringResult m_uniqueName;
|
||||
UINT16 m_majorVersion;
|
||||
UINT16 m_minorVersion;
|
||||
UINT16 m_majorVersion{ 0 };
|
||||
UINT16 m_minorVersion{ 0 };
|
||||
|
||||
int m_numScopeNames;
|
||||
PWSTR* m_ppMyScopeNames;
|
||||
int m_numScopeNames{ 0 };
|
||||
PWSTR* m_ppMyScopeNames{ nullptr };
|
||||
|
||||
int m_numItemNames;
|
||||
PWSTR* m_ppMyItemNames;
|
||||
int m_numItemNames{ 0 };
|
||||
PWSTR* m_ppMyItemNames{ nullptr };
|
||||
|
||||
StaticAtomPool* m_pScopeNames;
|
||||
StaticAtomPool* m_pItemNames;
|
||||
StaticAtomPool* m_pScopeNames{ nullptr };
|
||||
StaticAtomPool* m_pItemNames{ nullptr };
|
||||
};
|
||||
|
||||
class HierarchicalSchema : public FileSectionBase, public IHierarchicalSchema
|
||||
|
@ -467,20 +467,20 @@ public:
|
|||
_Inout_opt_ BlobResult* pBlobResult) const;
|
||||
|
||||
private:
|
||||
BYTE* m_pMyBuffer;
|
||||
BYTE* m_pMyBuffer{ nullptr };
|
||||
|
||||
MRMFILE_HSCHEMA_HEADER_EX m_header;
|
||||
|
||||
_Field_size_(m_header.numVersions) const MRMFILE_HSCHEMA_VERSION_INFO* m_pFileVersions;
|
||||
_Field_size_(m_header.numVersions) const MRMFILE_HSCHEMA_VERSION_INFO* m_pFileVersions{ nullptr };
|
||||
|
||||
PCWSTR m_pUniqueId;
|
||||
PCWSTR m_pSimpleId;
|
||||
PCWSTR m_pUniqueId{ nullptr };
|
||||
PCWSTR m_pSimpleId{ nullptr };
|
||||
|
||||
_Field_size_(m_header.numVersions) mutable HierarchicalSchemaVersionInfo** m_pVersions;
|
||||
const HierarchicalNames* m_pNames;
|
||||
_Field_size_(m_header.numVersions) mutable HierarchicalSchemaVersionInfo** m_pVersions{ nullptr };
|
||||
const HierarchicalNames* m_pNames { nullptr };
|
||||
|
||||
const void* m_pSectionData;
|
||||
int m_cbSection;
|
||||
const void* m_pSectionData{ nullptr };
|
||||
int m_cbSection{ 0 };
|
||||
|
||||
HierarchicalSchema();
|
||||
|
||||
|
@ -512,10 +512,10 @@ public:
|
|||
static const DEFFILE_SECTION_TYPEID GetSectionTypeId();
|
||||
|
||||
private:
|
||||
const MRMFILE_REVERSEFILEMAP_HEADER* m_pHeader;
|
||||
const MRMFILE_REVERSEFILEMAP_ENTRY* m_pEntries;
|
||||
const HierarchicalNames* m_pNames;
|
||||
int m_cbSection;
|
||||
const MRMFILE_REVERSEFILEMAP_HEADER* m_pHeader{ nullptr };
|
||||
const MRMFILE_REVERSEFILEMAP_ENTRY* m_pEntries{ nullptr };
|
||||
const HierarchicalNames* m_pNames{ nullptr };
|
||||
int m_cbSection{ 0 };
|
||||
|
||||
ReverseFileMap();
|
||||
|
||||
|
@ -557,10 +557,10 @@ public:
|
|||
HRESULT GetSourceFileIndex(_Inout_ int* pIndexOut) const;
|
||||
|
||||
protected:
|
||||
const IRawResourceMap* m_pRawMap;
|
||||
int m_valueGlobalIndex;
|
||||
int m_decisionIndex;
|
||||
int m_candidateIndexInDecision;
|
||||
const IRawResourceMap* m_pRawMap{ nullptr };
|
||||
int m_valueGlobalIndex{ 0 };
|
||||
int m_decisionIndex{ 0 };
|
||||
int m_candidateIndexInDecision{ 0 };
|
||||
};
|
||||
|
||||
class NamedResourceResult : public DefObject
|
||||
|
@ -791,8 +791,8 @@ protected:
|
|||
mutable _Field_size_(m_numDescendentResources) int* m_pDescendentResources;
|
||||
mutable _Field_size_(m_numDescendentScopes) int* m_pDescendentScopes;
|
||||
|
||||
UINT64 m_initGeneration;
|
||||
mutable UINT16 m_currentMinorVersion;
|
||||
UINT64 m_initGeneration{ 0 };
|
||||
mutable UINT16 m_currentMinorVersion{ 0 };
|
||||
};
|
||||
|
||||
class IFileSectionResolver;
|
||||
|
@ -919,12 +919,12 @@ public:
|
|||
_Out_ UINT32* linksToResourceIndex) const;
|
||||
|
||||
protected:
|
||||
const IFileSectionResolver* m_pSections;
|
||||
const IHierarchicalSchema* m_pSchema;
|
||||
const IDecisionInfo* m_pDecisionInfo;
|
||||
const IResourceLinks* m_links;
|
||||
const IFileSectionResolver* m_pSections{ nullptr };
|
||||
const IHierarchicalSchema* m_pSchema{ nullptr };
|
||||
const IDecisionInfo* m_pDecisionInfo{ nullptr };
|
||||
const IResourceLinks* m_links{ nullptr };
|
||||
|
||||
ResourceMapFileData* m_pFileData;
|
||||
ResourceMapFileData* m_pFileData{ nullptr };
|
||||
|
||||
bool HaveLinks() const { return (m_links != nullptr); }
|
||||
|
||||
|
@ -982,7 +982,7 @@ protected:
|
|||
_In_ int cbData,
|
||||
_In_opt_ const RemapAtomPool* pQualifierMapping);
|
||||
|
||||
DecisionInfoFileData* m_pFileData;
|
||||
DecisionInfoFileData* m_pFileData{ nullptr };
|
||||
};
|
||||
|
||||
class ResourceLinkSection : public FileSectionBase, public IResourceLinks
|
||||
|
@ -1048,22 +1048,22 @@ public:
|
|||
private:
|
||||
bool IsValidResourceLinkIndex(_In_ int index) const { return ((index >= 0) && (index < GetNumTotalLinks())); }
|
||||
|
||||
_Field_size_(1) const MRMFILE_RESOURCE_LINK_HEADER* m_header;
|
||||
_Field_size_(m_header->numSchemas) const MRMFILE_LINK_SCHEMA_MAP* m_schemaMap;
|
||||
_Field_size_(m_header->schemaDataSizeInBytes) const BYTE* m_schemaData;
|
||||
_Field_size_(1) const MRMFILE_RESOURCE_LINK_HEADER* m_header{ nullptr };
|
||||
_Field_size_(m_header->numSchemas) const MRMFILE_LINK_SCHEMA_MAP* m_schemaMap{ nullptr };
|
||||
_Field_size_(m_header->schemaDataSizeInBytes) const BYTE* m_schemaData{ nullptr };
|
||||
|
||||
_Field_size_(m_header->firstLargeInternalLink) const UINT16* m_internalLinks;
|
||||
_Field_size_(m_header->numInternalLinks - m_header->firstLargeInternalLink) const UINT32* m_largeInternalLinks;
|
||||
_Field_size_(m_header->firstLargeInternalLink) const UINT16* m_internalLinks{ nullptr };
|
||||
_Field_size_(m_header->numInternalLinks - m_header->firstLargeInternalLink) const UINT32* m_largeInternalLinks{ nullptr };
|
||||
|
||||
_Field_size_(m_header->firstLargeFullLink) const MRMFILE_FULL_LINK* m_fullLinks;
|
||||
_Field_size_(m_header->numFullLinks - m_header->firstLargeFullLink) const MRMFILE_LARGE_FULL_LINK* m_largeFullLinks;
|
||||
_Field_size_(m_header->firstLargeFullLink) const MRMFILE_FULL_LINK* m_fullLinks{ nullptr };
|
||||
_Field_size_(m_header->numFullLinks - m_header->firstLargeFullLink) const MRMFILE_LARGE_FULL_LINK* m_largeFullLinks{ nullptr };
|
||||
|
||||
_Field_size_(m_header->firstLargeLinkById) const MRMFILE_LINK_BY_ID* m_linksById;
|
||||
_Field_size_(m_header->numLinksById - m_header->firstLargeLinkById) const MRMFILE_LARGE_LINK_BY_ID* m_largeLinksById;
|
||||
_Field_size_(m_header->firstLargeLinkById) const MRMFILE_LINK_BY_ID* m_linksById{ nullptr };
|
||||
_Field_size_(m_header->numLinksById - m_header->firstLargeLinkById) const MRMFILE_LARGE_LINK_BY_ID* m_largeLinksById{ nullptr };
|
||||
|
||||
_Field_size_(m_header->numSchemas) const IHierarchicalSchema** m_schemas;
|
||||
_Field_size_(m_header->numSchemas) const IHierarchicalSchema** m_schemas{ nullptr };
|
||||
|
||||
const IHierarchicalSchema* m_schema;
|
||||
const IHierarchicalSchema* m_schema{ nullptr };
|
||||
|
||||
ResourceLinkSection() {}
|
||||
|
||||
|
@ -1129,15 +1129,15 @@ public:
|
|||
GetTargetOsVersion(_In_ CoreProfile* pProfile, _Inout_opt_ StringResult* pPlatformOut, _Inout_opt_ StringResult* pVersionOut) const;
|
||||
|
||||
protected:
|
||||
const IFileSectionResolver* m_pSections;
|
||||
const ISchemaCollection* m_pSchemaCollection;
|
||||
const IFileSectionResolver* m_pSections{ nullptr };
|
||||
const ISchemaCollection* m_pSchemaCollection{ nullptr };
|
||||
|
||||
const MRMFILE_PRI_DESCRIPTOR_EX* m_pHeader;
|
||||
const DEFFILE_SECTION_INDEX* m_pSchemaSectionIndices;
|
||||
const DEFFILE_SECTION_INDEX* m_pDecisionInfoSectionIndices;
|
||||
const DEFFILE_SECTION_INDEX* m_pResourceMapSectionIndices;
|
||||
const DEFFILE_SECTION_INDEX* m_pReferencedFileSectionIndices;
|
||||
const DEFFILE_SECTION_INDEX* m_pDataItemSectionIndices;
|
||||
const MRMFILE_PRI_DESCRIPTOR_EX* m_pHeader{ nullptr };
|
||||
const DEFFILE_SECTION_INDEX* m_pSchemaSectionIndices{ nullptr };
|
||||
const DEFFILE_SECTION_INDEX* m_pDecisionInfoSectionIndices{ nullptr };
|
||||
const DEFFILE_SECTION_INDEX* m_pResourceMapSectionIndices{ nullptr };
|
||||
const DEFFILE_SECTION_INDEX* m_pReferencedFileSectionIndices{ nullptr };
|
||||
const DEFFILE_SECTION_INDEX* m_pDataItemSectionIndices{ nullptr };
|
||||
|
||||
HRESULT Init(
|
||||
_In_ const IFileSectionResolver* pSections,
|
||||
|
@ -1152,7 +1152,7 @@ private:
|
|||
|
||||
/*!
|
||||
* Gets a structured representation of a file section from some
|
||||
* file, specified by its index in the local file list of the
|
||||
* file, specified by its index in the local file list of the
|
||||
* IFileSectionResolver itself.
|
||||
*/
|
||||
|
||||
|
@ -1664,11 +1664,11 @@ protected:
|
|||
|
||||
HRESULT InitStandalonePriFile(_In_opt_ const ISchemaCollection* overrideSchemas);
|
||||
|
||||
CoreProfile* m_pProfile;
|
||||
const ISchemaCollection* m_overrideSchemas;
|
||||
AtomPoolGroup* m_pAtoms;
|
||||
UnifiedEnvironment* m_pEnvironment;
|
||||
UnifiedDecisionInfo* m_pDecisions;
|
||||
CoreProfile* m_pProfile{ nullptr };
|
||||
const ISchemaCollection* m_overrideSchemas{ nullptr };
|
||||
AtomPoolGroup* m_pAtoms{ nullptr };
|
||||
UnifiedEnvironment* m_pEnvironment{ nullptr };
|
||||
UnifiedDecisionInfo* m_pDecisions{ nullptr };
|
||||
};
|
||||
|
||||
} // namespace Microsoft::Resources
|
|
@ -78,14 +78,14 @@ protected:
|
|||
_In_ int numMappedAtomIndexes,
|
||||
_In_reads_(numMappedAtomIndexes) const Atom::SmallIndex* mappedAtomIndexes);
|
||||
|
||||
int m_sourcePoolIndex;
|
||||
int m_targetPoolIndex;
|
||||
int m_numMappedAtomIndexes;
|
||||
int m_sourcePoolIndex{ 0 };
|
||||
int m_targetPoolIndex{ 0 };
|
||||
int m_numMappedAtomIndexes{ 0 };
|
||||
|
||||
_Field_size_(m_numMappedAtomIndexes) Atom::SmallIndex* m_mappedAtomIndexes;
|
||||
};
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* The RemapInfo class contains mappings for any parts of a file that
|
||||
* might need to be remapped when copying sections from one file to
|
||||
* another or when interpreting a mapped file.
|
||||
|
@ -95,16 +95,16 @@ class RemapInfo : DefObject
|
|||
public:
|
||||
RemapInfo();
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Creates a new empty \see RemapInfo.
|
||||
*
|
||||
*
|
||||
* \param pStatus
|
||||
* Status object to report success or failure. \see RemapInfo::New guarantees
|
||||
* that reported error status matches the return value - it will always
|
||||
* report an error if it returns NULL, and will never report an error if
|
||||
* it returns a value other than NULL.
|
||||
* \return RemapInfo*
|
||||
* Returns a
|
||||
* Returns a
|
||||
*/
|
||||
static HRESULT CreateInstance(_Outptr_ RemapInfo** result);
|
||||
|
||||
|
@ -114,17 +114,17 @@ public:
|
|||
|
||||
virtual ~RemapInfo();
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Sets the section mapping in a \see RemapInfo to a specified size.
|
||||
*
|
||||
*
|
||||
* \param numSections
|
||||
* If numSections is greater than zero, the section mapping array is
|
||||
* created or resized to the specified size. If numSections is 0,
|
||||
* the section mapping array is freed. Values less than 0 cause an error.
|
||||
*
|
||||
*
|
||||
* \param pSectionMapping
|
||||
* If present, specifies the section mappings used to initialize the
|
||||
* \see RemapInfo. If pSectionMapping is NULL, the section mapping
|
||||
* \see RemapInfo. If pSectionMapping is NULL, the section mapping
|
||||
* array is initialized to yield a no-op mapping (each index maps to itself).
|
||||
* It is an error to specify a non-NULL pSectionMapping if numSections is zero.
|
||||
*
|
||||
|
@ -137,14 +137,14 @@ public:
|
|||
*/
|
||||
HRESULT SetSectionMapping(_In_ BaseFile::SectionCount numSections, _In_reads_opt_(numSections) BaseFile::SectionIndex* pSectionMapping);
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Sets the atom pool mapping in a \see RemapInfo to a specified size.
|
||||
*
|
||||
*
|
||||
* \param numPools
|
||||
* If numPools is greater than zero, the atom pool mapping array is
|
||||
* created or resized to the specified size. If numPools is 0,
|
||||
* the atom pool mapping array is freed. Values less than 0 cause an error.
|
||||
*
|
||||
*
|
||||
* \param pPools
|
||||
* If present, specifies the atom pool mappings used to initialize the
|
||||
* \see RemapInfo. If pPools is NULL, the atom pool mapping array is
|
||||
|
@ -161,9 +161,9 @@ public:
|
|||
*/
|
||||
HRESULT SetAtomPoolMappingArray(_In_ Atom::PoolCount numPools, _In_reads_opt_(numPools) Atom::PoolIndex* pPools);
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Adds a mapping for a single atom pool.
|
||||
*
|
||||
*
|
||||
* \param fromPool
|
||||
* The index of the pool to be mapped from.
|
||||
*
|
||||
|
@ -178,23 +178,23 @@ public:
|
|||
*/
|
||||
HRESULT SetAtomPoolMapping(_In_ Atom::PoolIndex fromPool, _In_ Atom::PoolIndex toPool);
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the number of elements in the section mapping.
|
||||
*
|
||||
*
|
||||
* \return BaseFile::SectionCount
|
||||
* The number of elements in the section mapping.
|
||||
*/
|
||||
BaseFile::SectionCount GetNumSections() const { return m_numSections; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets a mapping for a single section index.
|
||||
*
|
||||
*
|
||||
* \param from
|
||||
* The section index to be remapped.
|
||||
*
|
||||
*
|
||||
* \param pStatus
|
||||
* Returns error details if the section remap fails.
|
||||
*
|
||||
*
|
||||
* \return BaseFile::SectionIndex
|
||||
* Returns the new section index. If the section index is out
|
||||
* of range or if no mapping is defined for the section, reports
|
||||
|
@ -202,9 +202,9 @@ public:
|
|||
*/
|
||||
HRESULT GetSectionMapping(_In_ BaseFile::SectionIndex from, _Out_ BaseFile::SectionIndex* index) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets a mapping for a single section index, if defined.
|
||||
*
|
||||
*
|
||||
* \param from
|
||||
* The section index to be remapped.
|
||||
*
|
||||
|
@ -216,22 +216,22 @@ public:
|
|||
*
|
||||
* \param pToOut
|
||||
* If non-NULL, the new section index is returned in pToOut.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a valid section mapping was found, false otherwise.
|
||||
*/
|
||||
bool TryGetSectionMapping(_In_ BaseFile::SectionIndex from, _Out_opt_ BaseFile::SectionIndex* pToOut) const;
|
||||
|
||||
/*!
|
||||
* Gets the section mapping for a \see RemapInfo. Note that this
|
||||
/*!
|
||||
* Gets the section mapping for a \see RemapInfo. Note that this
|
||||
* method returns a pointer to the actual internal member and that
|
||||
* the returned value can be edited to change the contents of the
|
||||
* \see RemapInfo object.
|
||||
*
|
||||
*
|
||||
* \param pNumSectionsOut
|
||||
* If pNumSectionsOut is non-NULL, this method uses it to report the
|
||||
* number of elements in the section mapping.
|
||||
*
|
||||
*
|
||||
* \return BaseFile::SectionIndex*
|
||||
* Returns an pointer to the internal section mapping of the
|
||||
* \see RemapInfo object.
|
||||
|
@ -245,23 +245,23 @@ public:
|
|||
return m_pSectionMapping;
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets the number of elements in the atom pool mapping.
|
||||
*
|
||||
*
|
||||
* \return Atom::PoolCount
|
||||
* The number of elements in the atom pool mapping.
|
||||
*/
|
||||
Atom::PoolCount GetNumAtomPools() const { return m_numPools; }
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets a mapping for a single atom pool index.
|
||||
*
|
||||
*
|
||||
* \param from
|
||||
* The atom pool index to be remapped.
|
||||
*
|
||||
*
|
||||
* \param pStatus
|
||||
* Returns error details if the atom pool remap fails.
|
||||
*
|
||||
*
|
||||
* \return Atom::PoolIndex
|
||||
* Returns the new atom pool index. If the atom pool index is out
|
||||
* of range or if no mapping is defined for the atom pool, reports
|
||||
|
@ -269,9 +269,9 @@ public:
|
|||
*/
|
||||
HRESULT GetAtomPoolMapping(_In_ Atom::PoolIndex from, _Out_ Atom::PoolIndex* index) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Gets a mapping for a single atom pool index, if defined.
|
||||
*
|
||||
*
|
||||
* \param from
|
||||
* The atom pool index to be remapped.
|
||||
*
|
||||
|
@ -283,22 +283,22 @@ public:
|
|||
*
|
||||
* \param pToOut
|
||||
* If non-NULL, the new atom pool index is returned in pToOut.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true if a valid atom pool mapping was found, false otherwise.
|
||||
*/
|
||||
bool TryGetAtomPoolMapping(_In_ Atom::PoolIndex from, _Out_opt_ Atom::PoolIndex* pToOut) const;
|
||||
|
||||
/*!
|
||||
* Gets the atom pool mapping for a \see RemapInfo. Note that this
|
||||
/*!
|
||||
* Gets the atom pool mapping for a \see RemapInfo. Note that this
|
||||
* method returns a pointer to the actual internal member and that
|
||||
* the returned value can be edited to change the contents of the
|
||||
* \see RemapInfo object.
|
||||
*
|
||||
*
|
||||
* \param pNumPoolsOut
|
||||
* If pNumPoolsOut is non-NULL, this method uses it to report the
|
||||
* number of elements in the atom pool mapping.
|
||||
*
|
||||
*
|
||||
* \return Atom::PoolIndex*
|
||||
* Returns an pointer to the internal atom pool mapping of the
|
||||
* \see RemapInfo object.
|
||||
|
@ -312,29 +312,29 @@ public:
|
|||
return m_pPoolMapping;
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Remaps an atom using the pool mappings defined in this \see RemapInfo.
|
||||
*
|
||||
*
|
||||
* \param atom
|
||||
* The \see Atom to be remapped.
|
||||
*
|
||||
* \param pStatus
|
||||
* Reports details if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return Atom
|
||||
* Returns the remapped atom, or the Null atom if an error occurs.
|
||||
*/
|
||||
Atom RemapAtom(_In_ Atom atom) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Remaps an atom using the pool mappings defined in this \ref RemapInfo.
|
||||
*
|
||||
*
|
||||
* \param atom
|
||||
* The \ref Atom to be remapped.
|
||||
*
|
||||
* \param pStatus
|
||||
* Reports details if an error occurs.
|
||||
*
|
||||
*
|
||||
* \param pAtomRtrn
|
||||
* Used to return the remapped atom. Returns the Null atom if no mapping
|
||||
* is poosible or an error occurs.
|
||||
|
@ -345,10 +345,10 @@ public:
|
|||
*/
|
||||
HRESULT RemapAtom(_In_ Atom atom, _Out_opt_ Atom* pAtomRtrn) const;
|
||||
|
||||
/*!
|
||||
* Tries to remap an atom using the pool mappings defined in this
|
||||
/*!
|
||||
* Tries to remap an atom using the pool mappings defined in this
|
||||
* \see RemapInfo.
|
||||
*
|
||||
*
|
||||
* \param atom
|
||||
* The \see Atom to be remapped.
|
||||
*
|
||||
|
@ -357,16 +357,16 @@ public:
|
|||
*
|
||||
* \param pAtomRtrn
|
||||
* Return the remapped \see Atom.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true on success, false otherwise.
|
||||
*/
|
||||
bool TryRemapAtom(_In_ Atom atom, _Out_opt_ Atom* pAtomRtrn) const;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Remaps an atom using the pool mappings defined in a suppplied
|
||||
* \see RemapInfo.
|
||||
*
|
||||
*
|
||||
* \param pRemapInfo
|
||||
* The \see RemapInfo used to look up the mapping, or NULL to do
|
||||
* no remapping.
|
||||
|
@ -376,18 +376,18 @@ public:
|
|||
*
|
||||
* \param pStatus
|
||||
* Reports details if an error occurs.
|
||||
*
|
||||
*
|
||||
* \return Atom
|
||||
* Returns the remapped atom, or the Null atom if an error occurs.
|
||||
* Returns the remapped atom, or the Null atom if an error occurs.
|
||||
* If pRemapInfo is NULL, the returned \see Atom will be the same
|
||||
* as the one that was passed it.
|
||||
*/
|
||||
static Atom RemapAtom(_In_ RemapInfo* pRemapInfo, _In_ Atom atom) { return (pRemapInfo ? pRemapInfo->RemapAtom(atom) : atom); }
|
||||
|
||||
/*!
|
||||
* Tries to remap an atom using the pool mappings defined in a
|
||||
/*!
|
||||
* Tries to remap an atom using the pool mappings defined in a
|
||||
* supplied \see RemapInfo.
|
||||
*
|
||||
*
|
||||
* \param pRemapInfo
|
||||
* The \see RemapInfo used to look up the mapping, or NULL to do
|
||||
* no remapping.
|
||||
|
@ -400,7 +400,7 @@ public:
|
|||
*
|
||||
* \param pAtomRtrn
|
||||
* Return the remapped \see Atom.
|
||||
*
|
||||
*
|
||||
* \return bool
|
||||
* Returns true on success, false otherwise.
|
||||
*/
|
||||
|
|
|
@ -751,8 +751,8 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
AtomPoolGroup* m_pPoolGroup;
|
||||
Atom::Index m_poolIndex;
|
||||
AtomPoolGroup* m_pPoolGroup { nullptr };
|
||||
Atom::Index m_poolIndex{ DEF_ATOM_INDEX_NONE };
|
||||
const HierarchicalNamesBuilder* m_pBuilder;
|
||||
|
||||
HNamesNodeAtomPool(__in const HierarchicalNamesBuilder* pBuilder) : m_pBuilder(pBuilder) {}
|
||||
|
@ -1393,9 +1393,9 @@ HRESULT HierarchicalNamesBuilder::BuildNameNode(
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Serializes the file list into the provided buffer.
|
||||
*
|
||||
*
|
||||
* \param pBuffer
|
||||
* The buffer into which the file list is generated.
|
||||
*
|
||||
|
|
|
@ -134,16 +134,16 @@ public:
|
|||
const IDecisionInfo* GetPool() const { return m_pDecisionInfo; }
|
||||
|
||||
private:
|
||||
const RemapAtomPool* m_pQualifierMapping;
|
||||
const DecisionInfoFileSection* m_pDecisionInfo;
|
||||
const RemapAtomPool* m_pQualifierMapping{ nullptr };
|
||||
const DecisionInfoFileSection* m_pDecisionInfo{ nullptr };
|
||||
|
||||
const MRMFILE_DECISION_INFO_HEADER* m_pHeader;
|
||||
_Field_size_(m_pHeader->numDecisions) const MRMFILE_DECISION* m_pDecisions;
|
||||
_Field_size_(m_pHeader->numQualifierSets) const MRMFILE_QUALIFIER_SET* m_pQualifierSets;
|
||||
_Field_size_(m_pHeader->numQualifiers) const MRMFILE_QUALIFIER* m_pQualifiers;
|
||||
_Field_size_(m_pHeader->numBaseQualifiers) const MRMFILE_BASE_QUALIFIER* m_pBaseQualifiers;
|
||||
_Field_size_(m_pHeader->numReferences) const UINT16* m_pReferences;
|
||||
_Field_size_(m_pHeader->cchLiterals) PCWSTR m_pLiterals;
|
||||
const MRMFILE_DECISION_INFO_HEADER* m_pHeader{ nullptr };
|
||||
_Field_size_(m_pHeader->numDecisions) const MRMFILE_DECISION* m_pDecisions{ nullptr };
|
||||
_Field_size_(m_pHeader->numQualifierSets) const MRMFILE_QUALIFIER_SET* m_pQualifierSets{ nullptr };
|
||||
_Field_size_(m_pHeader->numQualifiers) const MRMFILE_QUALIFIER* m_pQualifiers{ nullptr };
|
||||
_Field_size_(m_pHeader->numBaseQualifiers) const MRMFILE_BASE_QUALIFIER* m_pBaseQualifiers{ nullptr };
|
||||
_Field_size_(m_pHeader->numReferences) const UINT16* m_pReferences{ nullptr };
|
||||
_Field_size_(m_pHeader->cchLiterals) PCWSTR m_pLiterals{ nullptr };
|
||||
|
||||
DecisionInfoFileData() :
|
||||
m_pHeader(nullptr),
|
||||
|
|
|
@ -187,10 +187,10 @@ private:
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
const UnifiedEnvironment* m_Environment;
|
||||
const CoreProfile* m_pProfile;
|
||||
const IResolver* m_pParentResolver;
|
||||
DynamicArray<StringResult*>* m_qualifierCaches;
|
||||
const UnifiedEnvironment* m_Environment{ nullptr };
|
||||
const CoreProfile* m_pProfile{ nullptr };
|
||||
const IResolver* m_pParentResolver{ nullptr };
|
||||
DynamicArray<StringResult*>* m_qualifierCaches{ nullptr };
|
||||
};
|
||||
|
||||
class ResolverBase::DecisionInfoCache : public DefObject
|
||||
|
@ -441,7 +441,7 @@ public:
|
|||
|
||||
// An arbitrary but high limit. We want it to be high enough to never hit it
|
||||
// but also low enough to ensure we don't use too much stack space.
|
||||
QualifierEntry _entries[50];
|
||||
QualifierEntry _entries[50]{};
|
||||
UINT16 _nextFreeEntry = 0;
|
||||
};
|
||||
|
||||
|
@ -1847,16 +1847,16 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
const IAtomPool* m_pPool;
|
||||
const IAtomPool* m_pPool{ nullptr };
|
||||
|
||||
int m_cacheSize;
|
||||
__ecount(m_cacheSize) mutable StringResult* m_pCachedValues;
|
||||
UINT32 m_presentValues;
|
||||
SRWLOCK m_srwLock;
|
||||
mutable DynamicArray<IQualifierValueProvider*>* m_pProviders;
|
||||
UINT32 m_ownedProviders;
|
||||
UINT32 m_attemptedValues;
|
||||
PerThreadQualifier* m_pPerThreadQualifier;
|
||||
int m_cacheSize{ 0 };
|
||||
__ecount(m_cacheSize) mutable StringResult* m_pCachedValues{ nullptr };
|
||||
UINT32 m_presentValues{ 0 };
|
||||
SRWLOCK m_srwLock = { nullptr };
|
||||
mutable DynamicArray<IQualifierValueProvider*>* m_pProviders{ nullptr };
|
||||
UINT32 m_ownedProviders{ 0 };
|
||||
UINT32 m_attemptedValues{ 0 };
|
||||
PerThreadQualifier* m_pPerThreadQualifier{ nullptr };
|
||||
PerQualifierPoolInfo(_In_ const IAtomPool* pPool, _In_opt_ PerThreadQualifier* pPerThreadQualifier) :
|
||||
m_pPool(pPool),
|
||||
m_cacheSize(pPool->GetNumAtoms()),
|
||||
|
|
|
@ -463,7 +463,7 @@ protected:
|
|||
const IDecisionInfo* m_pDecisionInfo;
|
||||
|
||||
mutable StringResult m_packageRootPath;
|
||||
mutable size_t m_cchPackageRootPath;
|
||||
mutable size_t m_cchPackageRootPath{ 0 };
|
||||
|
||||
mutable const IDecisionInfo* m_pOverrideDecisionInfo;
|
||||
mutable RemapUInt16* m_pOverrideDecisionMap;
|
||||
|
@ -472,7 +472,7 @@ protected:
|
|||
mutable const IResourceLinks* m_links;
|
||||
|
||||
_Field_size_(1) const MRMFILE_RESOURCE_MAP_HEADER* m_pHeader;
|
||||
_Field_size_(m_pHeader->cbSchemaRef) const BYTE* m_pSchemaRefData;
|
||||
_Field_size_(m_pHeader->cbSchemaRef) const BYTE* m_pSchemaRefData{ nullptr };
|
||||
_Field_size_(m_pHeader->cbEnvironmentRefs) const BYTE* m_pEnvironmentRefData;
|
||||
_Field_size_(m_pHeader->numEnvironmentRefs) const MRMFILE_ENVIRONMENT_REF* m_pFileEnvironmentRefs;
|
||||
_Field_size_(m_pHeader->numResourceValueTypes) const DEF_ATOM* m_pResourceValueTypes;
|
||||
|
|
Загрузка…
Ссылка в новой задаче