---------------------------------------------------------------------------
| 64 | |
| 65 | //--------------------------------------------------------------------------- |
| 66 | int vtkSMStringListDomain::IsInDomain(vtkSMProperty* property) |
| 67 | { |
| 68 | if (this->IsOptional) |
| 69 | { |
| 70 | return 1; |
| 71 | } |
| 72 | |
| 73 | if (!property) |
| 74 | { |
| 75 | return 0; |
| 76 | } |
| 77 | vtkSMStringVectorProperty* sp = vtkSMStringVectorProperty::SafeDownCast(property); |
| 78 | if (sp) |
| 79 | { |
| 80 | unsigned int numElems = sp->GetNumberOfUncheckedElements(); |
| 81 | for (unsigned int i = 0; i < numElems; i++) |
| 82 | { |
| 83 | unsigned int idx; |
| 84 | if (!this->IsInDomain(sp->GetUncheckedElement(i), idx)) |
| 85 | { |
| 86 | return 0; |
| 87 | } |
| 88 | } |
| 89 | return 1; |
| 90 | } |
| 91 | |
| 92 | return 0; |
| 93 | } |
| 94 | |
| 95 | //--------------------------------------------------------------------------- |
| 96 | int vtkSMStringListDomain::IsInDomain(const char* val, unsigned int& idx) |
no test coverage detected