Hi Valery, Just one comment for not confusing C++ beginners by using incorrect terminology: On Thu, 2 Mar 2000, Valeri Fine (Faine) wrote: > TPadView3D is an abstract interface between TPad and some concrete > 3D viewer. So it must be linked with very TPad but should impose no extra > dependencies since all its methods look as follows: > > inline void TPadView3D::ExecuteEvent(Int_t, Int_t, Int_t) { } > inline void TPadView3D::Paint(Option_t *) { } > inline void TPadView3D::Size(Int_t, Int_t) { } > inline void TPadView3D::PaintBeginModel(Option_t *) { } > inline void TPadView3D::PaintEnd(Option_t *) { } > inline void TPadView3D::PaintScene(Option_t *) { } > inline void TPadView3D::PaintPolyMarker(TPolyMarker3D *, Option_t *) { } > inline void TPadView3D::PaintPolyLine(TPolyLine3D *, Option_t *) { } > inline void TPadView3D::PaintPoints3D(const TPoints3DABC *,Option_t *){ } > inline void TPadView3D::SetAttNode(TNode *, Option_t *) { } > inline void TPadView3D::SetLineAttr(Color_t ,Int_t ,Option_t *) { } > inline void TPadView3D::UpdateNodeMatrix(TNode *, Option_t *) { } > inline void TPadView3D::UpdatePosition(Double_t ,Double_t ,Double_t ,TRotMatrix *, Option_t *){ } This is not an abstract interface as it does not contain any abstract method. The abstract methods look like this: > inline void TPadView3D::ExecuteEvent(Int_t, Int_t, Int_t) = 0; > inline void TPadView3D::Paint(Option_t *) = 0; ... etc. Making a method abstract enforces all derived classes to provide implementation of this method. If you omit this implementation than you will not be able to instantiate such derived class. (Compiler will give you error on "new MyDerivedClass" if implementation of any abstract method is missing.) This is used in interfaces for ensuring that all interface implementation will provide the required methods. Best regards, Ivana Hrivnacova ============================================================== e-mail: Ivana.Hrivnacova@cern.ch address: PPE Division; 160-1-016; CERN; 1211 Geneve; Switzerland phone: (022)-767-9749 Home institute: NPI Rez near Prague, Czech Republic ==============================================================
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:20 MET