Source Struct Reference

A directory of human profiles (one sub-directory with a profile.json per person). More...

#include <VisionX/libraries/armem_human/server/profile/Source.h>

Public Types

using path = std::filesystem::path
 

Public Member Functions

std::string str () const
 

Static Public Member Functions

static Source FromPackage (const std::string &packageName, const path &relativeDirectory=DefaultRelativeDirectory)
 
static Source FromString (const std::string &string)
 
static std::vector< Source > ListFromString (const std::string &string)
 Comma-separated list.
 

Public Attributes

path directory = DefaultRelativeDirectory
 Relative to the package's data directory if packageName is set, absolute otherwise.
 
std::string name
 The name of the provider segment the profiles are loaded into.
 
std::optional< std::string > packageName
 The ArmarX package. Unset for an absolute directory.
 

Static Public Attributes

static const path DefaultRelativeDirectory = "humans/profiles"
 

Detailed Description

A directory of human profiles (one sub-directory with a profile.json per person).

A source is either a directory in the data directory of an ArmarX package or an absolute directory. Its profiles are loaded into the provider segment named after the source.

String form: [name=](package[:relative/directory] | /absolute/directory), e.g.

  • PriorKnowledgeData (directory humans/profiles, provider segment PriorKnowledgeData)
  • PriorKnowledgeData:humans/simulation_profiles
  • learned=/home/armar-user/human_profiles (an absolute directory needs a name)

Member Typedef Documentation

◆ path

using path = std::filesystem::path

Member Function Documentation

◆ FromPackage()

Source FromPackage ( const std::string & packageName,
const path & relativeDirectory = DefaultRelativeDirectory )
static

◆ FromString()

Source FromString ( const std::string & string)
static
Exceptions
armarx::LocalExceptionIf string is not a valid source.

◆ ListFromString()

std::vector< Source > ListFromString ( const std::string & string)
static

Comma-separated list.

Empty entries are skipped.

Exceptions
armarx::LocalExceptionIf an entry is not a valid source.

◆ str()

std::string str ( ) const

Member Data Documentation

◆ DefaultRelativeDirectory

const path DefaultRelativeDirectory = "humans/profiles"
inlinestatic

◆ directory

Relative to the package's data directory if packageName is set, absolute otherwise.

◆ name

std::string name

The name of the provider segment the profiles are loaded into.

◆ packageName

std::optional<std::string> packageName

The ArmarX package. Unset for an absolute directory.


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