#ifndef OctfIO_H #define OctfIO_H /* Last edited on 2007-02-04 00:36:10 by stolfi */ /* The Facet-Edge data structure for representing the topology of 3D maps. */ #define OctfIO_H_copyright \ "Copyright © 1998 Universidade Estadual de Campinas (UNICAMP)" #include #define _GNU_SOURCE #include #include #include #include #include void FOctfWrite(FILE *wr, Place_vec_t root, char *cmt); /* Writes the topology of the submap reachable from {root} and the comment text {cmt} to {wr}, in format that can be read back. Only the facet-edge structure is written, without the element data records. */ void OctfWrite(char *name, char *tag, Place_vec_t root, char *cmt); /* Same as {FOctfWrite}, but writes a new disk file called "{name}{tag}.fe". */ void FOctfRead(FILE *rd, Place_vec_t *rootP, char **cmtP); /* Reads from {rd} a map topology file created by {FOctfWrite}. The structure described in the file is rebuilt using brand-new facet-edge records, with serial numbers as given in the file. The root vector is allocated from scractch and its descriptor is stored in {*rootP}; the vector currently described by {*rootP}, if any, is reclaimed with {free}. If {cmtP} is not NULL, the procedure stored into {*cmtP} a pointer to the comment text, as read from the file. */ void OctfRead(char *name, char *tag, Place_vec_t *rootP, char **cmtP); /* Same as {FOctfRead}, but reads from a disk file called "{name}{tag}.fe". */ #define OctfIO_H_author \ "This C interface was written in feb/2007 by J.Stolfi." #endif