Geant4 Cross Reference |
1 /* 1 /* 2 # <<BEGIN-copyright>> 2 # <<BEGIN-copyright>> 3 # <<END-copyright>> 3 # <<END-copyright>> 4 */ 4 */ 5 #ifndef MCGIDI_map_h_included 5 #ifndef MCGIDI_map_h_included 6 #define MCGIDI_map_h_included 6 #define MCGIDI_map_h_included 7 7 8 #include <statusMessageReporting.h> 8 #include <statusMessageReporting.h> 9 9 10 #if defined __cplusplus 10 #if defined __cplusplus 11 extern "C" { 11 extern "C" { 12 namespace GIDI { 12 namespace GIDI { 13 #endif 13 #endif 14 14 15 enum MCGIDI_map_status { MCGIDI_map_status_Ok, 15 enum MCGIDI_map_status { MCGIDI_map_status_Ok, MCGIDI_map_status_memory, MCGIDI_map_status_mapParsing, 16 MCGIDI_map_status_UnknownType }; 16 MCGIDI_map_status_UnknownType }; 17 enum MCGIDI_mapEntry_type { MCGIDI_mapEntry_ty 17 enum MCGIDI_mapEntry_type { MCGIDI_mapEntry_type_target, MCGIDI_mapEntry_type_path }; 18 18 19 typedef struct MCGIDI_map_s MCGIDI_map; 19 typedef struct MCGIDI_map_s MCGIDI_map; 20 typedef struct MCGIDI_mapEntry_s MCGIDI_mapEnt 20 typedef struct MCGIDI_mapEntry_s MCGIDI_mapEntry; 21 typedef struct MCGIDI_map_smr_s MCGIDI_map_smr 21 typedef struct MCGIDI_map_smr_s MCGIDI_map_smr; 22 22 23 struct MCGIDI_map_smr_s { 23 struct MCGIDI_map_smr_s { 24 smr_userInterface smrUserInterface; 24 smr_userInterface smrUserInterface; 25 MCGIDI_map *map; 25 MCGIDI_map *map; 26 }; 26 }; 27 27 28 struct MCGIDI_mapEntry_s { 28 struct MCGIDI_mapEntry_s { 29 MCGIDI_mapEntry *next; 29 MCGIDI_mapEntry *next; 30 enum MCGIDI_mapEntry_type type; 30 enum MCGIDI_mapEntry_type type; 31 MCGIDI_map *parent; 31 MCGIDI_map *parent; 32 char *schema; 32 char *schema; 33 char *path; 33 char *path; 34 char *evaluation; 34 char *evaluation; 35 char *projectile; 35 char *projectile; 36 char *targetName; 36 char *targetName; 37 int globalPoPsIndexProjectile, globalPoPsI 37 int globalPoPsIndexProjectile, globalPoPsIndexTarget; 38 MCGIDI_map *map; 38 MCGIDI_map *map; 39 }; 39 }; 40 40 41 struct MCGIDI_map_s { 41 struct MCGIDI_map_s { 42 enum MCGIDI_map_status status; 42 enum MCGIDI_map_status status; 43 MCGIDI_map_smr smrUserInterface; 43 MCGIDI_map_smr smrUserInterface; 44 char *path; 44 char *path; 45 char *mapFileName; 45 char *mapFileName; 46 int numberOfEntries; 46 int numberOfEntries; 47 MCGIDI_mapEntry *mapEntries; 47 MCGIDI_mapEntry *mapEntries; 48 }; 48 }; 49 49 50 MCGIDI_map *MCGIDI_map_new( statusMessageRepor 50 MCGIDI_map *MCGIDI_map_new( statusMessageReporting *smr ); 51 int MCGIDI_map_initialize( statusMessageReport 51 int MCGIDI_map_initialize( statusMessageReporting *smr, MCGIDI_map *map ); 52 MCGIDI_map *MCGIDI_map_readFile( statusMessage 52 MCGIDI_map *MCGIDI_map_readFile( statusMessageReporting *smr, const char *basePath, const char *mapFileName ); 53 void *MCGIDI_map_free( statusMessageReporting 53 void *MCGIDI_map_free( statusMessageReporting *smr, MCGIDI_map *map ); 54 void MCGIDI_map_release( statusMessageReportin 54 void MCGIDI_map_release( statusMessageReporting *smr, MCGIDI_map *map ); 55 MCGIDI_mapEntry *MCGIDI_map_getFirstEntry( MCG 55 MCGIDI_mapEntry *MCGIDI_map_getFirstEntry( MCGIDI_map *map ); 56 MCGIDI_mapEntry *MCGIDI_map_getNextEntry( MCGI 56 MCGIDI_mapEntry *MCGIDI_map_getNextEntry( MCGIDI_mapEntry *entry ); 57 int MCGIDI_map_addTarget( statusMessageReporti 57 int MCGIDI_map_addTarget( statusMessageReporting *smr, MCGIDI_map *map, const char *method, const char *path, const char *evaluation, const char *projectile, const char *targetName ); 58 int MCGIDI_map_addPath( statusMessageReporting 58 int MCGIDI_map_addPath( statusMessageReporting *smr, MCGIDI_map *map, const char *path ); 59 char *MCGIDI_map_findTargetViaPoPIDs( statusMe 59 char *MCGIDI_map_findTargetViaPoPIDs( statusMessageReporting *smr, MCGIDI_map *map, const char *evaluation, int projectile_PoPID, int target_PoPID ); 60 char *MCGIDI_map_findTarget( statusMessageRepo 60 char *MCGIDI_map_findTarget( statusMessageReporting *smr, MCGIDI_map *map, const char *evaluation, const char *projectile, const char *targetName ); 61 MCGIDI_map *MCGIDI_map_findAllOfTargetViaPoPID 61 MCGIDI_map *MCGIDI_map_findAllOfTargetViaPoPIDs( statusMessageReporting *smr, MCGIDI_map *map, int projectile_PoPID, int target_PoPID ); 62 MCGIDI_map *MCGIDI_map_findAllOfTarget( status 62 MCGIDI_map *MCGIDI_map_findAllOfTarget( statusMessageReporting *smr, MCGIDI_map *map, const char *projectile, const char *targetName ); 63 char *MCGIDI_map_getFullPath( statusMessageRep 63 char *MCGIDI_map_getFullPath( statusMessageReporting *smr, MCGIDI_map *map, const char *endPath ); 64 char *MCGIDI_map_getTargetsFullPath( statusMes 64 char *MCGIDI_map_getTargetsFullPath( statusMessageReporting *smr, MCGIDI_mapEntry *target ); 65 int MCGIDI_map_walkTree( statusMessageReportin 65 int MCGIDI_map_walkTree( statusMessageReporting *smr, MCGIDI_map *map, int (*handler)( MCGIDI_mapEntry *entry, int level, void *userData), void *userData ); 66 char *MCGIDI_map_toXMLString( statusMessageRep 66 char *MCGIDI_map_toXMLString( statusMessageReporting *smr, MCGIDI_map *map ); 67 void MCGIDI_map_simpleWrite( FILE *f, MCGIDI_m 67 void MCGIDI_map_simpleWrite( FILE *f, MCGIDI_map *map ); 68 68 69 #if defined __cplusplus 69 #if defined __cplusplus 70 } 70 } 71 } 71 } 72 #endif 72 #endif 73 73 74 #endif /* End of MCGIDI_map_h_include 74 #endif /* End of MCGIDI_map_h_included. */ 75 75