33 template <
class IDType>
38 const std::filesystem::path& absPackageDataPath,
39 const std::filesystem::path&
42 packageName(packageName),
43 absPackageDataPath(absPackageDataPath),
44 relPathToId(relPathToId),
75 return absPackageDataPath;
78 virtual std::filesystem::path
82 return absPackageDataPath / packageName / relPathToId;
95 if (!std::filesystem::exists(absPackageDataPath))
97 ARMARX_ERROR <<
"Could not resolve absolute path for package '" << packageName
107 std::string packageName;
108 std::filesystem::path absPackageDataPath;
109 std::filesystem::path relPathToId;
117 template <
class IDType,
class DatasetType>
125 const std::string& packageName,
126 const std::filesystem::path& absPackageDataDir,
127 const std::filesystem::path&
129 const std::filesystem::path& relPath,
130 const DatasetType& dataset,
132 Base(packageName, absPackageDataDir, (relDatasetPath / relPath), id),
134 relDatasetPath(relDatasetPath)
150 std::filesystem::path relDatasetPath;
FinderInfoBase< IDType > Base
DatasetFinderInfoBase(const std::string &packageName, const std::filesystem::path &absPackageDataDir, const std::filesystem::path &relDatasetPath, const std::filesystem::path &relPath, const DatasetType &dataset, const IDType &id)
DatasetType getDataset() const
virtual ~DatasetFinderInfoBase()
std::filesystem::path getAbsolutePackageDataPath() const
FinderInfoBase(const std::string &packageName, const std::filesystem::path &absPackageDataPath, const std::filesystem::path &relPathToId, const IDType &id)
std::string getPackageName() const
virtual std::filesystem::path getFullPath() const
virtual ~FinderInfoBase()
std::filesystem::path getRelativePath() const
void checkAbsolutePathIsValid() const
PackageFileLocation toPackageFileLocation()
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
std::filesystem::path relativePath
Relative to the package's data directory.
std::filesystem::path absolutePath
The absolute path (in the host's file system).
std::string package
Name of the ArmarX package.