mirror of
https://github.com/AxioDL/amuse.git
synced 2025-12-08 13:14:58 +00:00
General: Be explicit about athena's Endian type
Allows this code to still compile if the enum is ever changed into an enum class.
This commit is contained in:
@@ -67,7 +67,7 @@ struct MakeDefaultCmdOp {
|
||||
case amuse::SoundMacro::CmdIntrospection::Field::Type::SoundMacroStep:
|
||||
case amuse::SoundMacro::CmdIntrospection::Field::Type::TableId:
|
||||
case amuse::SoundMacro::CmdIntrospection::Field::Type::SampleId:
|
||||
AccessField<SoundMacroIdDNA<athena::Little>>(ret.get(), field).id = uint16_t(field.m_default);
|
||||
AccessField<SoundMacroIdDNA<athena::Endian::Little>>(ret.get(), field).id = uint16_t(field.m_default);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -188,8 +188,8 @@ AudioGroupPool AudioGroupPool::_AudioGroupPool(athena::io::IStreamReader& r) {
|
||||
|
||||
return ret;
|
||||
}
|
||||
template AudioGroupPool AudioGroupPool::_AudioGroupPool<athena::Big>(athena::io::IStreamReader& r);
|
||||
template AudioGroupPool AudioGroupPool::_AudioGroupPool<athena::Little>(athena::io::IStreamReader& r);
|
||||
template AudioGroupPool AudioGroupPool::_AudioGroupPool<athena::Endian::Big>(athena::io::IStreamReader& r);
|
||||
template AudioGroupPool AudioGroupPool::_AudioGroupPool<athena::Endian::Little>(athena::io::IStreamReader& r);
|
||||
|
||||
AudioGroupPool AudioGroupPool::CreateAudioGroupPool(const AudioGroupData& data) {
|
||||
if (data.getPoolSize() < 16)
|
||||
@@ -197,9 +197,9 @@ AudioGroupPool AudioGroupPool::CreateAudioGroupPool(const AudioGroupData& data)
|
||||
athena::io::MemoryReader r(data.getPool(), data.getPoolSize());
|
||||
switch (data.getDataFormat()) {
|
||||
case DataFormat::PC:
|
||||
return _AudioGroupPool<athena::Little>(r);
|
||||
return _AudioGroupPool<athena::Endian::Little>(r);
|
||||
default:
|
||||
return _AudioGroupPool<athena::Big>(r);
|
||||
return _AudioGroupPool<athena::Endian::Big>(r);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,8 +339,8 @@ void SoundMacro::readCmds(athena::io::IStreamReader& r, uint32_t size) {
|
||||
m_cmds.push_back(CmdDo<MakeCmdOp, std::unique_ptr<ICmd>>(mr));
|
||||
}
|
||||
}
|
||||
template void SoundMacro::readCmds<athena::Big>(athena::io::IStreamReader& r, uint32_t size);
|
||||
template void SoundMacro::readCmds<athena::Little>(athena::io::IStreamReader& r, uint32_t size);
|
||||
template void SoundMacro::readCmds<athena::Endian::Big>(athena::io::IStreamReader& r, uint32_t size);
|
||||
template void SoundMacro::readCmds<athena::Endian::Little>(athena::io::IStreamReader& r, uint32_t size);
|
||||
|
||||
template <athena::Endian DNAE>
|
||||
void SoundMacro::writeCmds(athena::io::IStreamWriter& w) const {
|
||||
@@ -352,8 +352,8 @@ void SoundMacro::writeCmds(athena::io::IStreamWriter& w) const {
|
||||
athena::io::Write<athena::io::PropType::None>::Do<decltype(data), DNAE>({}, data, w);
|
||||
}
|
||||
}
|
||||
template void SoundMacro::writeCmds<athena::Big>(athena::io::IStreamWriter& w) const;
|
||||
template void SoundMacro::writeCmds<athena::Little>(athena::io::IStreamWriter& w) const;
|
||||
template void SoundMacro::writeCmds<athena::Endian::Big>(athena::io::IStreamWriter& w) const;
|
||||
template void SoundMacro::writeCmds<athena::Endian::Little>(athena::io::IStreamWriter& w) const;
|
||||
|
||||
void SoundMacro::buildFromPrototype(const SoundMacro& other) {
|
||||
m_cmds.reserve(other.m_cmds.size());
|
||||
@@ -1101,8 +1101,8 @@ std::vector<uint8_t> AudioGroupPool::toData() const {
|
||||
|
||||
return fo.data();
|
||||
}
|
||||
template std::vector<uint8_t> AudioGroupPool::toData<athena::Big>() const;
|
||||
template std::vector<uint8_t> AudioGroupPool::toData<athena::Little>() const;
|
||||
template std::vector<uint8_t> AudioGroupPool::toData<athena::Endian::Big>() const;
|
||||
template std::vector<uint8_t> AudioGroupPool::toData<athena::Endian::Little>() const;
|
||||
|
||||
template <>
|
||||
void amuse::Curve::Enumerate<LittleDNA::Read>(athena::io::IStreamReader& r) {
|
||||
|
||||
@@ -82,7 +82,7 @@ static void WriteRangedObjectIds(athena::io::IStreamWriter& w, const T& list) {
|
||||
|
||||
AudioGroupProject::AudioGroupProject(athena::io::IStreamReader& r, GCNDataTag) {
|
||||
while (!AtEnd32(r)) {
|
||||
GroupHeader<athena::Big> header;
|
||||
GroupHeader<athena::Endian::Big> header;
|
||||
header.read(r);
|
||||
|
||||
if (GroupId::CurNameDB)
|
||||
@@ -92,31 +92,31 @@ AudioGroupProject::AudioGroupProject(athena::io::IStreamReader& r, GCNDataTag) {
|
||||
/* Sound Macros */
|
||||
r.seek(header.soundMacroIdsOff, athena::SeekOrigin::Begin);
|
||||
while (!AtEnd16(r)) {
|
||||
ReadRangedObjectIds<athena::Big>(SoundMacroId::CurNameDB, r, NameDB::Type::SoundMacro);
|
||||
ReadRangedObjectIds<athena::Endian::Big>(SoundMacroId::CurNameDB, r, NameDB::Type::SoundMacro);
|
||||
}
|
||||
|
||||
/* Samples */
|
||||
r.seek(header.samplIdsOff, athena::SeekOrigin::Begin);
|
||||
while (!AtEnd16(r)) {
|
||||
ReadRangedObjectIds<athena::Big>(SampleId::CurNameDB, r, NameDB::Type::Sample);
|
||||
ReadRangedObjectIds<athena::Endian::Big>(SampleId::CurNameDB, r, NameDB::Type::Sample);
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
r.seek(header.tableIdsOff, athena::SeekOrigin::Begin);
|
||||
while (!AtEnd16(r)) {
|
||||
ReadRangedObjectIds<athena::Big>(TableId::CurNameDB, r, NameDB::Type::Table);
|
||||
ReadRangedObjectIds<athena::Endian::Big>(TableId::CurNameDB, r, NameDB::Type::Table);
|
||||
}
|
||||
|
||||
/* Keymaps */
|
||||
r.seek(header.keymapIdsOff, athena::SeekOrigin::Begin);
|
||||
while (!AtEnd16(r)) {
|
||||
ReadRangedObjectIds<athena::Big>(KeymapId::CurNameDB, r, NameDB::Type::Keymap);
|
||||
ReadRangedObjectIds<athena::Endian::Big>(KeymapId::CurNameDB, r, NameDB::Type::Keymap);
|
||||
}
|
||||
|
||||
/* Layers */
|
||||
r.seek(header.layerIdsOff, athena::SeekOrigin::Begin);
|
||||
while (!AtEnd16(r)) {
|
||||
ReadRangedObjectIds<athena::Big>(LayersId::CurNameDB, r, NameDB::Type::Layer);
|
||||
ReadRangedObjectIds<athena::Endian::Big>(LayersId::CurNameDB, r, NameDB::Type::Layer);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -127,7 +127,7 @@ AudioGroupProject::AudioGroupProject(athena::io::IStreamReader& r, GCNDataTag) {
|
||||
/* Normal pages */
|
||||
r.seek(header.pageTableOff, athena::SeekOrigin::Begin);
|
||||
while (!AtEnd64(r)) {
|
||||
SongGroupIndex::PageEntryDNA<athena::Big> entry;
|
||||
SongGroupIndex::PageEntryDNA<athena::Endian::Big> entry;
|
||||
entry.read(r);
|
||||
idx->m_normPages[entry.programNo] = entry;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ AudioGroupProject::AudioGroupProject(athena::io::IStreamReader& r, GCNDataTag) {
|
||||
/* Drum pages */
|
||||
r.seek(header.drumTableOff, athena::SeekOrigin::Begin);
|
||||
while (!AtEnd64(r)) {
|
||||
SongGroupIndex::PageEntryDNA<athena::Big> entry;
|
||||
SongGroupIndex::PageEntryDNA<athena::Endian::Big> entry;
|
||||
entry.read(r);
|
||||
idx->m_drumPages[entry.programNo] = entry;
|
||||
}
|
||||
@@ -163,7 +163,7 @@ AudioGroupProject::AudioGroupProject(athena::io::IStreamReader& r, GCNDataTag) {
|
||||
r.seek(2, athena::SeekOrigin::Current);
|
||||
idx->m_sfxEntries.reserve(count);
|
||||
for (int i = 0; i < count; ++i) {
|
||||
SFXGroupIndex::SFXEntryDNA<athena::Big> entry;
|
||||
SFXGroupIndex::SFXEntryDNA<athena::Endian::Big> entry;
|
||||
entry.read(r);
|
||||
idx->m_sfxEntries[entry.sfxId.id] = entry;
|
||||
if (SFXId::CurNameDB)
|
||||
@@ -321,9 +321,9 @@ AudioGroupProject AudioGroupProject::CreateAudioGroupProject(const AudioGroupDat
|
||||
default:
|
||||
return AudioGroupProject(r, GCNDataTag{});
|
||||
case DataFormat::N64:
|
||||
return _AudioGroupProject<athena::Big>(r, data.getAbsoluteProjOffsets());
|
||||
return _AudioGroupProject<athena::Endian::Big>(r, data.getAbsoluteProjOffsets());
|
||||
case DataFormat::PC:
|
||||
return _AudioGroupProject<athena::Little>(r, data.getAbsoluteProjOffsets());
|
||||
return _AudioGroupProject<athena::Endian::Little>(r, data.getAbsoluteProjOffsets());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -459,7 +459,7 @@ AudioGroupProject AudioGroupProject::CreateAudioGroupProject(const AudioGroupPro
|
||||
|
||||
void AudioGroupProject::BootstrapObjectIDs(athena::io::IStreamReader& r, GCNDataTag) {
|
||||
while (!AtEnd32(r)) {
|
||||
GroupHeader<athena::Big> header;
|
||||
GroupHeader<athena::Endian::Big> header;
|
||||
header.read(r);
|
||||
|
||||
GroupId::CurNameDB->registerPair(NameDB::generateName(header.groupId, NameDB::Type::Group), header.groupId);
|
||||
@@ -467,30 +467,30 @@ void AudioGroupProject::BootstrapObjectIDs(athena::io::IStreamReader& r, GCNData
|
||||
/* Sound Macros */
|
||||
r.seek(header.soundMacroIdsOff, athena::SeekOrigin::Begin);
|
||||
while (!AtEnd16(r))
|
||||
ReadRangedObjectIds<athena::Big>(SoundMacroId::CurNameDB, r, NameDB::Type::SoundMacro);
|
||||
ReadRangedObjectIds<athena::Endian::Big>(SoundMacroId::CurNameDB, r, NameDB::Type::SoundMacro);
|
||||
|
||||
/* Samples */
|
||||
r.seek(header.samplIdsOff, athena::SeekOrigin::Begin);
|
||||
while (!AtEnd16(r)) {
|
||||
ReadRangedObjectIds<athena::Big>(SampleId::CurNameDB, r, NameDB::Type::Sample);
|
||||
ReadRangedObjectIds<athena::Endian::Big>(SampleId::CurNameDB, r, NameDB::Type::Sample);
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
r.seek(header.tableIdsOff, athena::SeekOrigin::Begin);
|
||||
while (!AtEnd16(r)) {
|
||||
ReadRangedObjectIds<athena::Big>(TableId::CurNameDB, r, NameDB::Type::Table);
|
||||
ReadRangedObjectIds<athena::Endian::Big>(TableId::CurNameDB, r, NameDB::Type::Table);
|
||||
}
|
||||
|
||||
/* Keymaps */
|
||||
r.seek(header.keymapIdsOff, athena::SeekOrigin::Begin);
|
||||
while (!AtEnd16(r)) {
|
||||
ReadRangedObjectIds<athena::Big>(KeymapId::CurNameDB, r, NameDB::Type::Keymap);
|
||||
ReadRangedObjectIds<athena::Endian::Big>(KeymapId::CurNameDB, r, NameDB::Type::Keymap);
|
||||
}
|
||||
|
||||
/* Layers */
|
||||
r.seek(header.layerIdsOff, athena::SeekOrigin::Begin);
|
||||
while (!AtEnd16(r)) {
|
||||
ReadRangedObjectIds<athena::Big>(LayersId::CurNameDB, r, NameDB::Type::Layer);
|
||||
ReadRangedObjectIds<athena::Endian::Big>(LayersId::CurNameDB, r, NameDB::Type::Layer);
|
||||
}
|
||||
|
||||
if (header.type == GroupType::Song) {
|
||||
@@ -507,7 +507,7 @@ void AudioGroupProject::BootstrapObjectIDs(athena::io::IStreamReader& r, GCNData
|
||||
uint16_t count = r.readUint16Big();
|
||||
r.seek(2, athena::SeekOrigin::Current);
|
||||
for (int i = 0; i < count; ++i) {
|
||||
SFXGroupIndex::SFXEntryDNA<athena::Big> entry;
|
||||
SFXGroupIndex::SFXEntryDNA<athena::Endian::Big> entry;
|
||||
entry.read(r);
|
||||
SFXId::CurNameDB->registerPair(NameDB::generateName(entry.sfxId.id, NameDB::Type::SFX), entry.sfxId.id);
|
||||
}
|
||||
@@ -606,10 +606,10 @@ void AudioGroupProject::BootstrapObjectIDs(const AudioGroupData& data) {
|
||||
BootstrapObjectIDs(r, GCNDataTag{});
|
||||
break;
|
||||
case DataFormat::N64:
|
||||
BootstrapObjectIDs<athena::Big>(r, data.getAbsoluteProjOffsets());
|
||||
BootstrapObjectIDs<athena::Endian::Big>(r, data.getAbsoluteProjOffsets());
|
||||
break;
|
||||
case DataFormat::PC:
|
||||
BootstrapObjectIDs<athena::Little>(r, data.getAbsoluteProjOffsets());
|
||||
BootstrapObjectIDs<athena::Endian::Little>(r, data.getAbsoluteProjOffsets());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -820,7 +820,7 @@ struct ObjectIdPool
|
||||
|
||||
std::vector<uint8_t> AudioGroupProject::toGCNData(const AudioGroupPool& pool,
|
||||
const AudioGroupSampleDirectory& sdir) const {
|
||||
constexpr athena::Endian DNAE = athena::Big;
|
||||
constexpr athena::Endian DNAE = athena::Endian::Big;
|
||||
|
||||
athena::io::VectorWriter fo;
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ void AudioGroupSampleDirectory::ADPCMParms::swapBigVADPCM() {
|
||||
|
||||
AudioGroupSampleDirectory::AudioGroupSampleDirectory(athena::io::IStreamReader& r, GCNDataTag) {
|
||||
while (!AtEnd32(r)) {
|
||||
EntryDNA<athena::Big> ent;
|
||||
EntryDNA<athena::Endian::Big> ent;
|
||||
ent.read(r);
|
||||
m_entries[ent.m_sfxId] = MakeObj<Entry>(ent);
|
||||
if (SampleId::CurNameDB)
|
||||
@@ -66,14 +66,14 @@ AudioGroupSampleDirectory::AudioGroupSampleDirectory(athena::io::IStreamReader&
|
||||
bool absOffs, N64DataTag) {
|
||||
if (absOffs) {
|
||||
while (!AtEnd32(r)) {
|
||||
MusyX1AbsSdirEntry<athena::Big> ent;
|
||||
MusyX1AbsSdirEntry<athena::Endian::Big> ent;
|
||||
ent.read(r);
|
||||
m_entries[ent.m_sfxId] = MakeObj<Entry>(ent);
|
||||
SampleId::CurNameDB->registerPair(NameDB::generateName(ent.m_sfxId, NameDB::Type::Sample), ent.m_sfxId);
|
||||
}
|
||||
} else {
|
||||
while (!AtEnd32(r)) {
|
||||
MusyX1SdirEntry<athena::Big> ent;
|
||||
MusyX1SdirEntry<athena::Endian::Big> ent;
|
||||
ent.read(r);
|
||||
m_entries[ent.m_sfxId] = MakeObj<Entry>(ent);
|
||||
SampleId::CurNameDB->registerPair(NameDB::generateName(ent.m_sfxId, NameDB::Type::Sample), ent.m_sfxId);
|
||||
@@ -89,7 +89,7 @@ AudioGroupSampleDirectory::AudioGroupSampleDirectory(athena::io::IStreamReader&
|
||||
AudioGroupSampleDirectory::AudioGroupSampleDirectory(athena::io::IStreamReader& r, bool absOffs, PCDataTag) {
|
||||
if (absOffs) {
|
||||
while (!AtEnd32(r)) {
|
||||
MusyX1AbsSdirEntry<athena::Little> ent;
|
||||
MusyX1AbsSdirEntry<athena::Endian::Little> ent;
|
||||
ent.read(r);
|
||||
auto& store = m_entries[ent.m_sfxId];
|
||||
store = MakeObj<Entry>(ent);
|
||||
@@ -98,7 +98,7 @@ AudioGroupSampleDirectory::AudioGroupSampleDirectory(athena::io::IStreamReader&
|
||||
}
|
||||
} else {
|
||||
while (!AtEnd32(r)) {
|
||||
MusyX1SdirEntry<athena::Little> ent;
|
||||
MusyX1SdirEntry<athena::Endian::Little> ent;
|
||||
ent.read(r);
|
||||
auto& store = m_entries[ent.m_sfxId];
|
||||
store = MakeObj<Entry>(ent);
|
||||
@@ -877,7 +877,7 @@ void AudioGroupSampleDirectory::reloadSampleData(SystemStringView groupPath) {
|
||||
|
||||
std::pair<std::vector<uint8_t>, std::vector<uint8_t>>
|
||||
AudioGroupSampleDirectory::toGCNData(const AudioGroupDatabase& group) const {
|
||||
constexpr athena::Endian DNAE = athena::Big;
|
||||
constexpr athena::Endian DNAE = athena::Endian::Big;
|
||||
|
||||
athena::io::VectorWriter fo;
|
||||
athena::io::VectorWriter sfo;
|
||||
|
||||
@@ -49,52 +49,52 @@ bool Copy(const SystemChar* from, const SystemChar* to) {
|
||||
thread_local NameDB* type::CurNameDB = nullptr; \
|
||||
template <> \
|
||||
template <> \
|
||||
void type##DNA<athena::Little>::Enumerate<BigDNA::Read>(athena::io::IStreamReader & reader) { \
|
||||
void type##DNA<athena::Endian::Little>::Enumerate<BigDNA::Read>(athena::io::IStreamReader& reader) { \
|
||||
id = reader.readUint16Little(); \
|
||||
} \
|
||||
template <> \
|
||||
template <> \
|
||||
void type##DNA<athena::Little>::Enumerate<BigDNA::Write>(athena::io::IStreamWriter & writer) { \
|
||||
void type##DNA<athena::Endian::Little>::Enumerate<BigDNA::Write>(athena::io::IStreamWriter& writer) { \
|
||||
writer.writeUint16Little(id.id); \
|
||||
} \
|
||||
template <> \
|
||||
template <> \
|
||||
void type##DNA<athena::Little>::Enumerate<BigDNA::BinarySize>(size_t & sz) { \
|
||||
void type##DNA<athena::Endian::Little>::Enumerate<BigDNA::BinarySize>(size_t& sz) { \
|
||||
sz += 2; \
|
||||
} \
|
||||
template <> \
|
||||
template <> \
|
||||
void type##DNA<athena::Little>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader & reader) { \
|
||||
void type##DNA<athena::Endian::Little>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader& reader) { \
|
||||
_read(reader); \
|
||||
} \
|
||||
template <> \
|
||||
template <> \
|
||||
void type##DNA<athena::Little>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter & writer) { \
|
||||
void type##DNA<athena::Endian::Little>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) { \
|
||||
_write(writer); \
|
||||
} \
|
||||
template <> \
|
||||
template <> \
|
||||
void type##DNA<athena::Big>::Enumerate<BigDNA::Read>(athena::io::IStreamReader & reader) { \
|
||||
void type##DNA<athena::Endian::Big>::Enumerate<BigDNA::Read>(athena::io::IStreamReader& reader) { \
|
||||
id = reader.readUint16Big(); \
|
||||
} \
|
||||
template <> \
|
||||
template <> \
|
||||
void type##DNA<athena::Big>::Enumerate<BigDNA::Write>(athena::io::IStreamWriter & writer) { \
|
||||
void type##DNA<athena::Endian::Big>::Enumerate<BigDNA::Write>(athena::io::IStreamWriter& writer) { \
|
||||
writer.writeUint16Big(id.id); \
|
||||
} \
|
||||
template <> \
|
||||
template <> \
|
||||
void type##DNA<athena::Big>::Enumerate<BigDNA::BinarySize>(size_t & sz) { \
|
||||
void type##DNA<athena::Endian::Big>::Enumerate<BigDNA::BinarySize>(size_t& sz) { \
|
||||
sz += 2; \
|
||||
} \
|
||||
template <> \
|
||||
template <> \
|
||||
void type##DNA<athena::Big>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader & reader) { \
|
||||
void type##DNA<athena::Endian::Big>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader& reader) { \
|
||||
_read(reader); \
|
||||
} \
|
||||
template <> \
|
||||
template <> \
|
||||
void type##DNA<athena::Big>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter & writer) { \
|
||||
void type##DNA<athena::Endian::Big>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) { \
|
||||
_write(writer); \
|
||||
} \
|
||||
template <athena::Endian DNAE> \
|
||||
@@ -122,8 +122,8 @@ bool Copy(const SystemChar* from, const SystemChar* to) {
|
||||
const char* type##DNA<DNAE>::DNAType() { \
|
||||
return "amuse::" #type "DNA"; \
|
||||
} \
|
||||
template struct type##DNA<athena::Big>; \
|
||||
template struct type##DNA<athena::Little>;
|
||||
template struct type##DNA<athena::Endian::Big>; \
|
||||
template struct type##DNA<athena::Endian::Little>;
|
||||
|
||||
DEFINE_ID_TYPE(ObjectId, "object")
|
||||
DEFINE_ID_TYPE(SoundMacroId, "SoundMacro")
|
||||
@@ -137,52 +137,52 @@ DEFINE_ID_TYPE(GroupId, "group")
|
||||
|
||||
template <>
|
||||
template <>
|
||||
void PageObjectIdDNA<athena::Little>::Enumerate<BigDNA::Read>(athena::io::IStreamReader& reader) {
|
||||
void PageObjectIdDNA<athena::Endian::Little>::Enumerate<BigDNA::Read>(athena::io::IStreamReader& reader) {
|
||||
id = reader.readUint16Little();
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void PageObjectIdDNA<athena::Little>::Enumerate<BigDNA::Write>(athena::io::IStreamWriter& writer) {
|
||||
void PageObjectIdDNA<athena::Endian::Little>::Enumerate<BigDNA::Write>(athena::io::IStreamWriter& writer) {
|
||||
writer.writeUint16Little(id.id);
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void PageObjectIdDNA<athena::Little>::Enumerate<BigDNA::BinarySize>(size_t& sz) {
|
||||
void PageObjectIdDNA<athena::Endian::Little>::Enumerate<BigDNA::BinarySize>(size_t& sz) {
|
||||
sz += 2;
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void PageObjectIdDNA<athena::Little>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader& reader) {
|
||||
void PageObjectIdDNA<athena::Endian::Little>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader& reader) {
|
||||
_read(reader);
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void PageObjectIdDNA<athena::Little>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
|
||||
void PageObjectIdDNA<athena::Endian::Little>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
|
||||
_write(writer);
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void PageObjectIdDNA<athena::Big>::Enumerate<BigDNA::Read>(athena::io::IStreamReader& reader) {
|
||||
void PageObjectIdDNA<athena::Endian::Big>::Enumerate<BigDNA::Read>(athena::io::IStreamReader& reader) {
|
||||
id = reader.readUint16Big();
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void PageObjectIdDNA<athena::Big>::Enumerate<BigDNA::Write>(athena::io::IStreamWriter& writer) {
|
||||
void PageObjectIdDNA<athena::Endian::Big>::Enumerate<BigDNA::Write>(athena::io::IStreamWriter& writer) {
|
||||
writer.writeUint16Big(id.id);
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void PageObjectIdDNA<athena::Big>::Enumerate<BigDNA::BinarySize>(size_t& sz) {
|
||||
void PageObjectIdDNA<athena::Endian::Big>::Enumerate<BigDNA::BinarySize>(size_t& sz) {
|
||||
sz += 2;
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void PageObjectIdDNA<athena::Big>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader& reader) {
|
||||
void PageObjectIdDNA<athena::Endian::Big>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader& reader) {
|
||||
_read(reader);
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void PageObjectIdDNA<athena::Big>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
|
||||
void PageObjectIdDNA<athena::Endian::Big>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
|
||||
_write(writer);
|
||||
}
|
||||
template <athena::Endian DNAE>
|
||||
@@ -232,65 +232,65 @@ template <athena::Endian DNAE>
|
||||
const char* PageObjectIdDNA<DNAE>::DNAType() {
|
||||
return "amuse::PageObjectIdDNA";
|
||||
}
|
||||
template struct PageObjectIdDNA<athena::Big>;
|
||||
template struct PageObjectIdDNA<athena::Little>;
|
||||
template struct PageObjectIdDNA<athena::Endian::Big>;
|
||||
template struct PageObjectIdDNA<athena::Endian::Little>;
|
||||
|
||||
template <>
|
||||
template <>
|
||||
void SoundMacroStepDNA<athena::Little>::Enumerate<BigDNA::Read>(athena::io::IStreamReader& reader) {
|
||||
void SoundMacroStepDNA<athena::Endian::Little>::Enumerate<BigDNA::Read>(athena::io::IStreamReader& reader) {
|
||||
step = reader.readUint16Little();
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void SoundMacroStepDNA<athena::Little>::Enumerate<BigDNA::Write>(athena::io::IStreamWriter& writer) {
|
||||
void SoundMacroStepDNA<athena::Endian::Little>::Enumerate<BigDNA::Write>(athena::io::IStreamWriter& writer) {
|
||||
writer.writeUint16Little(step);
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void SoundMacroStepDNA<athena::Little>::Enumerate<BigDNA::BinarySize>(size_t& sz) {
|
||||
void SoundMacroStepDNA<athena::Endian::Little>::Enumerate<BigDNA::BinarySize>(size_t& sz) {
|
||||
sz += 2;
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void SoundMacroStepDNA<athena::Little>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader& reader) {
|
||||
void SoundMacroStepDNA<athena::Endian::Little>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader& reader) {
|
||||
step = reader.readUint16(nullptr);
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void SoundMacroStepDNA<athena::Little>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
|
||||
void SoundMacroStepDNA<athena::Endian::Little>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
|
||||
writer.writeUint16(nullptr, step);
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void SoundMacroStepDNA<athena::Big>::Enumerate<BigDNA::Read>(athena::io::IStreamReader& reader) {
|
||||
void SoundMacroStepDNA<athena::Endian::Big>::Enumerate<BigDNA::Read>(athena::io::IStreamReader& reader) {
|
||||
step = reader.readUint16Big();
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void SoundMacroStepDNA<athena::Big>::Enumerate<BigDNA::Write>(athena::io::IStreamWriter& writer) {
|
||||
void SoundMacroStepDNA<athena::Endian::Big>::Enumerate<BigDNA::Write>(athena::io::IStreamWriter& writer) {
|
||||
writer.writeUint16Big(step);
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void SoundMacroStepDNA<athena::Big>::Enumerate<BigDNA::BinarySize>(size_t& sz) {
|
||||
void SoundMacroStepDNA<athena::Endian::Big>::Enumerate<BigDNA::BinarySize>(size_t& sz) {
|
||||
sz += 2;
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void SoundMacroStepDNA<athena::Big>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader& reader) {
|
||||
void SoundMacroStepDNA<athena::Endian::Big>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader& reader) {
|
||||
step = reader.readUint16(nullptr);
|
||||
}
|
||||
template <>
|
||||
template <>
|
||||
void SoundMacroStepDNA<athena::Big>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
|
||||
void SoundMacroStepDNA<athena::Endian::Big>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
|
||||
writer.writeUint16(nullptr, step);
|
||||
}
|
||||
template <athena::Endian DNAE>
|
||||
const char* SoundMacroStepDNA<DNAE>::DNAType() {
|
||||
return "amuse::SoundMacroStepDNA";
|
||||
}
|
||||
template struct SoundMacroStepDNA<athena::Big>;
|
||||
template struct SoundMacroStepDNA<athena::Little>;
|
||||
template struct SoundMacroStepDNA<athena::Endian::Big>;
|
||||
template struct SoundMacroStepDNA<athena::Endian::Little>;
|
||||
|
||||
ObjectId NameDB::generateId(Type tp) const {
|
||||
uint16_t maxMatch = 0;
|
||||
|
||||
@@ -163,19 +163,19 @@ constexpr SoundMacro::CmdIntrospection::Field::Type GetFieldType<atUint32>() {
|
||||
return SoundMacro::CmdIntrospection::Field::Type::UInt32;
|
||||
}
|
||||
template <>
|
||||
constexpr SoundMacro::CmdIntrospection::Field::Type GetFieldType<SoundMacroIdDNA<athena::Little>>() {
|
||||
constexpr SoundMacro::CmdIntrospection::Field::Type GetFieldType<SoundMacroIdDNA<athena::Endian::Little>>() {
|
||||
return SoundMacro::CmdIntrospection::Field::Type::SoundMacroId;
|
||||
}
|
||||
template <>
|
||||
constexpr SoundMacro::CmdIntrospection::Field::Type GetFieldType<SoundMacroStepDNA<athena::Little>>() {
|
||||
constexpr SoundMacro::CmdIntrospection::Field::Type GetFieldType<SoundMacroStepDNA<athena::Endian::Little>>() {
|
||||
return SoundMacro::CmdIntrospection::Field::Type::SoundMacroStep;
|
||||
}
|
||||
template <>
|
||||
constexpr SoundMacro::CmdIntrospection::Field::Type GetFieldType<TableIdDNA<athena::Little>>() {
|
||||
constexpr SoundMacro::CmdIntrospection::Field::Type GetFieldType<TableIdDNA<athena::Endian::Little>>() {
|
||||
return SoundMacro::CmdIntrospection::Field::Type::TableId;
|
||||
}
|
||||
template <>
|
||||
constexpr SoundMacro::CmdIntrospection::Field::Type GetFieldType<SampleIdDNA<athena::Little>>() {
|
||||
constexpr SoundMacro::CmdIntrospection::Field::Type GetFieldType<SampleIdDNA<athena::Endian::Little>>() {
|
||||
return SoundMacro::CmdIntrospection::Field::Type::SampleId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user