Main Page   Compound List   File List   Compound Members   File Members  

lib/gobj/path.h

Go to the documentation of this file.
00001 /* lib/path.h - path object
00002    Copyright (C) 1999, 2000, 2001 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_path_h
00028 #define gobj_lib_path_h
00029 
00030 #include <gobj/types.h>
00031 #include <gobj/id.h>
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif /* __cplusplus */
00036 #if 0
00037 }
00038 #endif
00039 
00040 
00045 typedef struct Gj_Path_struct Gj_Path;
00046 
00047 
00054 Gj_Path* Gj_path_new();
00055 
00056 
00063 Gj_Path* Gj_path_create(Gj_Ctx* ctx, Gj_Stream* stream);
00064 
00065 
00070 Gj_Path* Gj_path_duplicate(Gj_Path* path);
00071 
00072 
00077 void Gj_path_delete(Gj_Path* ptr);
00078 
00079 
00084 void Gj_path_init(Gj_Path* path);
00085 
00086 
00091 void Gj_path_finalize(Gj_Path* path);
00092 
00093 
00100 int Gj_path_read(Gj_Ctx* ctx, Gj_Path* path, Gj_Stream* stream);
00101 
00102 
00109 int Gj_path_write(Gj_Ctx* ctx, Gj_Path* path, Gj_Stream* stream);
00110 
00111  
00116 int Gj_path_getCount(Gj_Path* path);
00117 
00118 
00125 void Gj_path_addString(Gj_Path* path, char* str);
00126 
00127 
00132 void Gj_path_addId(Gj_Path* path, Gj_Id* id);
00133 
00134 
00139 void Gj_path_addNum(Gj_Path* path, int num);
00140 
00141 
00146 typedef enum Gj_PathType_enum { GJ_PATHTYPE_NONE = 0, GJ_PATHTYPE_STRING, GJ_PATHTYPE_ID, GJ_PATHTYPE_NUM } Gj_PathType;
00147 
00148 
00157 Gj_PathType Gj_path_nextType(Gj_Path* path, void** ptr);
00158 
00159 
00167 char* Gj_path_nextAsString(Gj_Path* path, void** ptr);
00168 
00169 
00177 Gj_Id* Gj_path_nextAsId(Gj_Path* path, void** ptr);
00178 
00179 
00187 int* Gj_path_nextAsNum(Gj_Path* path, void** ptr);
00188 
00189 
00190 
00195 char* Gj_path2str(Gj_Path* path);
00196 
00197 
00198 /*
00199  * Finish a path structure
00200  * it cannot be changed anymore afterwards
00201  *
00202  */
00203 /*void Gj_path_finish(Gj_Path* path);*/
00204 
00205 
00206 /*
00207  * Check if a path structure has been finished
00208  *
00209  */
00210 /*Gj_Bool Gj_path_isFinished(Gj_Path* path);*/
00211 
00212  
00219 struct gj_Pathelem_struct;
00220 
00221 
00228 struct Gj_Path_struct {
00229 
00230   struct gj_Pathelem_struct* first;
00231 
00232 };
00233 
00234 
00235 #ifdef __cplusplus
00236 }
00237 #endif /* __cplusplus */
00238 
00239 #endif /* !gobj_lib_path_h */
00240 

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