aboutsummaryrefslogtreecommitdiff
path: root/thirdparty/raw_pdb/src/PDB_NamesStream.cpp
blob: fae895e2bf1f0e2fd7be8b633ca9493b2a11b4b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2011-2022, Molecular Matters GmbH <[email protected]>
// See LICENSE.txt for licensing details (2-clause BSD License: https://opensource.org/licenses/BSD-2-Clause)

#include "PDB_PCH.h"
#include "PDB_NamesStream.h"
#include "PDB_RawFile.h"


// ------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------
PDB::NamesStream::NamesStream(void) PDB_NO_EXCEPT
	: m_stream()
	, m_header(nullptr)
	, m_stringTable(nullptr)
{
}


// ------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------
PDB::NamesStream::NamesStream(const RawFile& file, uint32_t streamIndex) PDB_NO_EXCEPT
	: m_stream(file.CreateMSFStream<CoalescedMSFStream>(streamIndex))
	, m_header(m_stream.GetDataAtOffset<const NamesHeader>(0u))
	, m_stringTable(nullptr)
{
	// grab a pointer into the string table
	m_stringTable = m_stream.GetDataAtOffset<char>(sizeof(NamesHeader));
}