Cleaned smart pointer aliases and node/reg/inst keys
Scoped the aliases within the classes requiring them. Made separate
aliases for pointers and constant pointers. Created node/register
key aliases.
Change-Id: Iaed5ed7955d781c77e5c294351851c1523c6e28e
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
diff --git a/src/chip_data/hei_chip_data.cpp b/src/chip_data/hei_chip_data.cpp
index 463e9ae..83c7a3d 100644
--- a/src/chip_data/hei_chip_data.cpp
+++ b/src/chip_data/hei_chip_data.cpp
@@ -23,7 +23,7 @@
//------------------------------------------------------------------------------
-void __readRegister(ChipDataStream& io_stream, IsolationChipPtr& io_isoChip)
+void __readRegister(ChipDataStream& io_stream, IsolationChip::Ptr& io_isoChip)
{
// Read the register metadata.
RegisterId_t id;
@@ -49,7 +49,7 @@
// Get this register from the flyweight factory.
auto& factory = Flyweight<const ScomRegister>::getSingleton();
- HardwareRegisterPtr hwReg = factory.get(id, inst, attr, addr);
+ auto hwReg = factory.get(id, inst, attr, addr);
// Add this register to the isolation chip.
io_isoChip->addHardwareRegister(hwReg);
@@ -61,7 +61,7 @@
// Get this register from the flyweight factory.
auto& factory = Flyweight<const IdScomRegister>::getSingleton();
- HardwareRegisterPtr hwReg = factory.get(id, inst, attr, addr);
+ auto hwReg = factory.get(id, inst, attr, addr);
// Add this register to the isolation chip.
io_isoChip->addHardwareRegister(hwReg);
@@ -147,7 +147,7 @@
//------------------------------------------------------------------------------
-void __readNode(ChipDataStream& io_stream, IsolationChipPtr& io_isoChip)
+void __readNode(ChipDataStream& io_stream, IsolationChip::Ptr& io_isoChip)
{
// Read the node metadata.
NodeId_t nodeId;
@@ -191,7 +191,7 @@
//------------------------------------------------------------------------------
-void __readRoot(ChipDataStream& io_stream, IsolationChipPtr& io_isoChip)
+void __readRoot(ChipDataStream& io_stream, IsolationChip::Ptr& io_isoChip)
{
AttentionType_t attnType;
NodeId_t id;
@@ -202,7 +202,7 @@
//------------------------------------------------------------------------------
void parseChipDataFile(void* i_buffer, size_t i_bufferSize,
- IsolationChipMap& io_isoChips)
+ IsolationChip::Map& io_isoChips)
{
ChipDataStream stream{i_buffer, i_bufferSize};
diff --git a/src/chip_data/hei_chip_data.hpp b/src/chip_data/hei_chip_data.hpp
index f35cdc1..8b70def 100644
--- a/src/chip_data/hei_chip_data.hpp
+++ b/src/chip_data/hei_chip_data.hpp
@@ -20,6 +20,6 @@
* for each of the user applications chip types.
*/
void parseChipDataFile(void* i_buffer, size_t i_bufferSize,
- IsolationChipMap& io_isoChips);
+ IsolationChip::Map& io_isoChips);
} // end namespace libhei