aboutsummaryrefslogtreecommitdiff
path: root/thirdparty/raw_pdb/src/PDB_NamesStream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/raw_pdb/src/PDB_NamesStream.cpp')
-rw-r--r--thirdparty/raw_pdb/src/PDB_NamesStream.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/thirdparty/raw_pdb/src/PDB_NamesStream.cpp b/thirdparty/raw_pdb/src/PDB_NamesStream.cpp
new file mode 100644
index 000000000..fae895e2b
--- /dev/null
+++ b/thirdparty/raw_pdb/src/PDB_NamesStream.cpp
@@ -0,0 +1,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));
+}