MCPcopy Create free account
hub / github.com/Kitware/ParaView / IsInDomain

Method IsInDomain

Remoting/ServerManager/vtkSMInputArrayDomain.cxx:36–75  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

34
35//---------------------------------------------------------------------------
36int 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//---------------------------------------------------------------------------
78int vtkSMInputArrayDomain::IsInDomain(vtkSMSourceProxy* proxy, unsigned int outputport /*=0*/)

Callers 1

FindApplicableDomainMethod · 0.45

Calls 10

HasAcceptableArrayMethod · 0.95
GetAsProxyMethod · 0.80
DataSetTypeIsAMethod · 0.80
GetNumberOfElementsMethod · 0.45
GetOutputPortMethod · 0.45
CreateOutputPortsMethod · 0.45
GetDataInformationMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected