mirror of https://github.com/AxioDL/nod.git
Add DiscBase::getPartitionNodeCount
This commit is contained in:
parent
e86971c9e0
commit
2bc7c4e568
|
@ -277,6 +277,8 @@ public:
|
||||||
beginApploaderReadStream()->read(buf.get(), m_apploaderSz);
|
beginApploaderReadStream()->read(buf.get(), m_apploaderSz);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline size_t getNodeCount() const { return m_nodes.size(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -289,6 +291,13 @@ public:
|
||||||
|
|
||||||
inline const Header& getHeader() const {return m_header;}
|
inline const Header& getHeader() const {return m_header;}
|
||||||
inline const IDiscIO& getDiscIO() const {return *m_discIO;}
|
inline const IDiscIO& getDiscIO() const {return *m_discIO;}
|
||||||
|
inline size_t getPartitonNodeCount(size_t partition = 0) const
|
||||||
|
{
|
||||||
|
if (partition > m_partitions.size())
|
||||||
|
return -1;
|
||||||
|
return m_partitions[partition]->getNodeCount();
|
||||||
|
}
|
||||||
|
|
||||||
inline IPartition* getDataPartition()
|
inline IPartition* getDataPartition()
|
||||||
{
|
{
|
||||||
for (const std::unique_ptr<IPartition>& part : m_partitions)
|
for (const std::unique_ptr<IPartition>& part : m_partitions)
|
||||||
|
@ -308,6 +317,7 @@ public:
|
||||||
for (std::unique_ptr<IPartition>& part : m_partitions)
|
for (std::unique_ptr<IPartition>& part : m_partitions)
|
||||||
part->extractToDirectory(path, ctx);
|
part->extractToDirectory(path, ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class DiscBuilderBase
|
class DiscBuilderBase
|
||||||
|
|
Loading…
Reference in New Issue