-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
specificAssetId: Renamed for identifierkeyvaluepair
Adapt properties to the new specification As the types are final, rename them according to the new specification Signed-off-by: Tobias Klausmann <[email protected]>
- Loading branch information
Showing
8 changed files
with
63 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#ifndef SPECIFICASSETID_H | ||
#define SPECIFICASSETID_H | ||
|
||
#include <basyx/reference.h> | ||
#include <basyx/hassemantics.h> | ||
|
||
#include <basyx/util/optional/optional.hpp> | ||
#include <basyx/util/string_view/string_view.hpp> | ||
|
||
#include <basyx/identifier.h> | ||
#include <basyx/labelType.h> | ||
|
||
#include <string> | ||
|
||
namespace basyx | ||
{ | ||
|
||
class SpecificAssetId : public HasSemantics | ||
{ | ||
private: | ||
LabelType name; | ||
Identifier value; | ||
util::optional<Reference> externalSubjectId; | ||
public: | ||
SpecificAssetId(util::string_view name) : name(name.to_string()) {}; | ||
|
||
SpecificAssetId(const SpecificAssetId&) = default; | ||
SpecificAssetId(SpecificAssetId&&) = default; | ||
|
||
SpecificAssetId & operator=(const SpecificAssetId&) noexcept = default; | ||
SpecificAssetId & operator=(SpecificAssetId&&) noexcept = default; | ||
|
||
~SpecificAssetId() = default; | ||
public: | ||
const std::string getName() const { return name.getLabel(); }; | ||
void setName(util::string_view name) { this->name = name.to_string(); }; | ||
|
||
const Identifier & getValue() const { return this->value; }; | ||
void setValue(Identifier value) { this->value = value; } | ||
|
||
const util::optional<Reference> & getExternalSubjectId() const { return this->externalSubjectId; }; | ||
template<typename Ref> void setExternalSubjectId(Ref && ref) { this->externalSubjectId = std::forward<Ref>(ref); }; | ||
}; | ||
}; | ||
|
||
#endif /* SPECIFICASSETID_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters