Thomas Psota | 7e562b6 | 2020-04-30 15:11:32 +0200 | [diff] [blame] | 1 | #include <BaSyx/submodel/simple/dataspecification/DataSpecification.h> |
| 2 | |
| 3 | namespace basyx { |
| 4 | namespace submodel { |
| 5 | namespace simple { |
| 6 | |
| 7 | using namespace basyx::submodel::api; |
| 8 | |
| 9 | DataSpecification::DataSpecification(const std::string & idShort, const Identifier & identifier) |
| 10 | : ident(idShort, identifier) |
| 11 | , content(nullptr) |
Constantin Ziesche | 02817f1 | 2020-08-04 21:40:43 +0200 | [diff] [blame^] | 12 | {} |
Thomas Psota | 7e562b6 | 2020-04-30 15:11:32 +0200 | [diff] [blame] | 13 | |
| 14 | void DataSpecification::setContent(std::unique_ptr<IDataSpecificationContent> content) |
| 15 | { |
| 16 | this->content = std::move(content); |
| 17 | }; |
| 18 | |
| 19 | const std::string & DataSpecification::getIdShort() const |
| 20 | { |
| 21 | return this->ident.getIdShort(); |
| 22 | } |
| 23 | |
| 24 | const std::string * const DataSpecification::getCategory() const |
| 25 | { |
| 26 | return this->ident.getCategory(); |
| 27 | } |
| 28 | |
| 29 | simple::LangStringSet & DataSpecification::getDescription() |
| 30 | { |
| 31 | return this->ident.getDescription(); |
| 32 | } |
| 33 | |
| 34 | const simple::LangStringSet & DataSpecification::getDescription() const |
| 35 | { |
| 36 | return this->ident.getDescription(); |
| 37 | } |
| 38 | |
| 39 | const IReferable * const DataSpecification::getParent() const |
| 40 | { |
| 41 | return this->ident.getParent(); |
| 42 | } |
| 43 | |
| 44 | const AdministrativeInformation & DataSpecification::getAdministrativeInformation() const |
| 45 | { |
| 46 | return this->ident.getAdministrativeInformation(); |
| 47 | } |
| 48 | |
| 49 | AdministrativeInformation & DataSpecification::getAdministrativeInformation() |
| 50 | { |
| 51 | return this->ident.getAdministrativeInformation(); |
| 52 | } |
| 53 | |
| 54 | Identifier DataSpecification::getIdentification() const |
| 55 | { |
| 56 | return this->ident.getIdentification(); |
| 57 | } |
| 58 | |
| 59 | bool DataSpecification::hasAdministrativeInformation() const |
| 60 | { |
| 61 | return this->ident.hasAdministrativeInformation(); |
| 62 | } |
| 63 | |
| 64 | IDataSpecificationContent & DataSpecification::getContent() |
| 65 | { |
| 66 | return *this->content; |
| 67 | } |
| 68 | |
Constantin Ziesche | 02817f1 | 2020-08-04 21:40:43 +0200 | [diff] [blame^] | 69 | void DataSpecification::setCategory(const std::string &category) |
| 70 | { |
| 71 | this->ident.setCategory(category); |
| 72 | } |
| 73 | |
Thomas Psota | 7e562b6 | 2020-04-30 15:11:32 +0200 | [diff] [blame] | 74 | |
| 75 | } |
| 76 | } |
| 77 | } |