Skip to content
Snippets Groups Projects

armem/dev => master

Merged Fabian Reister requested to merge armem/dev into master
2 files
+ 6
33
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -51,28 +51,9 @@ namespace armarx::armem::attachment
memoryReader.setReadingMemory(result.proxy);
}
std::optional<armem::MemoryID> Writer::add(const ObjectAttachment& attachment)
{
return commit(attachment, true);
}
std::optional<armem::MemoryID> Writer::remove(const ObjectAttachment& attachment)
std::optional<armem::MemoryID> Writer::commit(const ObjectAttachment& attachment)
{
return commit(attachment, false);
}
std::optional<armem::MemoryID> Writer::add(const ArticulatedObjectAttachment& attachment)
{
return commit(attachment, true);
}
std::optional<armem::MemoryID> Writer::remove(const ArticulatedObjectAttachment& attachment)
{
return commit(attachment, false);
}
std::optional<armem::MemoryID> Writer::commit(const ObjectAttachment& attachment, const bool active){
std::lock_guard g{memoryWriterMutex};
const auto result = memoryWriter.addSegment(properties.coreAttachmentsSegmentName, properties.providerName);
@@ -96,7 +77,6 @@ namespace armarx::armem::attachment
arondto::attachment::ObjectAttachment aronAttachment;
toAron(aronAttachment, attachment);
aronAttachment.active = active;
update.instancesData = {aronAttachment.toAron()};
update.timeCreated = timestamp;
@@ -116,7 +96,8 @@ namespace armarx::armem::attachment
}
std::optional<armem::MemoryID> Writer::commit(const ArticulatedObjectAttachment& attachment, const bool active){
std::optional<armem::MemoryID> Writer::commit(const ArticulatedObjectAttachment& attachment)
{
std::lock_guard g{memoryWriterMutex};
const auto result = memoryWriter.addSegment(properties.coreAttachmentsSegmentName, properties.providerName);
@@ -140,7 +121,6 @@ namespace armarx::armem::attachment
arondto::attachment::ArticulatedObjectAttachment aronAttachment;
toAron(aronAttachment, attachment);
aronAttachment.active = active;
update.instancesData = {aronAttachment.toAron()};
update.timeCreated = timestamp;
@@ -159,6 +139,6 @@ namespace armarx::armem::attachment
return updateResult.snapshotID;
}
} // namespace armarx::armem::attachment
\ No newline at end of file
Loading