ProfileWriter Class Reference

#include <VisionX/libraries/armem_human/client/HumanProfileWriter.h>

+ Inheritance diagram for ProfileWriter:

Public Member Functions

bool commitHumanProfile (const Person &humanProfile, const std::string &provider, const armem::Time &referencedTime, const std::string &entityName="")
 
bool commitHumanProfiles (const std::vector< Person > &humanProfiles, const std::string &provider, const armem::Time &referencedTime, const std::string &entityName)
 
bool commitPreferencesToProfile (const armarx::armem::human::PersonID &personID, const std::string &providerName, const armem::Time &referencedTime, const armarx::armem::human::Preferences preferences)
 
void connect (armem::client::MemoryNameSystem &memoryNameSystem)
 
Properties defaultProperties () const override
 
 ProfileWriter ()
 
std::string propertyPrefix () const override
 
void registerPropertyDefinitions (armarx::PropertyDefinitionsPtr &def)
 
bool setCustomAttributeInProfile (const armarx::armem::human::PersonID &personID, const std::string &providerName, const armem::Time &referencedTime, const std::string key, const std::string value)
 
bool setPreferredDrink (const armarx::armem::human::PersonID &personID, const std::string &providerName, const armem::Time &referencedTime, const std::string &drink)
 Inserts the given drink at the first place of the given humans list of preferred drinks, indicating it is the most favorite drink.
 
 SimpleWriterBase ()
 
 ~ProfileWriter () override
 
- Public Member Functions inherited from SimpleWriterBase
void connect (armarx::armem::client::MemoryNameSystem &mns)
 
void registerPropertyDefinitions (armarx::PropertyDefinitionsPtr &def)
 
 SimpleWriterBase ()
 
virtual ~SimpleWriterBase ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from SimpleWriterBase
armem::client::WritermemoryWriter ()
 
const Propertiesproperties () const
 
void setProperties (const Properties &p)
 

Detailed Description

Definition at line 22 of file HumanProfileWriter.h.

Constructor & Destructor Documentation

◆ ProfileWriter()

Definition at line 12 of file HumanProfileWriter.cpp.

+ Here is the call graph for this function:

◆ ~ProfileWriter()

~ProfileWriter ( )
overridedefault

Member Function Documentation

◆ commitHumanProfile()

bool commitHumanProfile ( const Person & humanProfile,
const std::string & provider,
const armem::Time & referencedTime,
const std::string & entityName = "" )

Definition at line 38 of file HumanProfileWriter.cpp.

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

◆ commitHumanProfiles()

bool commitHumanProfiles ( const std::vector< Person > & humanProfiles,
const std::string & provider,
const armem::Time & referencedTime,
const std::string & entityName )

Definition at line 130 of file HumanProfileWriter.cpp.

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

◆ commitPreferencesToProfile()

bool commitPreferencesToProfile ( const armarx::armem::human::PersonID & personID,
const std::string & providerName,
const armem::Time & referencedTime,
const armarx::armem::human::Preferences preferences )

Definition at line 54 of file HumanProfileWriter.cpp.

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

◆ connect()

void connect ( armem::client::MemoryNameSystem & memoryNameSystem)

Definition at line 25 of file HumanProfileWriter.cpp.

+ Here is the call graph for this function:

◆ defaultProperties()

Properties defaultProperties ( ) const
inlineoverridevirtual

Implements SimpleWriterBase.

Definition at line 41 of file HumanProfileWriter.h.

◆ propertyPrefix()

std::string propertyPrefix ( ) const
inlineoverridevirtual

Implements SimpleWriterBase.

Definition at line 35 of file HumanProfileWriter.h.

◆ registerPropertyDefinitions()

void registerPropertyDefinitions ( armarx::PropertyDefinitionsPtr & def)

Definition at line 19 of file HumanProfileWriter.cpp.

+ Here is the call graph for this function:

◆ setCustomAttributeInProfile()

bool setCustomAttributeInProfile ( const armarx::armem::human::PersonID & personID,
const std::string & providerName,
const armem::Time & referencedTime,
const std::string key,
const std::string value )

Definition at line 82 of file HumanProfileWriter.cpp.

+ Here is the call graph for this function:

◆ setPreferredDrink()

bool setPreferredDrink ( const armarx::armem::human::PersonID & personID,
const std::string & providerName,
const armem::Time & referencedTime,
const std::string & drink )

Inserts the given drink at the first place of the given humans list of preferred drinks, indicating it is the most favorite drink.

If the list already contained the drink before, it is moved to the first entry of the list to prevent duplicate entries.

Parameters
personIDidentifier of the human (first and last name)
providerNamename of the profile provider
referencedTimethe time at which the preference change occured (used for memory timestamp)
drinkhuman-readable string describing the drink that is preferred (for example, 'orange juice')
Returns
true iff. the preference was updated successfully

Definition at line 159 of file HumanProfileWriter.cpp.

+ Here is the call graph for this function:

◆ SimpleWriterBase()

SimpleWriterBase ( )

Definition at line 39 of file SimpleWriterBase.cpp.

+ Here is the caller graph for this function:

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