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_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
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 00200 00201 00202
00203
00204
00205
00206 00207 00208 00209
00210
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
00238
00239 #endif
00240