armarx.cpp
Go to the documentation of this file.
1#include "armarx.h"
2
4
5void
6armarx::fromAron(const arondto::ObjectID& dto, ObjectID& bo)
7{
8 bo = ObjectID(dto.dataset, dto.className, dto.instanceName);
9}
10
11void
12armarx::toAron(arondto::ObjectID& dto, const ObjectID& bo)
13{
14 aron::toAron(dto.dataset, bo.dataset());
15 aron::toAron(dto.className, bo.className());
16 aron::toAron(dto.instanceName, bo.instanceName());
17}
18
19void
20armarx::fromAron(const armarx::arondto::PackagePath& dto, armarx::PackageFileLocation& bo)
21{
22 aron::toAron(bo.package, dto.package);
23 aron::toAron(bo.relativePath, dto.path);
24 aron::toAron(bo.absolutePath, std::filesystem::path(""));
25}
26
27void
28armarx::toAron(armarx::arondto::PackagePath& dto, const armarx::PackageFileLocation& bo)
29{
30 aron::toAron(dto.package, bo.package);
31 aron::toAron(dto.path, bo.relativePath);
32}
A known object ID of the form "Dataset/ClassName" or "Dataset/ClassName/InstanceName".
Definition ObjectID.h:11
std::string className() const
Definition ObjectID.h:30
std::string instanceName() const
Definition ObjectID.h:36
std::string dataset() const
Definition ObjectID.h:24
void toAron(T &dto, const T &bo)
Framework for converting ARON DTOs (Data Transfer Objects) to C++ BOs (Business Objects) and back.
void toAron(arondto::PackagePath &dto, const PackageFileLocation &bo)
void fromAron(const arondto::PackagePath &dto, PackageFileLocation &bo)
std::filesystem::path absolutePath
The absolute path (in the host's file system).
Definition ObjectInfo.h:30
std::string package
Name of the ArmarX package.
Definition ObjectInfo.h:25
std::string relativePath
Relative to the package's data directory.
Definition ObjectInfo.h:28