// File: IntPolyh_ArrayOfCouples.cxx // Created: Thu Apr 8 1999 // Author: Fabrice SERVANT // #include #include #include IntPolyh_ArrayOfCouples::IntPolyh_ArrayOfCouples() : n(0),eoa(0),ptr(0){ } IntPolyh_ArrayOfCouples::IntPolyh_ArrayOfCouples(const Standard_Integer N) : n(N),eoa(0){ Init(N); } void IntPolyh_ArrayOfCouples::Init(const Standard_Integer N) { Destroy(); ptr = (void *) (new IntPolyh_Couple [N]); n=N; } Standard_Integer IntPolyh_ArrayOfCouples::NbCouples() const { return(eoa); } void IntPolyh_ArrayOfCouples::SetNbCouples(const Standard_Integer fint) { eoa=fint; } void IntPolyh_ArrayOfCouples::IncNbCouples() { eoa++; } # ifdef DEB #define BORNES 1 # endif const IntPolyh_Couple& IntPolyh_ArrayOfCouples::Value(const Standard_Integer Index) const { IntPolyh_Couple* ptrCouple = (IntPolyh_Couple*) ptr; #if BORNES if(Index<0 || Index>=n) { cerr<<" Erreur4 "<=n) { cerr<<" Erreur4"< %d",n-1); for(Standard_Integer i=0;i