MESH_SFVertex.h

Go to the documentation of this file.
00001 #ifndef X3DTK_MESH_SFVERTEX_H
00002 #define X3DTK_MESH_SFVERTEX_H
00003 
00004 #include "MESH_BaseSFVertex.h"
00005 #include "TypeList.h"
00006 
00007 #include <vector>
00008 
00009 namespace X3DTK {
00010 namespace MESH {
00011 
00012 template<class MData, class VData, class EData, class FData, bool RW> class TemplateMesh;
00013 template<class MData, class VData, class EData, class FData, bool RW> class TemplateVertex;
00014 template<class MData, class VData, class EData, class FData, bool RW> class SFTemplateEdge;
00015 template<class MData, class VData, class EData, class FData, bool RW> class SFTemplateFace;
00016 template<class MData, class VData, class EData, class FData, bool RW> class EntityMFTemplateEdge;
00017 template<class MData, class VData, class EData, class FData, bool RW> class EntityMFTemplateFace;
00018 
00025 template<class MData, class VData, class EData, class FData, bool RW>
00026 class SFTemplateVertex : public BaseSFVertex
00027 {
00028   friend class TemplateVertex<MData, VData, EData, FData, RW>;
00029   friend class TemplateMesh<MData, VData, EData, FData, RW>;
00030 public:
00031   typedef EntityMFTemplateFace<MData, VData, EData, FData, RW> MFFace;
00032   typedef EntityMFTemplateEdge<MData, VData, EData, FData, RW> MFEdge;
00033   
00035   inline const MFEdge &getEdges() const;
00037   inline const MFFace &getFaces() const;
00039   inline VData &data();
00041   inline const VData &data() const;
00043   inline bool isIsolated() const;
00044 
00045 #ifdef TEMPLATE_SPECIALIZATION_SUPPORTED
00046 
00047   template<class F>  
00048   F &getData();
00050   template<class F>  
00051   F &ogetData();
00052 #endif
00053   
00054 private:
00055   MFEdge _edges;
00056   MFFace _faces;
00057   VData _data;
00058 
00060   SFTemplateVertex(unsigned int i);
00062   ~SFTemplateVertex();
00063   
00065   void addEdge(SFTemplateEdge<MData, VData, EData, FData, RW> *edge);
00067   void addFace(SFTemplateFace<MData, VData, EData, FData, RW> *face);
00068   
00070   void removeEdge(SFTemplateEdge<MData, VData, EData, FData, RW> *edge);
00072   void removeFace(SFTemplateFace<MData, VData, EData, FData, RW> *face);
00073 };
00074 
00076 template<class MData, class VData, class EData, class FData, bool RW>
00077 std::ostream& operator<<(std::ostream& o, const SFTemplateVertex<MData, VData, EData, FData, RW> &v);
00078 
00079 }
00080 }
00081 
00082 #include "MESH_SFVertex.inl"
00083 
00084 #endif

Generated on Fri Aug 27 13:16:22 2004 for X3DToolKit by doxygen 1.3.6