Writer Class Reference

Helps a memory client sending data to a memory. More...

#include <RobotAPI/libraries/armem/client/Writer.h>

Public Member Functions

data::AddSegmentResult addSegment (const data::AddSegmentInput &input) const
 
data::AddSegmentResult addSegment (const MemoryID &providerSegmentID, bool clearWhenExists=false) const
 
data::AddSegmentResult addSegment (const std::pair< std::string, std::string > &names, bool clearWhenExists=false) const
 
data::AddSegmentResult addSegment (const std::string &coreSegmentName, const std::string &providerSegmentName, bool clearWhenExists=false) const
 
data::AddSegmentsResult addSegments (const data::AddSegmentsInput &input) const
 
CommitResult commit (const Commit &commit) const
 Writes a Commit to the memory. More...
 
data::CommitResult commit (const data::Commit &commit) const
 
EntityUpdateResult commit (const EntityUpdate &update) const
 Commit a single entity update. More...
 
EntityUpdateResult commit (const MemoryID &entityID, const std::vector< aron::data::DictPtr > &instancesData, Time referencedTime) const
 Commit a single entity update. More...
 
 operator bool () const
 
void setWritingMemory (server::WritingMemoryInterfacePrx memory)
 
 Writer (const Writer &)=default
 Construct a memory writer. More...
 
 Writer (server::WritingMemoryInterfacePrx memory=nullptr)
 

Public Attributes

server::WritingMemoryInterfacePrx memory
 

Detailed Description

Helps a memory client sending data to a memory.

You can check whether the writer is ready using the bool operator:

client::Writer writer(writingMemoryProxy);
...
if (writer)
{
writer.commit(...);
}

Definition at line 22 of file Writer.h.

Constructor & Destructor Documentation

◆ Writer() [1/2]

Writer ( const Writer )
default

Construct a memory writer.

Parameters
memoryThe memory proxy.

◆ Writer() [2/2]

Writer ( server::WritingMemoryInterfacePrx  memory = nullptr)

Definition at line 11 of file Writer.cpp.

Member Function Documentation

◆ addSegment() [1/4]

data::AddSegmentResult addSegment ( const data::AddSegmentInput &  input) const

Definition at line 42 of file Writer.cpp.

+ Here is the call graph for this function:

◆ addSegment() [2/4]

data::AddSegmentResult addSegment ( const MemoryID providerSegmentID,
bool  clearWhenExists = false 
) const

Definition at line 28 of file Writer.cpp.

+ Here is the call graph for this function:

◆ addSegment() [3/4]

data::AddSegmentResult addSegment ( const std::pair< std::string, std::string > &  names,
bool  clearWhenExists = false 
) const

Definition at line 36 of file Writer.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSegment() [4/4]

data::AddSegmentResult addSegment ( const std::string &  coreSegmentName,
const std::string &  providerSegmentName,
bool  clearWhenExists = false 
) const

Definition at line 16 of file Writer.cpp.

+ Here is the caller graph for this function:

◆ addSegments()

data::AddSegmentsResult addSegments ( const data::AddSegmentsInput &  input) const

Definition at line 50 of file Writer.cpp.

+ Here is the caller graph for this function:

◆ commit() [1/4]

CommitResult commit ( const Commit commit) const

Writes a Commit to the memory.

Definition at line 59 of file Writer.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ commit() [2/4]

data::CommitResult commit ( const data::Commit &  commit) const

Definition at line 75 of file Writer.cpp.

+ Here is the call graph for this function:

◆ commit() [3/4]

EntityUpdateResult commit ( const EntityUpdate update) const

Commit a single entity update.

Definition at line 82 of file Writer.cpp.

+ Here is the call graph for this function:

◆ commit() [4/4]

EntityUpdateResult commit ( const MemoryID entityID,
const std::vector< aron::data::DictPtr > &  instancesData,
Time  referencedTime 
) const

Commit a single entity update.

Definition at line 93 of file Writer.cpp.

+ Here is the call graph for this function:

◆ operator bool()

operator bool ( ) const
inline

Definition at line 61 of file Writer.h.

◆ setWritingMemory()

void setWritingMemory ( server::WritingMemoryInterfacePrx  memory)

Definition at line 105 of file Writer.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ memory

server::WritingMemoryInterfacePrx memory

Definition at line 72 of file Writer.h.


The documentation for this class was generated from the following files: