GetInstancePropertyCardinalityRestriction (inline)
Syntax
// // Strong typing definition // static inline void GetInstancePropertyCardinalityRestriction( OwlInstance owlInstance, RdfProperty rdfProperty, int64_t * minCard, int64_t * maxCard ) { OwlClass owlClass = GetInstanceClassByIterator(owlInstance, 0); GetClassPropertyCardinalityRestriction( owlClass, rdfProperty, minCard, maxCard ); while ( (owlClass = GetInstanceClassByIterator(owlInstance, owlClass)) ) { int64_t myMinCard = -1, myMaxCard = -1; GetClassPropertyCardinalityRestriction( owlClass, rdfProperty, &myMinCard, &myMaxCard ); if ((*minCard) < myMinCard) (*minCard) = myMinCard; if (myMaxCard >= 0 && ((*maxCard) == -1 || (*maxCard) > myMaxCard)) (*maxCard) = myMaxCard; } } // // Weak typing definition // static inline void GetInstancePropertyCardinalityRestriction( int64_t owlInstance, int64_t rdfProperty, int64_t * minCard, int64_t * maxCard ) { OwlClass owlClass = GetInstanceClassByIterator(owlInstance, 0); GetClassPropertyCardinalityRestriction( owlClass, rdfProperty, minCard, maxCard ); while ( (owlClass = GetInstanceClassByIterator(owlInstance, owlClass)) ) { int64_t myMinCard = -1, myMaxCard = -1; GetClassPropertyCardinalityRestriction( owlClass, rdfProperty, &myMinCard, &myMaxCard ); if ((*minCard) < myMinCard) (*minCard) = myMinCard; if (myMaxCard >= 0 && ((*maxCard) == -1 || (*maxCard) > myMaxCard)) (*maxCard) = myMaxCard; } }