| 576 | } |
| 577 | |
| 578 | bool OSArgument::setDomainType(const OSDomainType& domainType) { |
| 579 | if (domainType != this->domainType()) { |
| 580 | // check whether domainType makes sense for type() |
| 581 | switch (domainType.value()) { |
| 582 | case OSDomainType::Interval: |
| 583 | switch (m_type.value()) { |
| 584 | case OSArgumentType::Boolean: |
| 585 | case OSArgumentType::String: |
| 586 | case OSArgumentType::Choice: |
| 587 | case OSArgumentType::Path: |
| 588 | LOG(Info, "OSDomainType " << domainType.valueName() << " does not make sense for " << "arguments of type " << m_type.valueName() |
| 589 | << ", such as " << name() << "."); |
| 590 | return false; |
| 591 | default: |
| 592 | break; |
| 593 | } |
| 594 | break; |
| 595 | case OSDomainType::Enumeration: |
| 596 | break; |
| 597 | default: |
| 598 | OS_ASSERT(false); |
| 599 | } |
| 600 | |
| 601 | // if so, change and clear current domain |
| 602 | m_domainType = domainType; |
| 603 | m_domain.clear(); |
| 604 | onChange(); |
| 605 | } |
| 606 | return true; |
| 607 | } |
| 608 | |
| 609 | bool OSArgument::setDomain(const std::vector<bool>& domain) { |
| 610 | bool result(false); |
no test coverage detected