Main Page   Compound List   File List   Compound Members   File Members  

lib/gobj/id.h File Reference

Id header. More...

#include <gobjconfig.h>
#include <gobj/types.h>
#include <gobj/decls.h>

Go to the source code of this file.

Compounds

struct  Gj_Sysid_struct
struct  Gj_Objid_struct
struct  Gj_Id_struct

Defines

#define GJ_ID_MAXLEN   38
 The maximal length of the string representation of an id (the null character included).

#define GJ_SYSID_MAXLEN   20
 The maximal length of the string representation of a sysid (the null character included).

#define GJ_ID(sysid1, sysid2, objid1, objid2)    { {(sysid1), (sysid2)}, {(objid1), (objid2)} }
 Gj_Id initializer macro.

#define GJ_SYSID(sysid1, sysid2)    { (sysid1), (sysid2) }
 Gj_Sysid initializer macro.


Functions

int Gj_str2id (const char* str, Gj_Id* id)
 Create a Gj_Id from a string. More...

int Gj_str2sysid (const char* str, Gj_Sysid* sysid)
 Create a Gj_Sysid from a string. More...

void Gj_id2str (const Gj_Id* id, char* str)
 Create a string from a Gj_Id. More...

void Gj_id2unseperatedStr (const Gj_Id* id, char* str)
 Create a unseperated string form a Gj_Id. More...

void Gj_sysid2str (const Gj_Sysid* sysid, char* str)
 Create a string from a Gj_Sysid. More...

Gj_Bool Gj_id_isUnique (const Gj_Id* id)
 Tests if a given id is really a world-wide unique id.

void Gj_id_copy (Gj_Id* src, Gj_Id* dest)
 Copy an id structure.

void Gj_sysid_copy (Gj_Sysid* src, Gj_Sysid* dest)
 Copy a sysid structure.

void Gj_id_setSysid (Gj_Id* id, Gj_Sysid* sysid)
 Set the sysid part of an id.

Gj_Bool Gj_id_cmp (Gj_Id* id1, Gj_Id* id2)
 Check if two ids contain the same value.

Gj_Bool Gj_sysid_cmp (Gj_Sysid* sysid1, Gj_Sysid* sysid2)
 Check if two sysids contain the same value.

int Gj_id_read (Gj_Ctx* ctx, Gj_Id* id, Gj_Stream* stream)
 Read an id from a stream. More...

int Gj_id_write (Gj_Ctx* ctx, Gj_Id* id, Gj_Stream* stream)
 Write an id to a stream. More...

void Gj_id_clear (Gj_Id* id)
 Set an id to zero.

Gj_Bool Gj_id_isZero (Gj_Id* id)
 Test if an id is zero.

int Gj_sysid_read (Gj_Ctx* ctx, Gj_Sysid* sysid, Gj_Stream* stream)
 Read a sysid from a stream. More...

int Gj_sysid_write (Gj_Ctx* ctx, Gj_Sysid* sysid, Gj_Stream* stream)
 Write a sysid to a stream. More...


Detailed Description

Id header.


Function Documentation

int Gj_str2id ( const char * str,
Gj_Id * id )
 

Create a Gj_Id from a string.

Returns:
0 on success, -1 otherwise.

int Gj_str2sysid ( const char * str,
Gj_Sysid * sysid )
 

Create a Gj_Sysid from a string.

Returns:
0 on success, -1 otherwise.

void Gj_id2str ( const Gj_Id * id,
char * str )
 

Create a string from a Gj_Id.

Str should be at least GJ_ID_MAXLEN long.

void Gj_id2unseperatedStr ( const Gj_Id * id,
char * str )
 

Create a unseperated string form a Gj_Id.

Str should be at least GJ_ID_MAXLEN long.

void Gj_sysid2str ( const Gj_Sysid * sysid,
char * str )
 

Create a string from a Gj_Sysid.

Str should be at least GJ_SYSID_MAXLEN long.

int Gj_id_read ( Gj_Ctx * ctx,
Gj_Id * id,
Gj_Stream * stream )
 

Read an id from a stream.

Returns:
0 on success, -1 otherwise.

int Gj_id_write ( Gj_Ctx * ctx,
Gj_Id * id,
Gj_Stream * stream )
 

Write an id to a stream.

Returns:
0 on success, -1 otherwise.

int Gj_sysid_read ( Gj_Ctx * ctx,
Gj_Sysid * sysid,
Gj_Stream * stream )
 

Read a sysid from a stream.

Returns:
0 on success, -1 otherwise.

int Gj_sysid_write ( Gj_Ctx * ctx,
Gj_Sysid * sysid,
Gj_Stream * stream )
 

Write a sysid to a stream.

Returns:
0 on success, -1 otherwise.


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