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)
 
data::AddSegmentResult addSegment (const MemoryID &providerSegmentID, bool clearWhenExists=false)
 
data::AddSegmentResult addSegment (const std::pair< std::string, std::string > &names, bool clearWhenExists=false)
 
data::AddSegmentResult addSegment (const std::string &coreSegmentName, const std::string &providerSegmentName, bool clearWhenExists=false)
 
data::AddSegmentsResult addSegments (const data::AddSegmentsInput &input)
 
CommitResult commit (const Commit &commit)
 Writes a Commit to the memory. More...
 
data::CommitResult commit (const data::Commit &commit)
 
EntityUpdateResult commit (const EntityUpdate &update)
 Commit a single entity update. More...
 
EntityUpdateResult commit (const MemoryID &entityID, const std::vector< aron::data::DictPtr > &instancesData, Time referencedTime)
 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 12 of file Writer.cpp.

Member Function Documentation

◆ addSegment() [1/4]

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

Definition at line 35 of file Writer.cpp.

+ Here is the call graph for this function:

◆ addSegment() [2/4]

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

Definition at line 25 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 
)

Definition at line 30 of file Writer.cpp.

+ Here is the call graph for this function:

◆ addSegment() [4/4]

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

Definition at line 16 of file Writer.cpp.

+ Here is the caller graph for this function:

◆ addSegments()

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

Definition at line 42 of file Writer.cpp.

+ Here is the caller graph for this function:

◆ commit() [1/4]

CommitResult commit ( const Commit commit)

Writes a Commit to the memory.

Definition at line 51 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)

Definition at line 67 of file Writer.cpp.

+ Here is the call graph for this function:

◆ commit() [3/4]

EntityUpdateResult commit ( const EntityUpdate update)

Commit a single entity update.

Definition at line 74 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 
)

Commit a single entity update.

Definition at line 84 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 97 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: