Main Page   Compound List   File List   Compound Members   File Members  

lib/gobj/id.h

Go to the documentation of this file.
00001 /* lib/id.h - Id header
00002    Copyright (C) 1999, 2000, 2001 by Thomas Uehlinger
00003 
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published by
00006    the Free Software Foundation; either version 2, or (at your option)
00007    any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.
00013 
00014    You should have received a copy of the GNU General Public License
00015    along with this program; if not, write to the Free Software
00016    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
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 /* __cplusplus */
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 /* __cplusplus */
00252 
00253 #endif /* !gobj_lib_id_h */
00254 

Generated at Fri Aug 17 18:28:55 2001 for Gobj by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000