17 #ifndef AGXSDK_PROPERTYFILTERS_H
18 #define AGXSDK_PROPERTYFILTERS_H
30 class PropertyContainer;
66 std::string m_property_id[2];
75 #define MATCH_IMPLEMENTATION( TYPENAME, TYPE ) \
76 int checkMatch( const agx::PropertyContainer* c, size_t numMatch) const \
85 if ( m_is_set[i] && c && c->getProperty ## TYPENAME ( m_property_id[i], data )) \
87 match1 = (m_property_data[i] == data) ? ( i ? 1 : -1) : 0; \
90 } while( !match1 && i < numMatch); \
94 bool matches(const agx::PropertyContainer* c1, const agx::PropertyContainer* c2) const \
96 size_t n1 = c1 ? c1->getNumberOfProperties ## TYPENAME () : 0; \
97 size_t n2 = c2 ? c2->getNumberOfProperties ## TYPENAME () : 0; \
99 size_t numRequiredMatches = (m_is_set[0] ? 1 : 0) + (m_is_set[1] ? 1 : 0); \
105 int match1 = 0, match2 = 0; \
106 match1 = checkMatch( c1, numRequiredMatches ); \
107 match2 = checkMatch( c2, numRequiredMatches ); \
109 bool result = (numRequiredMatches == 1 && (match1 || match2) ) || \
110 (numRequiredMatches == 2 && (match1 && match2) && (match1 != match2) ); \
122 const std::string& property_id1,
const int64_t& data1);
131 int64_t m_property_data[2];
142 const std::string& property_id1,
const int32_t& data1);
151 int32_t m_property_data[2];
161 const std::string& property_id1,
const float& data1);
171 float m_property_data[2];
182 const std::string& property_id1,
const double& data1);
191 double m_property_data[2];
202 const std::string& property_id1,
const bool& data1);
212 bool m_property_data[2];
222 const std::string& property_id1,
const std::string& data1);
231 std::string m_property_data[2];