00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef SEDGE_H
00014 #define SEDGE_H
00015
00016 #if defined(HAVE_CONFIG_H)
00017
00018 #include <config.h>
00019 #elif defined(BLD_PROCEDURE)
00020
00021 #include <portinfo.h>
00022 #endif
00023
00024
00025 #ifdef __cplusplus
00026 namespace shells {
00027 #define DECLARE_EXTERN extern "C"
00028 #else
00029 #define DECLARE_EXTERN extern
00030 #endif
00031
00032 struct SVertexS;
00033 struct SElementS;
00034
00035 typedef struct SEdgeS {
00036 struct SVertexS *m_a;
00037 struct SVertexS *m_b;
00038
00039 struct SElementS *m_t;
00040 struct SElementS *m_t2;
00041
00042 struct SVertexS *m_a2;
00043 struct SVertexS *m_b2;
00044 } SEdge;
00045
00046
00047 DECLARE_EXTERN SEdge *createSEdge (struct SVertexS *, struct SVertexS *,
00048 struct SElementS *);
00049 DECLARE_EXTERN void deleteSEdge (SEdge *edge);
00050
00051 static int checkIfSEdgeContainsSElement(SEdge *edge,
00052 struct SElementS *element)
00053 {
00054 if (edge->m_t==element) return 1;
00055 if (edge->m_t2==element) return 2;
00056
00057 return 0;
00058 }
00059
00060
00061 #ifdef __cplusplus
00062 }
00063 #endif
00064 #undef DECLARE_EXTERN
00065
00066 #endif