---------------------------------------------------------------------------
| 34 | |
| 35 | //--------------------------------------------------------------------------- |
| 36 | int vtkSMInputArrayDomain::IsInDomain(vtkSMProperty* property) |
| 37 | { |
| 38 | if (this->IsOptional) |
| 39 | { |
| 40 | return vtkSMDomain::IN_DOMAIN; |
| 41 | } |
| 42 | |
| 43 | if (!property) |
| 44 | { |
| 45 | return vtkSMDomain::NOT_IN_DOMAIN; |
| 46 | } |
| 47 | |
| 48 | vtkSMUncheckedPropertyHelper helper(property); |
| 49 | if (helper.GetNumberOfElements() == 0) |
| 50 | { |
| 51 | return vtkSMDomain::NOT_IN_DOMAIN; |
| 52 | } |
| 53 | |
| 54 | unsigned int skipped_count = 0; |
| 55 | for (unsigned int cc = 0, max = helper.GetNumberOfElements(); cc < max; cc++) |
| 56 | { |
| 57 | auto proxy = vtkSMSourceProxy::SafeDownCast(helper.GetAsProxy(cc)); |
| 58 | const auto port = helper.GetOutputPort(cc); |
| 59 | switch (this->IsInDomain(proxy, port)) |
| 60 | { |
| 61 | case vtkSMDomain::NOT_IN_DOMAIN: |
| 62 | return vtkSMDomain::NOT_IN_DOMAIN; |
| 63 | |
| 64 | case vtkSMDomain::NOT_APPLICABLE: |
| 65 | ++skipped_count; |
| 66 | break; |
| 67 | |
| 68 | case vtkSMDomain::IN_DOMAIN: |
| 69 | break; |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | return (helper.GetNumberOfElements() == skipped_count) ? vtkSMDomain::NOT_APPLICABLE |
| 74 | : vtkSMDomain::IN_DOMAIN; |
| 75 | } |
| 76 | |
| 77 | //--------------------------------------------------------------------------- |
| 78 | int vtkSMInputArrayDomain::IsInDomain(vtkSMSourceProxy* proxy, unsigned int outputport /*=0*/) |
no test coverage detected