00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016
00017
00025 #include <gobjconfig.h>
00026
00027 #ifndef gobj_lib_id_h
00028 #define gobj_lib_id_h
00029
00030 #include <gobj/types.h>
00031 #include <gobj/decls.h>
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 #if 0
00037 }
00038 #endif
00039
00040
00047 struct Gj_Sysid_struct {
00048
00049 Gj_Ui32 sysid1;
00050 Gj_Ui32 sysid2;
00051
00052 };
00053
00054
00061 struct Gj_Objid_struct {
00062
00063 Gj_Ui32 objid1;
00064 Gj_Ui32 objid2;
00065
00066 };
00067
00068
00075 struct Gj_Id_struct {
00076
00077 Gj_Sysid sysid;
00078
00079 Gj_Objid objid;
00080
00081 };
00082
00083
00088 #define GJ_ID_MAXLEN 38
00089
00090
00095 #define GJ_SYSID_MAXLEN 20
00096
00097
00102 #define GJ_ID(sysid1, sysid2, objid1, objid2) { {(sysid1), (sysid2)}, {(objid1), (objid2)} }
00103
00104
00109 #define GJ_SYSID(sysid1, sysid2) { (sysid1), (sysid2) }
00110
00111
00118 int Gj_str2id(const char* str, Gj_Id* id);
00119
00120
00127 int Gj_str2sysid(const char* str, Gj_Sysid* sysid);
00128
00129
00136 void Gj_id2str(const Gj_Id* id, char* str);
00137
00138
00145 void Gj_id2unseperatedStr(const Gj_Id* id, char* str);
00146
00147
00154 void Gj_sysid2str(const Gj_Sysid* sysid, char* str);
00155
00156
00161 Gj_Bool Gj_id_isUnique(const Gj_Id* id);
00162
00163
00168 void Gj_id_copy(Gj_Id* src, Gj_Id* dest);
00169
00170
00175 void Gj_sysid_copy(Gj_Sysid* src, Gj_Sysid* dest);
00176
00177
00182 void Gj_id_setSysid(Gj_Id* id, Gj_Sysid* sysid);
00183
00184
00189 Gj_Bool Gj_id_cmp(Gj_Id* id1, Gj_Id* id2);
00190
00191
00196 Gj_Bool Gj_sysid_cmp(Gj_Sysid* sysid1, Gj_Sysid* sysid2);
00197
00198
00205 int Gj_id_read(Gj_Ctx* ctx, Gj_Id* id, Gj_Stream* stream);
00206
00207
00214 int Gj_id_write(Gj_Ctx* ctx, Gj_Id* id, Gj_Stream* stream);
00215
00216
00221 void Gj_id_clear(Gj_Id* id);
00222
00223
00228 Gj_Bool Gj_id_isZero(Gj_Id* id);
00229
00230
00237 int Gj_sysid_read(Gj_Ctx* ctx, Gj_Sysid* sysid, Gj_Stream* stream);
00238
00239
00246 int Gj_sysid_write(Gj_Ctx* ctx, Gj_Sysid* sysid, Gj_Stream* stream);
00247
00248
00249 #ifdef __cplusplus
00250 }
00251 #endif
00252
00253 #endif
00254