00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00039 #ifndef __NUSMV_CORE_UTILS_TRIPLE_H__
00040 #define __NUSMV_CORE_UTILS_TRIPLE_H__
00041
00042
00043 #include "nusmv/core/utils/utils.h"
00044
00051 typedef struct Triple_TAG* Triple_ptr;
00052
00053
00060 typedef struct Triple_TAG
00061 {
00062 void* first;
00063 void* second;
00064 void* third;
00065 boolean frozen;
00066 } Triple;
00067
00074 #define TRIPLE(self) \
00075 ((Triple_ptr) self)
00076
00082 #define TRIPLE_CHECK_INSTANCE(self) \
00083 (nusmv_assert(TRIPLE(self) != TRIPLE(NULL)))
00084
00085
00086
00089
00090
00091
00092
00101 Triple_ptr Triple_create(void* first,
00102 void* second,
00103 void* third);
00104
00114 void Triple_init(Triple_ptr self, void* first,
00115 void* second, void* third);
00116
00125 void Triple_freeze(Triple_ptr self);
00126
00134 boolean Triple_is_freezed(const Triple_ptr self);
00135
00142 void* Triple_get_first(const Triple_ptr self);
00143
00150 void* Triple_get_second(const Triple_ptr self);
00151
00158 void* Triple_get_third(const Triple_ptr self);
00159
00167 void Triple_set_first(Triple_ptr self, void* first);
00168
00176 void Triple_set_second(Triple_ptr self, void* second);
00177
00185 void Triple_set_third(Triple_ptr self, void* third);
00186
00194 void Triple_set_values(Triple_ptr self, void* first,
00195 void* second, void* third);
00196
00205 void Triple_destroy(Triple_ptr self);
00206
00219 int Triple_compare(const Triple_ptr a,
00220 const Triple_ptr b);
00221
00231 unsigned long Triple_hash(const Triple_ptr self, int size);
00232
00237 #endif